Fix "Required ARIA attribute missing" in HTML
Why it's a problem
Some roles only make sense with a state: a checkbox without aria-checked, a slider without aria-valuenow. The screen reader announces the widget but not its value — the user cannot tell if the box is ticked.
How to fix it — HTML
Add the attributes the role requires and keep them updated in JavaScript on every state change. Or replace the custom widget with the native element (<input type="checkbox">, <input type="range">), which manages state on its own.
<div role="checkbox" tabindex="0">Recevoir la lettre</div><div role="checkbox" tabindex="0" aria-checked="false">Recevoir la lettre</div>
<!-- Ou, bien plus simple : -->
<label><input type="checkbox"> Recevoir la lettre</label>RGAA criterion 7.1 — Scripts
Chaque script est-il, si nécessaire, compatible avec les technologies d’assistance ?
How to check: official tests (in French)
Test 7.1.1
Chaque script qui génère ou contrôle un composant d’interface vérifie-t-il, si nécessaire, une de ces conditions ?
Le nom, le rôle, la valeur, le paramétrage et les changements d’états sont accessibles aux technologies d’assistance via une API d’accessibilité ;
Un composant d’interface accessible permettant d’accéder aux mêmes fonctionnalités est présent dans la page ;
Une alternative accessible permet d’accéder aux mêmes fonctionnalités.
Test 7.1.2
Chaque script qui génère ou contrôle un composant d’interface respecte-t-il une de ces conditions ?
Le composant d’interface est correctement restitué par les technologies d’assistance ;
Une alternative accessible permet d’accéder aux mêmes fonctionnalités.
Test 7.1.3
Chaque script qui génère ou contrôle un composant d’interface vérifie-t-il ces conditions (hors cas particuliers) ?
Le composant possède un nom pertinent ;
Le nom accessible du composant contient au moins l’intitulé visible ;
Le composant possède un rôle pertinent.
Full page for criterion 7.1 · 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