Open TobyKLight opened 1 week ago
we now have this accessibility op on dev.cables.gl which can set alt and aria-hidden for any html element. could there more properties added ? let me know!
should this op also have a role parameter ?
what about aria-label ?
These were the accessibility properties I needed to make UIs so far on HTML, that I put on the HTMLElementExtended op.
Note the HTMLElementExtended op allows you to set any tag as well so you can make
Note also with the ElementAccessibility op as it is currently: only \<img> elements support the alt attribute. Better I think to just add alt as a property to the ImageElement op.
aria-label and aria-labelledby attributes are the way to provide alt text for most element types. (But not all... See the MDN article for details)
btw. there is now a elementSetAttribute operator, which can be used to set all those aria attributes
hey, maybe you could take the current Ops.Html.ElementAccessibility op and add your accessibility stuff to it ?
pull request highly appreciated :)
Request is to have a checkbox in patch settings that allows you to mark your \<canvas> with the aria-hidden attribute.
Usecase is when your canvas is entirely decorative (e.g background of a website that does not contribute to content) and should not be announced by assistive technology.
More info on aria-hidden