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
Removing invalid attribute #2654
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Jonathan Drake <drakej@drakej.com>
This handles an issue where the aria-hidden attribute is considered invalid by automated tools that check for WCAG compliance. |
Is there a specific WCAG test number it is failing? MDN defines it's cases as:
This falls under the "Offscreen or collapsed content, such as menus". As for the "aria-hidden="true" should not be used on elements that can receive focus". The children (the dropdown menu items) are focusable, but only when it is open. The value of aria-hidden here is tied to the isOpen value so that when it is open and the children are focusable, they aria-hidden value is false and when it is closed and the children are not focusable (read: not to be given focus), the aria-hidden value is true. So it seems like the tool you are using might have a false positive. It doesn't seem like it is checking if the content is offscreen or collapsed. That said, MDN also mentions this:
In this case, the menu does receive display: none, when isOpen is false so aira-hidden doesn't really provide any benefit and is probably superfluous. |
https://www.w3.org/WAI/standards-guidelines/act/rules/6cfa84/proposed/ https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden DropDownMenu has children navigation links which are focus-able which is an issue because of this attribute being set above them. I didn't have an WCAG rule specifically because I ran into the issue from not being able to focus on the links in the screen reader as expected. I tracked this back to reactstrap because Bootstrap UI's markup, CSS, and javascript do not have these issues. I feel like that is more than enough research into why this is a problem.
It isn't probably, it is because it was added and doesn't add any value. If someone could make an argument for why it should be there then great, but right now this thing is breaking our compliance on real sites and our only fix is to stop using reactstrap. |
Signed-off-by: Jonathan Drake drakej@drakej.com
Fixes issue #2646 which I filed before making this PR to fix it.