Support arrow-controlled components in moz-box-group[type=list]
Categories
(Toolkit :: UI Widgets, enhancement, P3)
Tracking
()
People
(Reporter: mstriemer, Assigned: akulyk)
References
(Blocks 1 open bug)
Details
(Keywords: access, Whiteboard: [recomp] [srdbb])
Attachments
(2 external files, 1 obsolete file)
When we have a <moz-box-group type="list"> then the tab order is managed by the component to support using arrow keys to move up/down/left/right within the row and to avoid including each row in the tab order. This causes some issues if there are focusable elements within a row that already handle arrow keys natively, like select and <input type="radio">, since we either need to e.preventDefault() when we move focus and their default behaviour stops working, or we skip up/down/left/right support on these elements (when applicable) and won't be able to move focus up/down anymore
We should be able to work around this by adding a mode to moz-box-item to include it in the tab order, and not running the move focus handler on elements that support arrow keys natively (when that key performs some action, ie we should still support left/right on a select).
When you have a group of box items with selects (like this Figma) in them the focus should go like this:
- Tab -> first row is focused
- Tab -> select in first row is focused
- Up/Down -> select value changes/menu opens (platform specific default behaviour)
- Shift+Tab -> first row is focused
- Tab -> Focus moves out of group
- Shift+Tab -> last row is focused
- Up -> second last row is focused
Updated•1 year ago
|
| Reporter | ||
Updated•11 months ago
|
| Reporter | ||
Comment 1•11 months ago
|
||
This isn't a blocker, but seems to be well scoped. Should be lower priority
Updated•11 months ago
|
Comment 2•11 months ago
|
||
Comment 3•11 months ago
|
||
Attaching my WIP to this bug as I believe this is a bit bigger than we originally estimated. I think we need to enumerate the cases for moving around in the list when there are certain elements as handling the selection and focus logic gets complicated quickly from my investigation.
Dropping this to focus on more actionable tasks.
Comment 4•8 months ago
|
||
It sounds like this mode would get us at least part of the way towards the consistent keyboard navigation solution mentioned here, as well as address some of the issues that surfaced in this bug.
We may need some input from a11y folks on whether or not we want all moz-box-groups and the elements within them to be keyboard focusable regardless of whether or not they contain interactive elements, or if we just need to use this mode for lists and reorderable lists (I think it's the latter, but we should confirm).
Updated•5 months ago
|
Comment 7•5 months ago
|
||
Backed out for causing failures at browser_aiwindow_applied_memories_button.js.
Backout link: https://hg.mozilla.org/integration/autoland/rev/45c74f872a40
Failure logs:
https://treeherder.mozilla.org/logviewer?job_id=569153456&repo=autoland&task=Qh8OWV5pS2iPFJ0ZGvOAsA.0&lineNumber=13813
Comment 9•5 months ago
|
||
| bugherder | ||
| Assignee | ||
Comment 10•5 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D302190
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 11•5 months ago
|
||
| uplift | ||
Updated•4 months ago
|
Description
•