Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Data List
  3. Accessibility

Data list

Accessibility

DataList from @prepared911/ui renders label and value pairs in a consistent column layout. The component wires the term and description structure, names empty and loading values, and announces copy results; your job is to keep labels precise, name empty values, and place the list under a heading or landmark.
What the component handles
  • Description list semantics. Each pair is a div holding one dt and one dd, the grouping HTML allows inside a dl. Assistive technology reads a term with its description.
  • Empty values. An empty value renders EmptyText with role="text", so a screen reader hears the emptyLabel instead of a dash.
  • Loading values. A loading value holds a skeleton with a visually hidden name from loadingLabel, and aria-busy marks the dd and, for a loading list, the dl.
  • Failed values. An error value shows a warning glyph and text; neither color nor shape carries the meaning alone.
  • Copy button. A native button named for its action. It points aria-describedby at its own term, so a list of "Copy" buttons stays distinguishable, and its copied and failed outcomes are announced through the live announcer.
What you must provide
  • Precise labels. Prefer "Incident ID" over "ID"; prefer "Created at" over "Date". Labels announced in isolation must still make sense.
  • A name for the list. A dl has no role for aria-label to name, so name the list through the heading or landmark around it.
  • Meaningful empty text. Set emptyLabel to "Not set", "Unknown", or a contextual equivalent so the rotor does not announce an empty value as nothing.
  • Copy labels. copyLabels requires an idle, a copied and a failed name. Localize all three.
  • Visible text beside decoration. A StatusDot or an icon beside a value is decorative; pair it with visible text.
Keyboard behavior
  • Tab / Shift+Tab move between interactive elements inside the list (copy buttons, links).
  • Enter / Space activate the focused button.
  • The copy button stays in the tab order while hidden and is revealed on :focus-within, so keyboard users always see where focus is.
Semantics and roles
  • <dl> wrapping <div> groups, each with a <dt> (label) and a <dd> (value).
  • Copy buttons render as native <button> elements with accessible names.
Known caveats
  • Long values that truncate. overflow={DataListOverflow.Truncate} keeps the full text in the document and carries it as the native title, which only a pointer reaches. Prefer wrapping, or expose the full value through the copy button or a detail view.
  • Sensitive data. Use Secret for tokens and masked values; DataList is for readable metadata.
Previous
Data list / API and Development
Next
DragSource / Usage
On this page
What the component handles
What you must provide
Keyboard behavior
Semantics and roles
Known caveats