WIACPSite theme 0.2.0-alpha.92
Türkçe

§15

Accessibility rules

The target is WCAG 2.1 AA (2.2 AA for touch targets). The default theme gives zero axe violations on 96 pages in light / dark, at 1440 / 390 px since 0.2.0-alpha.79; a new theme must keep this level.

  • Skeleton: the page's first link is "Skip to content" (href="#…", the target id exists); a single <h1>, headings in order; the main region is <main>.
  • Contrast: text 4.5:1, large text and interface borders 3:1. On coloured backgrounds (highlight box, tag, message bubble) measure the muted text colour again; in dark appearance, text on a primary-coloured fill should usually be dark.
  • Not colour alone: links inside text are underlined or marked in another way; states are given with colour + text.
  • Names: buttons and links made only of an icon carry aria-label. When hiding text on narrow screens, use visual hiding (clip), not display: none, so the name is kept. Icons arrive aria-hidden with theme_icon().
  • Forms: every field has a <label for> or a wrapping <label>; help and error texts are linked with aria-describedby. Core form parts already do this.
  • Keyboard: every action works with Tab / Enter / Space; a dropdown closes with Escape and focus returns to the button. Focus is always visible: if you remove an element's outline (for example a search field inside a box), give the surrounding box a ring with :has(:focus-visible). Scrollable boxes (overflow: auto table) carry tabindex="0", role="region" and a name.
  • Touch target: at least 24 × 24 px or that much space around it (checkboxes included).
  • Reflow: no horizontal scrolling at 320 px width (wide tables scroll inside their own box).
  • Motion: entrance animations are off while prefers-reduced-motion is on; content must be readable before animations end.
  • Right to left: use logical properties such as margin-inline-*, inset-inline-*; use dir="ltr" on fields such as amounts and dates.