You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current version of the focusgroup explainer, the direction can be restricted to inline and block 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?
Should focusgroup always respect the visual order for selecting the next element to focus? (What would this mean for assistive technology?)
Should focusgroup only support certain properties, e.g. writing-mode but not others like transform. If yes, what properties should be supported and which should not be supported?
Should focusgroup move focus in DOM order (respecting limitations on up/down and left/right arrow keys based on inline or block direction)?
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:
gfellerph
changed the title
[focusgroup] Should focusgroup direction follow the tab order or the visual order?
[focusgroup] Should focusgroup direction follow the DOM order or the visual order?
Apr 26, 2024
Interesting. From @lukewarlow's link, this line in the "Design Considerations" section seemed particularly relevant:
Linear navigation, focus sequencing order, and screen-reader order should always match, because there are users who use them together.
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...
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: