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
A ''::scroll-marker-group'' operates in either <dfn>links</dfn> or <dfn>tabs</dfn> mode based on the 'scroll-marker-group' property value of its [=originating element=]. The chosen mode significantly affects the roles, focus behaviors, and interactions of the associated elements and pseudo-elements (see [[#scroll-marker-activation]]).
385
+
386
+
If the mode is [=links=]:
387
+
388
+
* The roles of ''::scroll-marker-group'' and ''::scroll-marker'' are `navigation` and `link` respectively.
389
+
* All ''::scroll-marker'' pseudo-elements are tab stops, in order.
390
+
* The roles of the [=originating elements=] are unaffected.
391
+
392
+
If the mode is [=tabs=]:
393
+
394
+
* The roles of ''::scroll-marker-group'' and ''::scroll-marker'' are `tablist` and `tab` respectively.
395
+
* The ''::scroll-marker-group'' implicitly behaves as a single focusable component, establishing a <a href="https://open-ui.org/components/focusgroup.explainer/">focusgroup</a>.
396
+
* Only the active ''::scroll-marker'' is a tab stop; arrow keys are used to switch between markers. They behave as an element with a <a href="https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex"><code>tabindex</code></a> of "-1", making them focusable within their ''::scroll-marker-group'' either by arrow key navigation within the group, or via the tab key when currently active (or when no other ''::scroll-marker'' is active and this is the first marker in the group), ensuring the group has a <a href="https://open-ui.org/components/focusgroup.explainer/#guaranteed-tab-stop">guaranteed tab stop</a>.
397
+
* [=Originating elements=] of ''::scroll-marker'' are given an implicit role of `tabpanel`. If the [=originating element=] is a ''::column'' pseudo-element, the `tabpanel` role is given to the [=originating element=] of the ''::column''.
398
+
* The ''::scroll-marker'' pseudo-element is a focus navigation scope owner for its associated [=originating element=]. This means that tab focus moves from the marker to the content. Since only the active marker is a tab stop, contents of the inactive tabpanels are not reached unless the active tab is switched.
399
+
* Content from inactive tabs is also hidden from the accessibility tree, meaning authors do not need to carefully apply `interactivity: inert` to hide the inactive tabpanels.
377
400
378
401
<h4 id="active-before-after-scroll-markers">
379
402
Selecting Scroll Markers: '':target-current'', '':target-before'' and '':target-after'' pseudo-classes</h4>
@@ -520,14 +543,20 @@ Calculating the Active Scroll Marker</h4>
520
543
1. <a lt='scroll a target into view'>Scroll the |element| into view</a> with <var>block</var>, <var>inline</var>, and <var>container</var>.
521
544
1. : If the activation was triggered by invocation
522
545
::
523
-
1. <a spec=html>Follow the hyperlink</a> updating the URL, however retain focus on the marker element.
524
-
525
-
Note: If the user tabs away the focus behavior will ensure they tab into the relevant content.
546
+
1. <a spec=html>Follow the hyperlink</a> updating the URL.
547
+
1. : If the [=scroll marker group=] is in [=tabs=] mode
548
+
::
549
+
Retain focus on the [=scroll marker=] element.
550
+
1. : If the [=scroll marker group=] is in [=links=] mode
551
+
::
552
+
Set the <a href="https://html.spec.whatwg.org/multipage/interaction.html#sequential-focus-navigation-starting-point">sequential focus navigation starting point</a> to the [=originating element=], losing focus from the [=scroll marker=].
553
+
554
+
Note: In [=tabs=] mode, if the user tabs away, the focus behavior will ensure they tab into the relevant content.
0 commit comments