-
Notifications
You must be signed in to change notification settings - Fork 327
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
Error summary list not read out in JAWS (2022) #2657
Comments
Hi @tvararu, thanks for the bug report. Are you able to specify which versions of Chrome and Edge you've reproduced this on? This is useful in case we end up coming back to this later, and there can be differences between browser versions over time. Thanks! |
@querkmachine updated! 👍 |
Investigation and analysis@fofr, @adamliptrot-oc, and I have been looking into this for the past couple of days. Here's what we've found so far. InvestigationThe bug can be observed by opening or refreshing a page containing the error summary, while running JAWS 2022.2204.20 (Trial) with Edge 102 on Windows 10: video-1-focus.movIn the first video, JAWS is reading out the following (comments added):
The user is made aware that there is an error, but cannot determine what is wrong (WCAG 3.3.1 Error identification), without further input. However, if you keep refreshing the page multiple times, something interesting happens (10 seconds in): video-2-alert.movThe first 10 seconds in the second video are three attempts that lead to the same output as in the first video. It's being skipped by pressing On the 4th refresh, the JAWS output is:
JAWS announced an alert, and then read the full contents of the alert element. This behaviour meets WCAG 3.3.1, but it's inconsistent, as not every refresh triggers it. Here's what (always) happens when we run the page with JavaScript disabled: video-3-no-js-alert.movThe JAWS output is:
With JavaScript disabled, the AnalysisIt seems that The two possible outcomes of the race are:
Other oddities
Solutions thought of so far1. Multiple
|
@tvararu Thanks a lot for this incredibly thorough investigation! We're going to start experimenting with the solutions you proposed. Without investigating this thoroughly myself, I personally think that the wrapper proposal seems the most robust. Please let us know if you make any further progress. |
Have you considered removing the It's actually not used according to spec. (It's supposed to be used when something changes via JavaScript not when the page reloads.) That was intentional to fix a specific issue in VoiceOver on iOS and TalkBack on Android. See alphagov/govuk_elements#511 for a further explanation. Removing it would be the more accurate use of it. It's worth rechecking what that would do in VoiceOver on iOS and TalkBack on Android. If that fix isn't needed anymore, you should just remove it. |
Initial investigation into removing
|
@owenatgov The JAWS issue might be a case of JAWS examining the page, seeing it is the same/similar and deciding that it should place the cursor at the same point at which you were last on the page. Clearing the buffer (modifier key + Esc) after the page loads consistently places the screen-reader cursor in the error summary box and so might support this. |
I'm going a little off base from what I said I'd do next, however I had a small hypothesis that this might have been a bug in JAWS 2022 as I was surprised that it didn't respond positively to just programatically focusing without the This makes me think that there's something else wrong with our error summary implementation, possibly to do with how we're making the containing element focusable programatically. I'm going to spend a little more time exploring this and if I don't get anywhere, I'll return to the wrapper solution. |
I think I've found a solution 🎉 I can get JAWS and other screen readers to consistently read out the error summary and it's contents on page load by doing the following:
My hypothesis for what happened here is that JAWS 2022 firstly didn't accept us trying to focus a I'd like to run this past our team and also assess the consequences of removing that child |
Some additional musings on the above solution: Firstly, @36degrees rightly pointed out that it's odd that
This therefore could be a combination of a bug in JAWS and light issues with our markup. @36degrees found this issue which feels related. I think it's a good idea to prompt on the VFO issue with our issue here to ensure it doesn't lose traction. Secondly, the markup change would mean this is a breaking change and therefore we'll need to wait for the next major release to launch this. I've added the v5 milestone pre-emptively and propose we keep this solution ino ur back pocket until we're ready to publish v5. I'm very open to further thoughts on this. |
Sounds sensible to me @owenatgov, and thanks for looking into this! Looking at the VFO issue it looks like Steve Faulkner pointed out that there has been a fix merged in a recent version of JAWS. I'll try downloading the latest trial (June) now and see if it behaves differently.
In theory, this could be shipped as a non-breaking change, by writing a bit of JavaScript in the error summary initialiser. It could identify the structure of the Error Summary and progressively enhance it to the new and better form, by removing attributes and lifting/shifting content. This could be done in a way that is compatible with both new/old HTML. In practice, such a solution would need a lot of testing, as it could break things in an unexpected way. And regardless, it's unwarranted in this situation if the issue resolves itself in JAWS. (However, this sounds like a technique that could be useful for other breaking govuk-frontend HTML markup changes) |
Just tried JAWS 2022.2206.9 ILM, Microsoft Edge 102.0.1245.44. Our issue persists, but indeed the codepen testcase that Steve is referencing now passes. I do think our issue is related and I think it's a good idea to bump as you suggested @owenatgov. This comment in particular resonates:
The exact same situation played out with our service; an internal accessibility auditor found this behaviour and marked 3.3.1 as Failed on an audit... |
If the old markup still works – as in, if users don't make the markup change then the error summary displays the same and functions at least as well as it does now – then we could consider treating it as a 'recommended change', and flagging it in the release notes for the next major version. There is a slight risk there, as we need to remember to make sure that any changes in 4.x releases work for both the old and new markup, and we don't really have a good way of doing that in the review app at the mo. We'd want to think it through, but my instinct is that the risk is probably manageable - we're just talking about a wrapper div that would end up doing nothing I think? |
The plot thickens. In trying to replicate this using codepen for that JAWS issue, I stumbled upon an alternative solution that I think is even simpler. By removing the This solution makes more sense to me as we were applying a To summaries, here are the changes I'm going to make to the error summary code:
I'm also going to do the following:
I'm conscious that there may be some deep behaviour around |
A quick update as a lot of the discussion on this topic moved to the PR: In short, my solution doesn't completely solve the problem. I believe it improves the experience for screen reader users but there are still instances of JAWS not reading out the entire contents of the error summary as desired and/or moving focus around the page. See my comment on the PR for details. It's at this stage that I am very confident that it's nothing in our code that's causing this but something at JAWS's end. Before I raise an issue or prompt on an existing issue, it'd be good to see if the latest JAWS beta, mentioned in the issue we found in the JAWS issue list, works well with the latest iteration of the updated error summary markup as per the PR (review app for change). @tvararu Am I right in thinking that you/your team have access to the JAWS beta? If so, when you have a spare second, it's be super helpful if you could test our work and see where we're at. I don't believe we have access in the team as we're all on macs and our testing environment (AssistivLabs) doesn't let us move versions around easily. I'm sorry this has been hanging around a while, it's been a tricky one! |
@owenatgov No worries! We've been following intently your updates on the PR 👍
I'll ask in wider DfE, I personally don't. I had to use the public JAWS trial in my own videos. Will get back to you on this. |
Another update: I misspoke in my previous update; it is possible to update our version of JAWS through a trick I wasn't aware of (thanks again @36degrees). After doing this, I discovered that my present solution had completely broken. After starting again, I found that the most appropriate solution, after all, was what was suggested originally: move the It's worth noting that my testing was consistent with problems raised in existing issues outside this one with the error summary on VoiceOver (#2072) and NVDA (#2055). I've updated the PR and will re-prompt the design system team and the DfE folks for another review. |
Discussion in cross-gov Slack: https://ukgovernmentdigital.slack.com/archives/C6DMEH5R6/p1654079614172949
Similar issue: #2072 (no longer applicable in my own testing)
Description of the issue
List of error messages within the error summary is not announced when using JAWS 2022 with Edge or Chrome.
NVDA, VoiceOver on iPad were also tested and they correctly recited the content.
Steps to reproduce the issue
Here is an example video on JAWS on another service (https://find-a-lost-trn.education.gov.uk/). The h2 is read out at 00:36, the messages are not. Many thanks to Adam Liptrot on the cross-government Slack who recorded it.
trn.mov
Actual vs expected behaviour
JAWS is only reading out the heading. It should read out the entire summary.
Environment (where applicable)
The text was updated successfully, but these errors were encountered: