Repository navigation
fix(multi-select): Correct selected pill accessibility - #4192
alanbsmith merged 4 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Workday/canvas-kit
|
||||||||||||||||||||||||||||||||||||||||
| Project |
Workday/canvas-kit
|
| Branch Review |
fix/multiselect-selected-accessibility
|
| Run status |
|
| Run duration | 02m 49s |
| Commit |
|
| Committer | Minwook Shin |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
17
|
|
|
0
|
|
|
873
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
14.65%
|
|
|---|---|
|
|
2486
|
|
|
424
|
Accessibility
99.48%
|
|
|---|---|
|
|
3 critical
5 serious
3 moderate
1 minor
|
|
|
69
|
|
Nice work on grouping and labeling the pills. Since this set of selected pills depends on using the arrow keys to move across them, I think we need to investigate an alternative to |
|
Changed the pills to a single-row layout grid, with gridcells around the native removal buttons. The roving tab stop, arrows, Home/End, and deletion focus behavior are covered by tests; all 9 Chrome Cypress cases and 113 unit tests pass. I couldn't verify JAWS/NVDA on this Mac. Could you check arrow-key passthrough on Windows with the updated preview? The current CI run also needs maintainer approval. Could a maintainer approve it and add |
I'm glad that you experimented with this, because it was one of the options I was considering. Functionally, this is going to work but, and this is opinionated, I find it really annoying that screen readers will describe the selected pills as a "table with 1 row and {X} columns" every time. That's not valuable information for this selected pills pattern. I found a way to make the ARIA <Pill as={Element} disabled={disabled} variant="removable">
<Pill.Label aria-hidden={true}>{children}</Pill.Label>
<Pill.IconButton role="option" aria-label={removeLabel} ref={ref} {...(elemProps as any)} />
</Pill>In conclusion, I think changing the |
|
Switched the selected pills to a named toolbar with native removal buttons and horizontal roving focus in |
Oh thank you, I think I'm really happy with this toolbar idea. I spoke to @mannycarrera4 earlier today, and bug fixes like this need to be merged onto the Thanks for working on this and I apologize for any inconvenience! |
6f7a880 to
77bdbed
Compare
|
Moved the fix onto |
williamjstanton
left a comment
There was a problem hiding this comment.
I think it looks good from a11y.
|
Requesting an additional code review. |
Summary
Fixes #3919.
Fixes #4212.
Based on
support(v15), as requested.Expose selected pills as a named toolbar of native removal buttons, and hide the redundant, untabbable clear button from assistive technology.
The removal flow also keeps the focus cursor in sync, returns focus to the search input after the last removal, and avoids submitting the surrounding form. Search text remains independent of the submitted selection value.
Release Category
Components
Checklist
ready for reviewhas been added to PRFor the Reviewer
Where Should the Reviewer Start?
MultiSelectedList.tsx,MultiSelectedItem.tsx, anduseMultiSelectItemRemove.ts. Both input variants pass their accessible name to the selected-item toolbar. Horizontal roving focus provides one tab stop, Left/Right movement with wrapping, and Home/End navigation. Focus remains on the native removal buttons. The search input needs a separate focus ref because its text is not the constrained form value.Testing Manually
In the Searching story, focus the input, press ArrowDown to open the popup, then type
apple, select two results, and press Escape. Tab to a removal button, move with Left/Right or Home/End, then remove items with Backspace/Delete, Enter, or Space. Removing the last item returns focus to the input; clicking remove does not submit the form. Clearing search retains input focus.Verification on
support(October 27): all 9 Chrome Cypress cases pass, covering axe, the single tab stop, wrapping Left/Right and Home/End navigation, Enter/Space activation, deletion/focus return, search clearing, and form submission behavior. All 112 focused unit tests, all typecheck targets, full lint, and changed-file ESLint/formatting checks pass. The support tests use the existing ArrowDown popup-opening behavior.JAWS/NVDA behavior on Windows and VoiceOver speech output have not been verified. Please confirm automatic arrow-key passthrough and announcements with the toolbar before merging. Earlier cross-browser checks of the removal flow predate this role change.
Summary by CodeRabbit