Skip to main content

Accessibility visual mental model

Accessibility is not a final polish step. It is part of whether the component works correctly for keyboard users, screen-reader users, low-vision users, and people using different input methods.

JSX โ†’ DOM โ†’ accessibility tree
JSX chooses elements and relationships
button, label, nav, main, input, headings, IDs
Browser derives semantics
role ยท name ยท state ยท relationships ยท focusability
User can understand and operate the interface
Screen reader, keyboard, voice control, zoom, and other interaction modes.

Native semantics firstโ€‹

Native HTML already carries behavior
Preferred<button>
Semantics, focusability, keyboard activation, disabled behavior, and established platform support.
Rebuilt manually<div role='button'>
A role changes meaning but does not automatically implement native keyboard and browser behavior.

Every interactive control needs a usable nameโ€‹

Accessible control contract
Role
What is this control?
Name
What does this specific control do?
State
Checked, expanded, invalid, disabled, selected, busy.

Focus is part of interaction stateโ€‹

1User enters component
2Focus moves predictably
3Keyboard operation works
4Dynamic change is understandable
5Focus returns or progresses logically

Forms need relationships, not only red textโ€‹

Accessible form feedback
Visible label
<label htmlFor={id}>Email</label>
Input relationship
id, aria-invalid, and aria-describedby when needed.
Error message
Specific, associated, and announced appropriately.

ARIA is a supplementโ€‹

Do you need ARIA?
Native element already expresses meaning and behaviorUse native HTML
Control needs an accessible name not present in visible textUse the appropriate naming relationship
Dynamic state is not represented by native semanticsAdd the minimal correct ARIA state/property
Custom widget recreates a native controlReconsider whether a native element would be safer and simpler
ARIA is being added only to silence a lint ruleFix the semantic design instead

Keep this mental modelโ€‹

Accessible React in one picture
Semantics
Choose elements by meaning.
Names
Make controls distinguishable.
Focus
Design keyboard movement.
Feedback
Expose state and errors clearly.

Continue with Accessibility Foundations โ€” Semantics, Accessible Names, and useId for detailed component and keyboard patterns.