lottie-player
lottie-player copied to clipboard
feat(a11y): Multiple accessibility/quality fix
Hey ! On this pull request I do 5 modifications :
- Few accessibility tools report the use of "background" attribut on the lottie-player tag as a main criteria failure. (RGAA Criteria 10.1) To fix it, I remove the "background" attribut and I create a CSS var instead. (If you would like to keep it as attribut, can you rename it as data-background or something similar)
- I also have a warning with the use of "tabindex=0" attribut on button/input element because they are already focusable. So I remove them.
- I rename the class .main to .animation-wrapper because I have some conflict on many website.
- I add the "aria-pressed" attribut on toggle button (more info on aria-pressed)
- The last one is more a code quality warning with the presence of inline style. So I move them to the CSS file.
Thanks
Hi @nicolasambroise seeing as this would be a breaking change (removing background attribute) we need to see how we want to accommodate these changes. Cheers!
If you can alter the aria-label value based on the current state of the player it will be really nice !
Hey folks, you ever were able to finalize and merge this PR?