-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[focusgroup] Should focusgroup direction follow the DOM order or the visual order? #1044
Comments
https://drafts.csswg.org/css-display-4/#reading-order-items - this feels relevant here |
Interesting. From @lukewarlow's link, this line in the "Design Considerations" section seemed particularly relevant:
Would that imply that arrow key navigation would also jump around (like TAB) in the above cursed example because it would also be following DOM order (despite the weird visual appearance)? If a screen reader's perception of the content would follow the same DOM order logic, that would make the most sense to me from an accessibility standpoint... |
That makes a lot of sense (and will make the implementation easier, I guess). |
I am currently prototyping the changes for CSS Now, if a focusgroup container is also a reading flow container and we want it to follow the visual order, we would need to update the advance logic in FocusgroupController. I think that should be doable. If interested, I would encourage you to take a look at the HTML standard proposal (whatwg/html#10407) and other active conversations. |
In the current version of the focusgroup explainer, the direction can be restricted to
inline
andblock
directions. However, there are many ways to alter the visual order of elements that can be combined in many different ways. A particularly cursed example would be this focusgroup maze on codepen.In this example, the tab key moves focus through the buttons in DOM order. Because of the many directional changes applied in CSS, tabbing through the buttons seems to move the focus in random order (positions 4, 3, 5, 2, 1).
While this is the expected behavior of the tab key, it might be problematic for the arrow keys when pressing the right arrow key moves the focus visually to the left.
Which order should focusgroup follow when identifying the next candidate to focus?
writing-mode
but not others liketransform
. If yes, what properties should be supported and which should not be supported?There are most likely other things to consider and more possible answers to the question.
The text was updated successfully, but these errors were encountered: