Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(header): define an aria-label on the input search button for accessibility #307

Closed
wants to merge 1 commit into from

Conversation

m-maillot
Copy link
Contributor

Cette PR corrige les warnings provenant de DSFR au sujet de l'accessibilité :

image

En se référent au code du DSFR, on voit que le soucis provient du champ aria-labelledby ou aria-label manquant sur le bouton de la recherche : https://github.com/GouvernementFR/dsfr/blob/fe9d66b4ccaa7c3a3c0cb07eca69ddd6787965c4/src/component/modal/script/modal/modal.js#L120

Comme on n'a pas de composant à référencer pour le aria-labelledby, on va utiliser le aria-label où l'on va mettre le même texte que dans title. (cf: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby)

@m-maillot
Copy link
Contributor Author

En regardant plus attentivement, il y a bien un label dans le button Rechercher. Le warning serait peut être plus une erreur de dsfr que de react-dsfr.

@m-maillot m-maillot closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant