-
Notifications
You must be signed in to change notification settings - Fork 324
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
Checkbox can end up with multiple aria-describedby
attributes when used without a fieldset but with a hint
#1248
Labels
accessibility
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
⚠️ high priority
Used by the team when triaging
🕔 hours
A well understood issue which we expect to take less than a day to resolve.
Comments
36degrees
added
awaiting triage
Needs triaging by team
accessibility
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
labels
Mar 13, 2019
@36degrees I might end up looking at this as part of #1079 I need a way for nested fieldset radio buttons to be described by the hint shown on a parent fieldset. |
kellylee-gds
added
🕔 hours
A well understood issue which we expect to take less than a day to resolve.
⚠️ high priority
Used by the team when triaging
and removed
awaiting triage
Needs triaging by team
labels
Mar 20, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Mar 30, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 1, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 1, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 1, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 1, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 1, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 1, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 1, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 2, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 5, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 5, 2019
colinrotherham
added a commit
to colinrotherham/govuk-frontend
that referenced
this issue
Apr 5, 2019
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
accessibility
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
⚠️ high priority
Used by the team when triaging
🕔 hours
A well understood issue which we expect to take less than a day to resolve.
The checkbox component has some logic to move the association with the error message (
aria-describedby
) to the input if there is no fieldset (e.g. for a single input).It also has logic to associate the hint for the individual checkbox if a hint is provided.
We don't handle the (admittedly fairly unlikely) case where both of these things are true, so the checkbox will end up with two
aria-describedby
attributes (aria-describedby="id-of-error-message" aria-describedby="id-of-hint"
)govuk-frontend/src/components/checkboxes/template.njk
Lines 63 to 65 in abb0c36
You can reproduce this with the following macro call:
which produces this HTML:
instead of:
The text was updated successfully, but these errors were encountered: