Design System

Accessibility reference ​

Every criterion, role and check. For what these mean, see Overview. For how to choose between them, see Usage.

The target is WCAG 2.2 level AA.

The criteria ​

CriterionLevelWhat it requiresWhere it is met
1.4.1 Use of ColorAColour is never the only signalColour
1.4.3 Contrast (Minimum)AAText clears its floor, taken here as 4.5 to 1 throughoutColour
1.4.4 Resize TextAAText scales without lossType
1.4.8 Visual PresentationAAASeveral things, of which the bounded line is the one takenType
1.4.11 Non-text ContrastAAAn identifying colour clears 3 to 1Colour
2.1.1 KeyboardAEverything operable by pointer is operable by keyboardStates
2.2.1 Timing AdjustableAA time limit is avoidable, which is why an error carries noneFeedback
2.3.3 Animation from InteractionsAAAMotion is switchable offMotion
2.4.3 Focus OrderAFocus follows reading orderUsage
2.4.7 Focus VisibleAAFocus is always indicatedColour
2.5.8 Target Size (Minimum)AAA pointer target is 24 by 24 CSS pixelsUsage
4.1.3 Status MessagesAAA status is announced without taking focusFeedback

Two of those sit above the target. 1.4.8 and 2.3.3 came free with decisions taken for other reasons. A third, 2.4.13 Focus Appearance, is not in the table at all because it measures something different from 1.4.11: the same pixels focused and unfocused, rather than the indicator against what is behind it. The focus outline is 2px, which is the perimeter 2.4.13 asks for. 2.4.11 Focus Not Obscured is missing rather than met, because CTable keeps its header row sticky and nothing has measured a focused row scrolled under it.

Grid and table roles ​

ElementCarries
The tablerole="grid", an accessible name, aria-rowcount
A header cellrole="columnheader", and aria-sort when sortable
A rowrole="row" and aria-rowindex
A cellrole="gridcell", from CItemCell
The item rows togetherrole="rowgroup"
A selectable rowaria-selected
A loading tablearia-busy

aria-rowcount counts the dataset, plus the header row when a table carries one, and aria-rowindex numbers into that same total rather than into the rendered window. The header row sits outside the rowgroup, and the cells come from CItemCell, so a table that builds its own row interior carries no cell roles at all.

Target sizes ​

MinimumNotes
A pointer target24 by 24 CSS pixelsWritten as a floor, not derived, so it holds below the default text setting
An icon-only control24 by 24, as aboveIts size comes from the glyph and the padding around it, and neither is bound to the floor

Exempt: anything inline in a sentence, anything whose function is reachable from a control that does meet the floor, anything sized by the user agent, anything where the presentation is essential, and anything spaced so that 24 pixel circles centred on each target do not intersect. That last one is the exception a dense table invokes.

Names ​

SourceCounts as a name
label on a componentYes, and required on the input components and CButton. CAutoComplete and CDropdown carry no such prop
A visible label element bound to its controlYes
aria-labelYes, on an element whose role permits a name. Ignored on a bare div or span
A tooltipNo. It names its own container and nothing on the control
A placeholderNo. It disappears when somebody types
A title attributeLast resort only. Absent on touch, and it loses to everything else

What is enforced ​

RuleChecked by
Text and identifying colour clear their floorsThe contrast gate, on 169 pairings in both appearances
An accepted contrast exception that stops failingThe same gate, which fails until the entry is removed
A click handler without a keyboard handlerLint, at error
An interactive element that cannot take focusLint, at error
A form control with no labelLint at error, and a required prop
An invalid or incomplete roleLint, at error
A positive tabindexLint, at error
A @mouseover or @mouseleave without its focus equivalentLint, at error, and on components as well
A name on an interactive controlA required prop, for components only
The focus indicatorNothing
The tooltip on an icon-only controlNothing
A pointer target clearing 24 by 24Nothing
aria-rowcount counting the datasetNothing

The click-handler rule matches a handler written as a bare name or an inline function. A handler written as a property of an object is not matched, so an element carrying one passes while being unreachable.

What not to write ​

AvoidInstead
A click handler on a containerThe element that already does the job
role plus tabindex plus a key handlerThe same, unless the right element genuinely cannot be used
A placeholder as the only nameA label, hidden if it would be redundant
A tooltip as the only nameA label as well, because they answer different questions
visibility or display to hide a hover actionOpacity, so the control stays focusable
A double-click as the only route to an actionA second route with a name of its own
A row count taken from the rendered windowThe dataset total, or -1 when it is unknown
Removing an outlineAn offset, if it sits wrong