-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility issue - inputGroup has role="presentation" but child elements have semantic meaning #47
Comments
Hi! Do you think it would be easy to integrate AATT into our CI tests? |
By the way, I ran Lighthouse Accessibility tests on our test suite and fixed all the issues , so we're now aiming for 100 Accessibility score in Lighthouse. |
I think the actual setup was pretty straight forward when we added AATT tests to our unit testing a few months ago. Once the basic imports, etc, were done, we set up a test util file and that gets imported into the unit test files: https://gist.github.com/emilyuhde/660260027a9ed18a561dbce567c6fa12 Then we only needed to add one test per component for our component library (though you could add more to check things like the disabled state, etc.): https://gist.github.com/emilyuhde/1f30770860b993f1dad6e5a4430d5ed0 (I keep having issues with code block formatting in Github so I just created some Gists for you.) Also, I did notice that Lighthouse doesn't find this role issue but AATT did, which seemed strange, but that's probably a good reason to consider adding a11y unit tests. Also, we did find some security issues when running |
…do have semantic meaning and it was causing an accessibility violation
I did some research into AATT and I found out that the reason why it is reporting this issue but Axe, Wave, Lighthouse are not is that AATT also uses HTML CodeSniffer. You can add it as a browser bookmark and use it to repro this issue without having to set up the AATT tests. |
I set up some accessibility unit tests to test my overrides of the react-time-picker and I started to see this accessibility error. I created a unit test on the react-time-picker straight from the library, with no customizations, and it looks like it's happening on the react-time-picker component. The inputGroup has a role="presentation" set but child elements of it have semantic meaning so that role seems to be inappropriate and is causing the unit test to fail.
(My accessibility unit tests are done with AATT https://github.com/paypal/AATT/blob/master/README.md)
This element's role is "presentation" but contains child elements with semantic meaning. <div class="react-time-picker__inputGroup" role="presentation" ??? input type="time" name="time" step="60" style="..."
https://www.w3.org/TR/WCAG20-TECHS/F92.html
The text was updated successfully, but these errors were encountered: