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

Errors on checkboxes should link to checkbox item when legend is not provided #1100

Open
edwardhorsford opened this issue Jan 13, 2025 · 0 comments
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation)

Comments

@edwardhorsford
Copy link
Contributor

edwardhorsford commented Jan 13, 2025

Generally the error and hint on a checkbox should get linked with aria-describedby to something. Usually this is the fieldset. However, checkboxes don't have to have a fieldset and legend - you might omit them if you had just a single checkbox.

In such a case, we should link the checkbox error and hint to each checkbox item instead. This is what GOV.UK Frontend does, but the NHS component doesn't.

@edwardhorsford edwardhorsford added the 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation)
Projects
None yet
Development

No branches or pull requests

1 participant