-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improve screen reader experience for site meta (v2) #245
Conversation
The last version was no good using NVDA @alexstine. I'll merge this one for testing instead 🤞 |
470b56b
to
31dc322
Compare
31dc322
to
4493ad7
Compare
This solution has dropped our overall Lighthouse accessibility score due to focusable elements being If it improves the experience with these lists, maybe that doesn't matter too much. I didn't have any success using different layout techniques and keeping the label and value read together. Any space between them causes the screen reader to separate them. |
Hey @alexstine this is merged, would you be able to give it a spin on staging please? An alternative approach which works ok in NVDA and doesn't harm the Lighthouse score, is to wrap the previous contents of the list item in <li class="is-meta-post_tag">
<div role="group">
<strong>Site tags</strong> <span><a href="http://localhost:8888/tag/entrepreneur/" rel="tag">Entrepreneur</a>, <a href="http://localhost:8888/tag/startups/" rel="tag">Startups</a>, <a href="http://localhost:8888/tag/technology/" rel="tag">Technology</a></span>
</div>
</li> This does result in the list items being read as one (using I in NVDA), however not when the list is initially focused (with L). The transcript when focusing the list and then navigating the items is:
I notice the MDN docs suggest restrictions on the usage of this role within lists, but the a11y tools I'm using don't flag that:
The technique also doesn't really help in Voiceover, but I don't think that is so important. Thoughts? |
@adamwoodnz So, you cannot add Thanks. |
Thanks for checking
Ah I got so busy navigating using special keys I forgot about standard tab behaviour 🤦
So far I have not been able to find a way to make this spread out design work with screen readers. I've tried |
Fixes #235
Alternative to #239
The PR uses separate content for screen reader and visual layout, so that Voiceover and NVDA will both read the entire content of the list item.
Home (no visible label)
Single
Using specific screen reader content means we can avoid nested elements or visual space between elements, which cause screen readers to not read the list item as one.
Using NVDA where there are specific keys for navigating lists (L) and list items (I), the whole first item is read out when either key is used, eg. 'Country: United States' or 'Category: Creative (link)'. Full transcript from focusing list, then navigating items:
Using Voiceover the nested anchor tags still require another keyboard navigation with right arrow, and are read individually, but the country and published items (without links) are read as one.
My understanding is that JAWS and NVDA cover the vast majority of screen reader users, so I think optimising for them is the best choice.
There are no visual changes.
Testing
Use a screen reader to navigate the home and single site pages, checking how the screen reader interprets the meta list.
It should announce the list, then read each list item as 'label: value', and you should be able to navigate to the link within if appropriate (only country and published don't have links).
The label text should not be read twice.