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

Check your answers pattern: Hidden text #1382

Open
htmlandbacon opened this issue Oct 16, 2020 · 5 comments
Open

Check your answers pattern: Hidden text #1382

htmlandbacon opened this issue Oct 16, 2020 · 5 comments

Comments

@htmlandbacon
Copy link
Contributor

htmlandbacon commented Oct 16, 2020

Figured I'd gather some thoughts before raising a PR, this follows on from some JAWS (the latest versions of both Edge and JAWS 2020) testing.

With the Check your answers pattern we noticed a couple of quirks with the hidden text

<dd class="govuk-summary-list__actions">
 <a class="govuk-link" href="#">
      Change<span class="govuk-visually-hidden"> name</span>
 </a>
</dd>

With this user the space isn't respected so the screen reader reads "changename" what I've found with VoiceOver + Safari 12.1.2 is that the order is flipped, so it would read name Change.

<dd class="govuk-summary-list__actions">
              <a class="govuk-link" href="#" aria-label="Change name">
                Change
            </a>
          </dd>

Changing to aria label makes this more consistent across the tools I've got access to, but I figured it was worth opening up to see if we can validate this a little bit more.

Having a non-breaking space in the also gives the correct text on JAWS.

@36degrees
Copy link
Contributor

@htmlandbacon it might be worth reading alphagov/govuk-frontend#1643 for some of the context.

In terms of 'name change', I believe that was addressed in alphagov/govuk-frontend#1096, which was released in GOV.UK Frontend v2.5.0 – can you confirm what version of GOV.UK Frontend you're seeing this in?

@abbott567
Copy link

I've also found when testing the Change links with voice recognition software, the hidden text can make it harder to use.

For example, if you have two change links on the page:

<a ...>Change <span class="govuk-visually-hidden">name</span></a>
<a ...>Change <span class="govuk-visually-hidden">address</span></a>

When I would say click change - it wouldn't find anything as it needed me to say, verbatim, click change name but of course you wouldn't know that as the text is hidden. It didn't highlight anything, as click change is probably too vague for what it believes to be the link text on the page.

I found by changing to the aria-label solution you outlined above that when you then say click change it highlights both of the links due to the fact the tag only contains the word change so it gets a direct match, and it then allows you to select which one you want by saying the corresponding number.

In NVDA and Voiceover there was no difference in how the link behaved. It still read out the full link and displayed the full link in the rotor, but it definitely made it better for voice recognition.

I was using Windows Speech Recognition on Windows 10, maybe it's ok with Dragon. But defo interesting.

@htmlandbacon
Copy link
Contributor Author

@htmlandbacon it might be worth reading alphagov/govuk-frontend#1643 for some of the context.

In terms of 'name change', I believe that was addressed in alphagov/govuk-frontend#1096, which was released in GOV.UK Frontend v2.5.0 – can you confirm what version of GOV.UK Frontend you're seeing this in?

I'll have a read, clearly my search skills are failing today!

In terms of version, I tested it here - but limited access to tooling right now https://design-system.service.gov.uk/patterns/check-answers/default/index.html

Screen shot of check your answer page with reverted hidden text then link description

@36degrees
Copy link
Contributor

@htmlandbacon what browser and version of macOS are you using there? I can't reproduce in Safari 14 / macOS 10.15.7.

@htmlandbacon
Copy link
Contributor Author

@htmlandbacon what browser and version of macOS are you using there? I can't reproduce in Safari 14 / macOS 10.15.7.

It is 12.1.2, checked in 13.1.1 and it is fine 👍🏻

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

No branches or pull requests

3 participants