-
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
Hint for fieldset not announced if first input has hint #1696
Comments
We did some testing. The main problems to look at are:
It might be worth trying to move the edit: This is interesting: https://blog.tenon.io/accessible-validation-of-checkbox-and-radiobutton-groups |
We've used various different approaches before:
We moved the hint / error message out of the legend in #681, based partly on the research in alphagov/govuk_elements#574. The current approach feels like it's the most semantically 'correct' of all the options we've tried. The hint describes the My preference would be to raise bugs against NVDA / Jaws, and not to revisit the implementation unless we see evidence that this is having a serious impact on users or we learn that we're going 'against the spec'. |
Minimal test case: https://output.jsbin.com/juyaquq <fieldset aria-describedby="confirm-nationality-hint">
<legend>
What is your nationality?
</legend>
<span id="confirm-nationality-hint">
Select all options that are relevant to you.
</span>
<br>
<input id="confirm-nationality" name="confirm-nationality" type="checkbox" value="british-nationality" aria-describedby="confirm-nationality-item-hint">
<label for="confirm-nationality">British</label>
<span id="confirm-nationality-item-hint" class="govuk-hint govuk-checkboxes__hint">
including English, Scottish, Welsh and Northern Irish
</span>
<br>
<input name="confirm-nationality" type="checkbox" value="irish-nationality" aria-describedby="confirm-nationality-2-item-hint">
<label class="govuk-label govuk-checkboxes__label" for="confirm-nationality-2">Irish</label>
<span id="confirm-nationality-2-item-hint" class="govuk-hint govuk-checkboxes__hint">
including from Northern Ireland
</span>
<br>
<input id="confirm-nationality-3" name="confirm-nationality" type="checkbox" value="other-country-nationality" data-aria-controls="conditional-confirm-nationality-3">
<label for="confirm-nationality-3">Citizen of a different country</label>
</fieldset> |
Closing this out as raised issues, hopefully they get resolved! We can re-open if this becomes a more serious issue for our users. |
We're using the Checkbox items with hints pattern in our service and I've noticed something in VoiceOver (can't comment on JAWS or NVDA). Here's an abbreviated version of the code from the example:
The hint text for the
aria-describedby
on theinput type="checkbox"
supersedes the hint text for thearia-describedby
on thefieldset
. So the user only gets one hint read to them when they jump to the input through the tab index – the one on theinput
, rather than thelegend
.It doesn't feel right that the hint text on the
fieldset
isn't read out, when it would be if there was no hint text on theinput
, but maybe it's deliberate to reduce noisiness or for some other reason. Anyone encountered this before?Originally posted by @tempertemper in alphagov/govuk-design-system-backlog#37 (comment)
The text was updated successfully, but these errors were encountered: