Fix "Invisible focus indicator" in HTML
Why it's a problem
A keyboard user must always see where they are. An “outline: none” added for looks erases that cue: each Tab moves focus with nothing changing on screen. Our check focuses the page's first interactive elements and flags the case where none shows an outline or shadow on focus.
How to fix it — HTML
Never remove the focus outline without replacing it. With :focus-visible it only shows for keyboard navigation, not on click — the usual reason it was removed. If your focus uses another style (border, background), the check cannot see it: verify by tabbing through the page.
<style>
a:focus, button:focus { outline: none; }
</style><style>
/* Visible au clavier, discret à la souris */
a:focus-visible, button:focus-visible {
outline: 3px solid #171e19;
outline-offset: 2px;
}
</style>RGAA criterion 10.7 — Présentation de l’information
Dans chaque page web, pour chaque élément recevant le focus, la prise de focus est-elle visible ?
How to check: official tests (in French)
Test 10.7.1
Pour chaque élément recevant le focus, la prise de focus vérifie-t-elle une de ces conditions ?
Le style du focus natif du navigateur n’est pas supprimé ou dégradé ;
Un style du focus défini par l’auteur est visible.
Full page for criterion 10.7 · Official text: Référentiel général d'amélioration de l'accessibilité (RGAA) 4.1, DINUM, Licence Ouverte 2.0.
Check your site in 30 seconds
Conformly detects this kind of issue across all your pages, continuously, and alerts you on every regression.
Free scan