mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 07:53:09 +00:00
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:
@@ -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} />}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user