Section block — accessibility

Keyboard

  • Defect (measured): a collapsible header cannot be operated by keyboard. .sb-h.sb-click is a plain <div onClick> — no role="button", no tabIndex, no key handler — so folding and unfolding is mouse-only, and the header has no focus state at all. The same is true of the collapsed preview .sb-peek.sb-click. The Stat tile shows the correct pattern (role="button" + tabIndex=0 + Enter/Space).
  • Actions in the header are real <button>s and are reachable by Tab.
  • Content inside the section behaves as it would anywhere else.

ARIA

  • The title is a <span>, not a heading element, so the page's own heading structure is not disturbed — screens that need a heading level supply it.
  • The count is rendered by the count badge and read after the title.
  • The collapsible header exposes no aria-expanded, because it is not a control (see the defect above); once it becomes a button, the state has to come with it.
  • The gear (.sb-cfg) is a button with its own accessible name; it is revealed on hover or focus within the header. On a phone it is replaced by the „Rozložení sekcí" item of the page ⋮; the sheet rows are menuitemradio with aria-checked (visible = checked).

Focus

  • Header actions take the foundation ring from ds.css.
  • The collapsible header has no ring, because it is not focusable.
  • The hidden gear becomes visible on :focus-within, so tabbing to it does not leave the user pressing an invisible control.

Contrast

Computed from packages/ui/src/tokens/tokens.css:

  • block title uses --h2 in --ink-500; sec title uses --h3 in --fg-secondary = 3.93:1 light, 6.20:1 dark — below AA for small text in light theme.
  • The action link and the count follow their own components.
  • The section has no background of its own; contrast comes from the surface it sits on.

Known limits

  • Collapsible headers are mouse-only and have no focus state — the family's main accessibility gap.
  • The sec title sits below AA in light theme.
  • The gear is hidden until hover or focus, so its existence is not discoverable by reading alone.

Source: docs/section-block/section-block.a11y.md · GitLab