Work through the accessibility warnings in your Lighthouse report
Lighthouse messages can point to a form field with no label, a nameless link or a page structure that's hard to follow. Match the message to the element before changing its markup.
Fix form elements that do not have associated labels
Give each field a label that says what to enter, and match the label's
forvalue to the field'sid. 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: noneoraria-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
langon the document'shtmlelement to the primary language, such asenfor 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
h2follows anh1rather than anh3, 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
divwith 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 withtabindex="-1"ordisabled, 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.
Address image and keyboard problems beyond Lighthouse
Website accessibility
Find what stops people with disabilities from using your site.
Alt text
Give useful images a text alternative and leave decorative images silent.
Skip links and keyboard focus
Let people bypass repeated navigation and keep keyboard focus easy to follow.