fix(web): make clickable tags, labels and column headers keyboard accessible - #42867
Open
Ashraf Ali (ashrafiucse) wants to merge 2 commits into
Open
Ashraf Ali (ashrafiucse) wants to merge 2 commits into
Ashraf Ali (ashrafiucse) wants to merge 2 commits into
Conversation
…essible Label chips, tag chips and sortable grid column headers were divs/spans with an onClick, so they could not be focused or activated from the keyboard. Render a real button when the control has a click handler (all: unset / inherit so nothing changes visually, plus a :focus-visible outline), and keep the span when there is nothing to activate or when the chip sits inside an anchor, which is already focusable. Revives microsoft#42471 and microsoft#42472 against their issue, with keyboard tests for the tag filter and the network column sorting. Fixes: microsoft#42559
Mirrors the existing click-based label filter test with keyboard-only activation (Enter and Space) for the label chips turned into buttons. Fixes: microsoft#42559
Contributor
Author
|
Spent some time walking the report with the keyboard only, and one thing is still out of reach: the project chips (the Giving |
This branch has not been deployed
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.
Summary
onClick, so they could not be focused or activated from the keyboard. Render a real<button>when the control has a click handler, keeping the visuals unchanged, with a:focus-visibleoutline.Fixes #42559