domestic-ui GitHub

Native element first

  • Use the HTML element that already has the semantics and behavior you need: <button>, <a href>, <dialog>, <details>, <label>, <fieldset>, <table>. This is the first rule of ARIA use in W3C Using ARIA.
  • Add ARIA only when native HTML cannot express something, and only in the ways ARIA in HTML allows. Never add a role an element already has (see the document conformance rules).
  • When an interactive widget has no native element, follow its APG pattern exactly.
  • Native behavior beats script: open a <dialog> with showModal() or invoker commands so the browser handles focus, Esc and inertness.

Search