Skip to content

Commit

Permalink
♿️ Tarteaucitron : make the closing button more explicit.
Browse files Browse the repository at this point in the history
add a aria-describedby to link the buton to the title of the combo to
make the 7.1 criterion of the RGAA 4.1 pass

7.1 : The HTML generated by the script should be compatible with
accessibility technology.

Here, the button was not sufficiently explicit, making potentially
someone wonder what would be closed by this button.
  • Loading branch information
etienneCharignon committed Dec 18, 2024
1 parent 5cce5a3 commit 70ffcaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/pro/tarteaucitron/tarteaucitron.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ var tarteaucitron = {
}
html += '<div id="tarteaucitron" role="dialog" aria-modal="true" aria-labelledby="dialogTitle" tabindex="-1">';
if (tarteaucitron.reloadThePage) {
html += ' <button type="button" id="tarteaucitronClosePanel" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')">';
html += ' <button type="button" id="tarteaucitronClosePanel" aria-describedby="dialogTitle" aria-label="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')" title="' + tarteaucitron.lang.close + ' (' + tarteaucitron.lang.reload + ')">';
} else {
html += ' <button type="button" id="tarteaucitronClosePanel">';
html += ' <button type="button" id="tarteaucitronClosePanel" aria-describedby="dialogTitle">';
}
html += ' ' + tarteaucitron.lang.close;
html += ' </button>';
Expand Down

0 comments on commit 70ffcaf

Please sign in to comment.