play.core icon indicating copy to clipboard operation
play.core copied to clipboard

Adding aria-hidden for accessibility

Open benjaminleonard opened this issue 3 years ago • 2 comments

I'm using a modified version of this library to embed ASCII animations and someone had suggested that adding the aria-hidden attribute would be useful avoid tripping up screen readers. Would you be interested in me creating a pull request to add that to the library?

benjaminleonard avatar Dec 01 '21 10:12 benjaminleonard

I was thinking about it last week… Where would you add it? The target element for the rendering can freely be chosen and is not created at runtime… I don’t think it’s the job of the library itself to add this attribute to it (you never know how it will be used). But it’s a good idea to point out the isse… so I'd rather add it to the embed examples and add an “accessibility” chapter in the manual – but not impose it; what do you think?

ertdfgcvb avatar Dec 01 '21 20:12 ertdfgcvb

Exactly, that rings true to me, especially since it's so easy to add the attribute to a parent element; affecting all children.

benjaminleonard avatar Dec 01 '21 20:12 benjaminleonard