Fix form elements that do not have associated labels

  • Give each field a label that says what to enter, and match the label's for value to the field's id. Placeholder text doesn't count, because screen readers don't treat it as a label.

  • A label can be hidden visually when the field's purpose is clear from what's around it, but it still needs to be in the code, as W3C's labels tutorial shows.

Fix links that do not have a discernible name

  • Put meaningful text inside the link, or provide an accessible name for an icon-only link. Don't hide the name from assistive technology.

  • Hiding the link text with display: none or aria-hidden="true" keeps screen readers from reading it, which is one cause Deque's link-name rule lists.

Fix an html element that does not have a lang attribute

  • Set lang on the document's html element to the primary language, such as en for English. Choose the language the content actually uses.

  • Mark a passage in another language with its own attribute, such as <span lang="es">, as Deque's language rule shows.

Fix heading elements that are not in a sequentially-descending order

  • Use heading levels to express the content's structure. Choose a level for its place in that structure, then use CSS for its appearance.

  • Go down one level at a time, so an h2 follows an h1 rather than an h3, and use heading markup only for real headings, as Deque's heading-order rule explains.

Fix misused ARIA in a Lighthouse accessibility audit

  • Use a native HTML control when it gives you the behavior you need. ARIA roles don't add keyboard behavior, so a div with a button role still needs its own keyboard handling.

  • A control inside aria-hidden="true" can still take keyboard focus while screen readers can't reach it. Remove the attribute, or take the control out of the tab order with tabindex="-1" or disabled, as Deque's aria-hidden-focus rule shows.

Frequently asked questions

Does a perfect Lighthouse accessibility score mean my website is accessible?

No. Lighthouse's scoring documentation says manual audits, such as trapped focus and a logical tab order, don't affect the score.