Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Primitives
  2. Contents
  3. Accessibility

Contents

Accessibility

Contents is never semantic. It renders a div, whose implicit role is generic, and takes no role, aria-*, id or tabIndex.
Why it carries no semantics
Browsers have historically dropped the role and accessible name of an element with display: contents from the accessibility tree, and some still do for some roles. So Contents must never stand in for an element whose semantics matter: a list or list item, a table part, a landmark, a heading, a labelled group or a control. Put the semantics on the children, or use a Box with as or the shipped component.
Content models
A div with display: contents is still a div in the DOM, so it is not valid between a parent and children whose content model needs direct children, such as ul and li. Wrap a whole list or a whole item, never the space between them.
Focus and reading order
Contents adds no focus stop and changes no reading order: its children keep their own DOM order.
Previous
Contents / API and Development
Next
Drop Target / Usage
On this page
Why it carries no semantics
Content models
Focus and reading order