← Back to release summary

CSS scroll-marker-group modes

Category
CSS
Type
Chromium catches up
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

The scroll-marker-group property is enhaced to support modes: 1) 'links' - The generated ::scroll-marker-group operates in "links" mode, functioning like a navigation list. This is the default mode if omitted. 2) 'tabs' - The generated ::scroll-marker-group operates in "tabs" mode, functioning like a tablist. Each mode changes focus order and accessibility behavior of ::scroll-marker-group and ::scroll-markers, following WAI-ARIA patterns. More details: # The links mode (default) This mode is designed to mimic standard Navigation Landmarks combined with fragment anchors. ## Semantic roles The ::scroll-marker-group takes on the navigation role, and the ::scroll-marker elements take on the link role. This perfectly maps to the <nav> + <a> structural pattern. ## Keyboard navigation All ::scroll-marker elements are sequential tab stops, natively acting like a list of standard anchor links. ## Unaffected targets The originating elements do not get forced into any role, leaving the document's natural semantic structure intact. ## Activation focus management When a link marker is activated, it sets the sequential focus navigation starting point to the target element (the originating element), and focus is lost from the marker. This mimics the native behavior of clicking a standard internal <a href="#target"> link. # The tabs mode This mode is designed to natively replicate the Tabs Pattern and serves as the interactive foundation for the Tabbed Carousel Pattern. ## Semantic roles The ::scroll-marker-group is implicitly assigned the tablist role, ::scroll-marker elements act as tab roles, and their originating elements get the tabpanel role. This mirrors the required WAI-ARIA Tabs structure. ## Keyboard navigation (roving tabindex) It follows the complex keyboard interactions outlined in standard practices. Only the active ::scroll-marker acts as a tab stop. Users use arrow keys to navigate the focusgroup (switching between markers), preventing the "tab trap" of having to tab through 20 carousel dots. ## Focus scope management The marker acts as a focus navigation scope owner. Pressing Tab from the active marker moves focus directly into the active tabpanel content, matching the specification for tabbed interfaces. ## Tree pruning Content from inactive tabs is explicitly hidden from the accessibility tree. This mimics the expected behavior of aria-hidden="true" or inert on inactive tab panels, saving developers from manually scripting state changes. ## Activation focus When a marker is activated, focus is retained on the marker, which is exactly how standard tabs operate.

Standards & signals

Samples: https://codepen.io/Daniil-Sakhapov/pen/ogzQQYZ https://codepen.io/Daniil-Sakhapov/pen/ZYpmmJE

Explainers: https://gist.github.com/danielsakhapov/aa8e744701224994609aebb3e9e316e3

View on chromestatus.com