feat(html-reporter): add state filter toggle functionality#38843
Closed
BogaPurushotham wants to merge 1 commit intomicrosoft:mainfrom
Closed
feat(html-reporter): add state filter toggle functionality#38843BogaPurushotham wants to merge 1 commit intomicrosoft:mainfrom
BogaPurushotham wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Implement toggle behavior for state filter buttons (Item microsoft#1 from issue microsoft#35212): - Add aria-pressed attribute to state filter buttons for accessibility - Add visual feedback with aria-pressed styling in CSS - Clicking an active filter now toggles it off instead of keeping it active - Clicking an inactive filter toggles other filters of same type off This improves UX by making filters behave like expected toggle buttons.
Skn0tt
reviewed
Jan 19, 2026
Member
|
These are not stateful filters, they are buttons for filter presets. |
BogaPurushotham
pushed a commit
to BogaPurushotham/playwright
that referenced
this pull request
Jan 29, 2026
…essibility Addresses feedback from PR microsoft#38843 and implements Item microsoft#1 from issue microsoft#35212. Changes: - Add role='button' and aria-pressed attribute to state filter buttons - Add visual feedback styling for active filters via aria-pressed - Maintain existing preset behavior (filters are mutually exclusive) - Fix if-else chain in filter.ts for proper prefix assignment This improves accessibility for screen readers while preserving the design intent that state filters are preset buttons, not toggles. As clarified by @pavelfeldman: 'These are not stateful filters, they are buttons for filter presets.' The aria-pressed attribute indicates which preset is currently active without changing the underlying preset behavior where clicking a filter replaces other filters of the same type. Refs: microsoft#35212
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement toggle behavior for state filter buttons (Item #1 from issue #35212):
This improves UX by making filters behave like expected toggle buttons.