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

Associate form help text with form #485

Closed
wants to merge 2 commits into from
Closed

Conversation

selfthinker
Copy link
Contributor

This is an alternative solution to #484.

What problem does the pull request solve?

Most groups of checkboxes and radio buttons within Elements have an additional introductory help text which isn't a hint. It's usually there to help less technical people understand that you can select multiple checkboxes, but can also be used for other purposes.

This associates that text with the form via aria-describedby to make it more accessible to assistive technologies like screen readers. Ideally this should be put into the legend instead, but that proves to be difficult (see #484).

How has this been tested?

I tested in the most used screen reader and browser combination: VoiceOver in Safari on macOS, JAWS in IE 11 on Windows 10 and NVDA in Firefox on Windows 10. They don't necessarily say the help text under all circumstances but always under some circumstances (e.g. when down-arrowing vs tabbing).

What type of change is it?

  • Bug fix (non-breaking change which fixes an issue)

Has the documentation been updated?

I'm not quite sure if this needs to be documented or not. We don't officially have the concept of a "form help text". (That's the name I gave it, that might need improving.) But I am aware of forms in the wild which use something similar. Where would a documentation fit? Maybe under "hint text" as that is related.

Most groups of checkboxes and radio buttons within Elements
have an additional introductory help text which isn't a hint.
It's usually there to help less technical people understand
that you can select multiple checkboxes,
but can also be used for other purposes.

This associates that text with the form via `aria-describedby`
to make it more accessible to assistive technologies
like screen readers.
@gemmaleigh gemmaleigh temporarily deployed to govuk-elements-review-pr-485 June 5, 2017 18:19 Inactive
@gemmaleigh
Copy link
Contributor

@selfthinker which of these solutions, #484 or #485 is your preferred choice?

@gemmaleigh
Copy link
Contributor

We have a section on fieldsets and legends.
http://govuk-elements.herokuapp.com/form-elements/#form-fieldsets

The guidance for moving this help text into the legend, or using aria-describedby to associate the two can go there.

@selfthinker
Copy link
Contributor Author

I'd prefer solution #484. As Richard Morton keeps on saying: "The first rule of ARIA is: Don't use ARIA."
#484 solves it without the help of ARIA and without the need for developers to take care of adding additional things that can go wrong (id and referencing it correctly to aria-describedby).

Let me know if the "hack" in #484 is okay with you, then I can add the documentation to it. Otherwise I will add it in here instead.

@gemmaleigh
Copy link
Contributor

Let's go with #484. Fine to include the "hack" since it'll make the spacing underneath hint text consistent. Thanks Anika.

@gemmaleigh
Copy link
Contributor

Closing in favour of #484.

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.

None yet

2 participants