Skip to content

♿(filter) name the reset row, the search list and raise contrast - #387

Draft
Ovgodd wants to merge 3 commits into
mainfrom
fix/filter-reset-label
Draft

Ovgodd wants to merge 3 commits into
mainfrom
fix/filter-reset-label

Conversation

@Ovgodd

@Ovgodd Ovgodd commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Prepares suitenumerique/drive#897 (RGAA 7.1, blocking).

The reset row of a filter only says "Reset". A screen reader user hears that word and cannot tell which filter it clears. On hover or focus, the inactive trigger text falls under the 4.5:1 contrast ratio.

In SearchFilter, the list was named after the whole trigger. NVDA announced "keyboard_arrow_down, liste": the Material icon ligature leaked into the name, even though the icon is aria-hidden, because the trigger was the aria-labelledby target. The selected value was part of the name too.

Proposal

  • Filter and SearchFilter: new optional resetLabel. The reset row shows that string. When it is omitted, the label stays "Reset" (components.searchFilter.reset).
  • Drive will pass, in French: "Réinitialiser le filtre par type", "Réinitialiser le filtre par personne", "Réinitialiser le filtre par date", "Réinitialiser le filtre par emplacement". English: "Reset the type filter", "Reset the shared with filter", "Reset the modified filter", "Reset the location filter". Dutch: "Typefilter resetten", "Filter Gedeeld met resetten", "Wijzigingsfilter resetten", "Locatiefilter resetten".
  • The undo icon is aria-hidden="true". The visible text and the accessible name are the same string.
  • Inactive trigger text uses the secondary content color, so it stays at 4.5:1 on the hover and focus background. The active state is unchanged.
  • Clicking reset still clears the selection and leaves the menu open.
  • SearchFilter list: was "keyboard_arrow_down", now the filter label only, e.g. "Partagé avec", like the Filter list. The trigger still reads "Partagé avec : Mark Down".
  • Playwright test: the SearchFilter list is named "Category", before and after a selection.

Out of scope

Filter and SearchFilter take an optional resetLabel so the reset row can
name the filter it clears. Inactive trigger text uses the secondary
content color and stays at 4.5:1 on hover and focus.
@Ovgodd Ovgodd self-assigned this Nov 19, 2026
@Ovgodd Ovgodd added the Accessibility Accessibility Update label Nov 19, 2026
@Ovgodd
Ovgodd marked this pull request as ready for review November 19, 2026 09:21
@Ovgodd Ovgodd linked an issue Nov 19, 2026 that may be closed by this pull request
The list was labelled by the whole trigger, so NVDA read the arrow icon
ligature ("keyboard_arrow_down") and the selected value as its name. It is
now labelled by the filter label only, like Filter.
@Ovgodd Ovgodd changed the title ♿(filter) name the reset row and raise its contrast ♿(filter) name the reset row, the search list and raise contrast Nov 19, 2026
@Ovgodd
Ovgodd marked this pull request as draft November 19, 2026 09:56

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility Accessibility Update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[A11Y] Improve search filter semantics, labels and contrast

1 participant