fly-apps / live_beats

MIT License
1.26k stars 159 forks source link

Initial accessibility fixes #4

Closed ndarilek closed 2 years ago

ndarilek commented 2 years ago
ndarilek commented 2 years ago

Looking over these fixes, it occurs to me that I may have implemented some of them on the wrong level.

Icons are often accompanied by controls with textual names. Is that a guarantee I can count on? If so, it might make sense to universally hide them, rather than hiding specific instances as I've done here. Since I wasn't sure, I opted for a more conservative approach based on the samples I've seen.

The issue is that the icon graphics lack alt text, so browsers will either flag them as unlabeled images or attempt to auto-describe them. If these icons were the only actionable way to engage with a control, they'd need to be labeled. But since they're either purely decorative or not the only actionable control, they're probably best hidden since they're a bit spammy to read past. If we hide them, and if there ever is a case where the icon is the only actionable control, we'll need to do the opposite of what I did here. It's a matter of which path will create the least work.

Thanks.

ndarilek commented 2 years ago

This is now resolved. I added a blank alt attribute that can be filled in if necessary. SO now icons are excluded from the accessibility tree by default, but can opt in with an alt attribute if they're actionable.