lottie-player icon indicating copy to clipboard operation
lottie-player copied to clipboard

feat(a11y): Multiple accessibility/quality fix

Open nicolasambroise opened this issue 3 years ago • 3 comments

Hey ! On this pull request I do 5 modifications :

  1. 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)
  2. 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.
  3. I rename the class .main to .animation-wrapper because I have some conflict on many website.
  4. I add the "aria-pressed" attribut on toggle button (more info on aria-pressed)
  5. The last one is more a code quality warning with the presence of inline style. So I move them to the CSS file.

Thanks

nicolasambroise avatar Apr 27 '22 09:04 nicolasambroise

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!

samuelOsborne avatar Apr 28 '22 08:04 samuelOsborne

If you can alter the aria-label value based on the current state of the player it will be really nice !

nicolasambroise avatar May 17 '22 08:05 nicolasambroise

Hey folks, you ever were able to finalize and merge this PR?

yananym avatar Dec 12 '23 18:12 yananym