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

GOV.UK Radios (Checkboxes) Items do not support Hints #768

Closed
NickColley opened this issue Jun 6, 2018 · 3 comments · Fixed by #846
Closed

GOV.UK Radios (Checkboxes) Items do not support Hints #768

NickColley opened this issue Jun 6, 2018 · 3 comments · Fixed by #846
Labels
feature request User requests a new feature

Comments

@NickColley
Copy link
Contributor

NickColley commented Jun 6, 2018

Raised by Alex T.

It's currently it is not possible to use hints in items as seen in https://www.gov.uk/log-in-file-self-assessment-tax-return/sign-in/prove-identity

Current work around:

{{ govukRadios({
  "idPrefix": "example",
  "name": "example",
  "fieldset": {
    "legend": {
      "text": "Create a new organisation"
    }
  },
  "items": [
    {
      "value": "Create new organisation",
      "html": "test <span class="govuk-hint">hint here.</span>",
    },
    {
      "value": "Merge organisations",
      "html": "test <span class="govuk-hint">hint here</span>",
      "checked": true
    }
  ]
}) }}
@kr8n3r
Copy link

kr8n3r commented Jun 6, 2018

for this it would be good to understand what the relationship is between the label text and hint text in the way they're read with screenreaders

@timpaul
Copy link
Contributor

timpaul commented Jun 9, 2018

This is a relatively common pattern, so we should support it. In the self assessment example above the hint text is not part of the label, it's in a span immediately following it. However, on Voiceover at least it does get read out when you navigate between the radio options, which is probably what we want to happen.

@36degrees
Copy link
Contributor

In the self assessment example above the hint text is not part of the label, it's in a span immediately following it. However, on Voiceover at least it does get read out when you navigate between the radio options, which is probably what we want to happen.

This works because the span is associated with the input using aria-describedby, which mirrors how we now associate hints and error messages with inputs generally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request User requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants