p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

Fixed the skipping of download links by screen reader

Open Rahulm2310 opened this issue 4 years ago • 8 comments

Fixes #1015

Changes:

I think aria-labelledby is supported for interactive content elements such as links and buttons by a screen reader but skipped for static elements. So, I removed the aria-labelledby attribute from the unordered lists which makes the screen reader works fine now.

Screenshots of the change:

NA

Rahulm2310 avatar Apr 22 '21 12:04 Rahulm2310

@lmccart Please review this PR 🙂

Rahulm2310 avatar Apr 22 '21 12:04 Rahulm2310

I think the issue actually might be that the lists have css property list-style: none which also hides it from screen readers. so what we actually need here is roles set: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/List_role

lmccart avatar Apr 22 '21 13:04 lmccart

@lmccart Thanks. Although lists have a role="list" by default still I tried adding role="list" to the ul and role="listitem" to li but the screen reader skipped it.

Rahulm2310 avatar Apr 23 '21 08:04 Rahulm2310

@Rahulm2310 ah ok. I'm good to merge your fix then, but are you able to provide any link that explains what's happening and how this fixes it? I just want to understand better. And to confirm, though you're removing the aria-labeledby tags, the headings are still staying attached to the lists from the screen reader perspective?

lmccart avatar Apr 23 '21 15:04 lmccart

@lmccart removing the aria-labeledby tag is a work around but not a solution.

I think the issue actually might be that the lists have css property list-style: none which also hides it from screen readers.

Not sure if this is related to list-style:none as bottom list is also skipped by screen reader. image.

You can try running the chrome screen reader to know the actual problem. You can also try removing the aria-labelledby tag from developer tools and try running the screen reader again to see if the problem is fixed or not. 🙂

Rahulm2310 avatar Apr 23 '21 19:04 Rahulm2310

@Rahulm2310 yes this was my understanding as well. That's why I thought adding the role="list" should address the issue, see references: https://www.scottohara.me/blog/2019/01/12/lists-and-safari.html https://gerardkcohen.me/writing/2017/voiceover-list-style-type.html

lmccart avatar Apr 23 '21 19:04 lmccart

are you able to provide any link that explains what's happening

What's happening

Suppose this list : image Now when screen reader reads it, it just announces "Top Cakes, list with three items". It doesn't announces the list items Red Valvet, Coconut, Angel Food. But when I remove the aria-labelledby attribute from the ul then the list items are also announced by the screen reader.

Rahulm2310 avatar Apr 24 '21 10:04 Rahulm2310

Thank you. I was asking for a link that explains why using aria-labeledby prevents reading of lists.

lmccart avatar Apr 24 '21 14:04 lmccart