Open niklas-wortmann opened 4 years ago
Years ago, I actually spent quite a bit of time on a11y for a Flash-based SVG renderer. It was quite the ordeal, and the poor quality of screen readers in particular was surprising.
That said, I'm happy to take a stab at it. Not sure what attributes to add where though. Could you link to the article you mentioned? Some best practices and examples would definitely be helpful.
Lol sorry here it is https://css-tricks.com/accessible-svgs/
Thanks. That case study about a graph is definitely helpful.
Now, before I start adding metadata blindly (no pun intended), I was thinking I'd take a diagram SVG, annotate it, and see how the Jaws screen reader behaves. Of course, it'd be even better to get input from someone who's actually using a screen reader, but I'm not getting my hopes up.
Some initial thoughts:
<g>
elements) heavily, which should help.role="list"
and the messages inside role="listitem"
.role="presentation"
attributes to bypass the screen reader. If we do, that's going to bloat the SVG output. In that case, I'd make the feature opt-in; otherwise, it can just be force-enabled, since it's unobtrusive.@roelvangils I know this is your expertise. If you feel like weighing in at all, that'd be awesome.
I’ll have a look on Monday ;)
I implemented some of this on the a11y
branch but it's completely untested. :bomb:
I contaced an a11y expert too. That's pretty much his recommendation:
. Some of the things that need to happen: Add role="img" to the
Yeah, those are definitely relevant as well, but they're about the outer SVG element. You could even argue that Swirly doesn't even need to produce them, because the party who's embedding the image could easily add them themselves. Of course, it'd be more convenient if Swirly did everything.
So it looks pretty good that we are adding swirly to the rxjs docs. I didn't think about that before but we aim to have high standards for accessibility. I stumbled across this article describing what to do for accessibility for SVGs. Even though it is not perfect, it would be cool for us if there would be a configuration option for those properties.
What do you think of that?