fix(map): announce the places filter control as opening a dialog

MapTogglePill always set aria-pressed, so the phone map's Filters control read
as a toggle although it opens a sheet. An opensDialog option drops aria-pressed
for aria-haspopup="dialog"; the other map toggles are unchanged.
This commit is contained in:
EvKoh
2026-10-03 15:50:30 +02:00
committed by Maurice
parent a9f7adf99b
commit 3951e8cc9a
3 changed files with 18 additions and 5 deletions
@@ -7,7 +7,8 @@ import { useTranslation } from '../../../../i18n'
/**
* The phone map's way into the places filter: a round control in the right-hand
* stack, lit and badged with how many filters are narrowing the markers. The sheet
* it opens is the shell's 'placesFilter' sheet.
* it opens is the shell's 'placesFilter' sheet, so the button announces a dialog
* rather than a pressed state.
*/
export function MPlacesFilterPill({ onOpen }: { onOpen: () => void }) {
const { t } = useTranslation()
@@ -23,6 +24,7 @@ export function MPlacesFilterPill({ onOpen }: { onOpen: () => void }) {
label={label}
badge={count}
testId="places-filter-pill"
opensDialog
icon={<SlidersHorizontal size={17} strokeWidth={2} />}
/>
)