timdp / swirly

A marble diagram generator.
https://swirly.dev
MIT License
118 stars 3 forks source link

Improve Accessibility #2

Open niklas-wortmann opened 4 years ago

niklas-wortmann commented 4 years ago

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?

timdp commented 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.

niklas-wortmann commented 4 years ago

Lol sorry here it is https://css-tricks.com/accessible-svgs/

timdp commented 4 years ago

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:

timdp commented 4 years ago

@roelvangils I know this is your expertise. If you feel like weighing in at all, that'd be awesome.

roelvangils commented 4 years ago

I’ll have a look on Monday ;)

timdp commented 4 years ago

I implemented some of this on the a11y branch but it's completely untested. :bomb:

niklas-wortmann commented 4 years ago

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 tag.