-
Notifications
You must be signed in to change notification settings - Fork 107
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
Headings inside legends not recognised by JAWS #778
Comments
Have a possible resolution, at least as a stop gap while JAWS fixes the underlying bug. Details here: FreedomScientific/standards-support#549 Basically involves adding |
Working on a possible solution here: https://nhs-duec.github.io/headings-inside-legends-test-cases/ |
This is an interesting idea and loving the work to test it out, one test case to consider since you're proposing to change the semantics of the Scenario: radios that say yes or no. Normally they'd get the question announced with the options making it easy to answer them when focusing the options themselves. From a tree perspective my hunch is you're proposing this, just with aria roles. Which of course solves the heading navigation issue but breaks the arguably more useful association. <fieldset>
<h1>...</h1>
</fieldset> |
Thanks @NickColley that's a great point - I will add a test case to exercise this specifically |
Sweet, much love Andy, hope it turns out this pattern works well for both cases though. |
@NickColley I can't get JAWS to announce the legend when looking at radio buttons even before making my change. Is this definitely how it's intended to work? In NVDA when I press |
It may vary between different assistive technologies it's been a while since I've tested this so can't remember I'll be honest. Worth trying more than JAWs for this one I think if you're able to. |
oh absolutely, I'm testing as much as I can get my hands on, and, though he doesn't know it yet, I'm hoping @mcheung-nhs might be able to have a look through as well to test with a few other things |
Using the following markup pattern has tested well so far:
Tested in: Windows 10 | Chrome 94 | JAWS 2021 @mcheung-nhs Would you be able to take a look through the examples here https://nhs-duec.github.io/headings-inside-legends-test-cases/ at some point? Would be good to get another opinion. I'll DM you separately - it might be good to have a quick video call to explain. |
@adamliptrot-oc was able to test MacOS / Voiceover for me as I can't test that platform - but unfortunately it appears that the heading was not accessible when using the |
To wrap this up for a moment - on 111 online we're going to un-nest the headings/legends, so for the time being we will have duplicated h1 and legend elements. Not ideal, but I think better than the current situation in JAWS. Not necessarily suggesting this gets rolled out to the design system, but this is the stopgap we're putting in on our service. Beyond that - I think we just have to monitor the JAWS bug... |
Update from alphagov/govuk-frontend#1605 (comment)
|
As per the update on this thread, this is now fixed in JAWS 2022: |
Bug Report
What is the issue?
When headings (e.g. <h1>) are nested inside a <legend> JAWS does not announce them when pressing the
H
key.I note that a very similar issue has been closed in the past at #534. However this issue is current and is unrelated to any
overflow: hidden
css. It occurs in a plain html page outside of the nhsuk-frontend styles.We have observed this in user research as well as my own testing. In user research it resulted in a fair amount of confusion for one particular user who regularly used the
H
key - often as the first thing they pressed after the page loaded.The issue is currently being tracked in the following issues, but I wanted to open this one here so that it doesn't fly under the radar for us.
FreedomScientific/standards-support#549
FreedomScientific/standards-support#100
alphagov/govuk-frontend#1605
w3c/html-aria#350
hmrc/accessibility#34
What steps are required to reproduce the issue?
Create a page with the following markup, and listen to it with JAWS. Press the
H
key - observe that it says "No headings available"What was the environment where this issue occurred?
The text was updated successfully, but these errors were encountered: