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

Links with contextual screen-reader content not being read correctly #29

Open
adamliptrot-oc opened this issue Jun 8, 2020 · 9 comments
Labels
assistive tech Assistive technology may be misbehaving design Pattern or component needs investigation gds Discuss with GDS jaws Audit task: use the JAWS screen reader

Comments

@adamliptrot-oc
Copy link
Contributor

JAWS in particular will merge the visible and hidden copy from a change link and then mis-pronounce the result, for example instead of "Change first name" it will say "Changefirst name". This also shows up in the dialog listing links.

Placing the space inside or outside the visually-hidden copy does not seem to make any difference to how the phrase is spoken or displayed.

One solution is to move from the current code:
Change<span class="visually-hidden"> first name</span>

to one which keeps the phrasing together:
<span aria-hidden="true">Change</span><span class="visually-hidden">Change first name</span>

@adamliptrot-oc adamliptrot-oc added assistive tech Assistive technology may be misbehaving design Pattern or component needs investigation gds Discuss with GDS jaws Audit task: use the JAWS screen reader labels Jun 8, 2020
@chrismoorembe
Copy link

chrismoorembe commented Jun 15, 2020 via email

@adamliptrot-oc
Copy link
Contributor Author

JAWS

The space between the visible and hidden copy in the change links is not being preserved with JAWS which means the “Change” and the first word of the hidden copy are being merged together and so mispronounced.

Voiceover iOS

In Voiceover on iOS the span in the middle of the accessible name means that if a user is navigating by links they hear:

“link: Change your name” (swipe)
“link: Change” (swipe)
“link: Your name”

Android TalkBack

With Android TalkBack when a user is navigating normally by swiping the effect is the same as with VO navigating by links
To resolve
Instead of

<a href="">
    Change
    <span class="govuk-visually-hidden"> your name</span>
</a>

do this

<a href="">
    <span aria-hidden="true">Change</span>
    <span class="govuk-visually-hidden">Change your name</span>
</a>

@adamliptrot-oc
Copy link
Contributor Author

Reported to GDS on alphagov/govuk-frontend#1643

@adamliptrot-oc adamliptrot-oc changed the title Change links on CYA pages Links with contextual screen-reader content not being read correctly Nov 17, 2020
@adamliptrot-oc
Copy link
Contributor Author

GDS have filed bugs with JAWS and NVDA around the honouring of spaces alphagov/govuk-frontend#1643 (comment)

@adamliptrot-oc
Copy link
Contributor Author

Update - I can't hear the merging of content anymore in JAWS (tested 2019, 2020, 2021), although the space is still missing in the dialog.

@adamliptrot-oc
Copy link
Contributor Author

In the summary list you can send html as a param to the action which overrides the text.

 actions: {
    items: [
        {
              href: "#",
              html: '<span aria-hidden="true">Change</span><span class="govuk-visually-hidden">Change name</span>'
        }
    ]
 }

Which will render like this (GDS style at top, HMRC style at bottom)
image

@adamliptrot-oc
Copy link
Contributor Author

adamliptrot-oc commented Oct 14, 2021

Interesting possibility, that using a capital letter for the first word of the hidden copy might result in the non-honouring of the space to be negated by the screen-reader pronunciation of camelcased text eg ChangeName where the screen-reader will read out the words as individual words due to the casing.
(suggested by Andrew Arch Principal Accessibility Consultant, Intopia on Govt Accessibility email list)

@danielelder
Copy link
Contributor

That sounds sensible as that's how it's supposed to work for hashtags.

@ashfaqhussain357
Copy link

Fixed with Jaws 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assistive tech Assistive technology may be misbehaving design Pattern or component needs investigation gds Discuss with GDS jaws Audit task: use the JAWS screen reader
Projects
Status: Done
Development

No branches or pull requests

4 participants