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

Single field with error should have 'aria-describeby' attribute #1054

Merged
merged 2 commits into from
Nov 6, 2018

Conversation

aliuk2012
Copy link
Contributor

@aliuk2012 aliuk2012 commented Nov 5, 2018

What

If you use a single checkbox without a <fieldset>, and that single checkbox has an error message or hint, the error or hint will not associated with the field – they would normally be associated with the fieldset, but that isn't part of the output because it's a single checkbox in isolation.

This PR adds the describeBy to the checkbox input if no fieldset exists

Example page: https://govuk-frontend-review-pr-1054.herokuapp.com/components/checkboxes/with-single-option-set-aria-describeby-on-input/preview

Trello ticket: https://trello.com/c/05zGTIPN/1453-associate-error-message-and-hint-with-checkbox-if-there-is-no-fieldset

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1054 November 5, 2018 09:44 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1054 November 5, 2018 09:50 Inactive
Copy link
Contributor

@NickColley NickColley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, I just have some non-blocking comments.

src/components/checkboxes/template.njk Show resolved Hide resolved
src/components/checkboxes/checkboxes.yaml Outdated Show resolved Hide resolved
src/components/checkboxes/checkboxes.yaml Outdated Show resolved Hide resolved
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1054 November 5, 2018 12:15 Inactive
@aliuk2012 aliuk2012 force-pushed the single-field-error-describeby branch from 9cceaae to 5926212 Compare November 5, 2018 13:18
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1054 November 5, 2018 13:19 Inactive
@aliuk2012 aliuk2012 force-pushed the single-field-error-describeby branch from 5926212 to 30a2fb3 Compare November 5, 2018 13:37
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1054 November 5, 2018 13:37 Inactive
@kr8n3r
Copy link

kr8n3r commented Nov 5, 2018

changelog entry?

@aliuk2012 aliuk2012 changed the title Single field error describeby Single field with error should have 'aria-describeby' attribute Nov 5, 2018
@kr8n3r kr8n3r added this to the [NEXT] milestone Nov 6, 2018
@aliuk2012 aliuk2012 merged commit 6451ec9 into master Nov 6, 2018
@aliuk2012 aliuk2012 deleted the single-field-error-describeby branch November 6, 2018 09:18
@kr8n3r kr8n3r mentioned this pull request Nov 19, 2018
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.

4 participants