Start by using
semantic HTML for all content and controls. Use real
elements for buttons,
/
/
for layout,
and
for forms, and a locial hierarchy of heading levels for titles. For example, a
element comes with default keyboard support (focusable and activatable via keyboard), whereas a non-semantic element like a
would lack those features. It is required to use existing native elements like
,
or
. If there is no way of avoiding custom components (there usually isn't), follow established ARIA design patterns and
keyboard interaction models. Use ARIA only if there is NO alternative, and in most cases, there is. If you do, document this choice and the reasoning behind it.
Ensure the page is organized with clear
structure and landmarks. Use HTML5 sectioning elements to delineate navigation, main content, forms, etc, to give users and yourself a clear understanding of how the content is structured. Always provide text equivalents for non-text media: include descriptive
alt text for images, transcripts or captions for audio/video. If you can't reliably make those yourself, note a required and blocking task for another maintainer. Similarly, use table headings (with
and
attributes) for data tables to make relationships in tabular data clear to screen readers. Avoid link texts like "here", "click" or "Continue Reading". If they are required visually, add a redundant way to receive their content (e.g. an interactive card) and remove those from the accessibility tree.