Skip to content

[css-overflow-5] Focus order of generated controls #10912

Description

@flackr

Scroll markers #10720 and scroll buttons #10722 add focusable controls around the scrolling content. This issue is intended to cover the details of how they should be focused, which likely also implies what their relative tree order should be.

For the purposes of discussion let's consider a hypothetical DOM:

<input id=before-scroller>
<div class=scroller>
  <input id=item1>
  <input id=item2>
  ...
</div>
<input id=after-scroller>

Styled with scroll markers and/or scroll buttons, e.g.:

.scroller {
  scroll-marker-group: before | after;
}
.scroller::scroll-button(inline-start) {
  content: "<" / "Previous page";
}
.scroller::scroll-button(inline-end) {
  content: ">" / "Next page";
}

What should the tab order be, when you start on #before-scroller and tab forward? For the sake of making it easier to discuss, I think it might be helpful to define some terms:

  • Buttons: All scroll-buttons, ordered by previous buttons, next buttons
  • Previous buttons: All scroll-buttons navigating back, i.e. the block-start and inline-start directions in this order.
  • Next buttons: All scroll-buttons navigating forward, i.e. the inline-end and block-end direction directions in this order.
  • Markers: The scroll marker group, resulting in the active marker being focused.
  • Before markers: The scroll-marker-group if it is scroll-marker-group: before.
  • After markers: The scroll-marker-group if it is scroll-marker-group: after.
  • Content: Focus goes through the content of the scroller, i.e. #item1, #item2

Options:

  1. Buttons, Before Markers, Content, After Markers
  2. Before Markers, Buttons, Content, After Markers
  3. Before Markers, Previous buttons, Content, Next buttons, After Markers
  4. Previous buttons, Before Markers, Content, After Markers, Next buttons

Some existing examples:

Note:

  • Once you interact with a control, we can change the next tab stop to be the targeted content similar to how following an anchor link sets the sequential focus navigation starting point. This means that clicking on a marker or clicking on next page, and then tabbing could be defined to focus into the contents of the linked item / page regardless of the normal next item in tab order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11y-trackerGroup bringing to attention of a11y, or tracked by the a11y Group but not needing response.css-overflow-5

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions