jwplayer / ott-web-app

Reference implementation for JWP-powered apps
Apache License 2.0
70 stars 52 forks source link

Feat / Vitest axe WCAG tests for components #525

Closed langemike closed 4 months ago

langemike commented 5 months ago

This change will automatically asses our components to the WCAG 2.1 and 2.2 guidelines. Having this in place makes sure our current state is according to the specs and it will prevent us from accidentally breaking accessibility.

We've used Vitest Axe plugin which internally uses a plugin from Axe axe-core. Axe is an acclaimed party when it comes to development tools related to web accessibility. Potentially more integrations from Axe will follow, with this being the first.

It also contains a minor change for the Button component to make it succeed with the WCAG guidelines.

Axe docs for reference: https://www.deque.com/axe/core-documentation/api-documentation/ Based on the work of: https://github.com/Videodock/ott-web-app/pull/101 Ticket: https://videodock.atlassian.net/browse/OTT-1133

AntonLantukh commented 4 months ago

@langemike could you please get changes from develop in this branch?

langemike commented 4 months ago

@AntonLantukh I rebased the changes from develop-branch and fixed some failing unit tests. should be all good now