-
Notifications
You must be signed in to change notification settings - Fork 776
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
False positive: "aria-required-children" & "aria-required-parent" fail for nested buttons with roles "menu" and "menuitem" #932
Comments
I'm not sure that axe-core should pass this–can you add more details about the scripting and styles involved? In Safari and Voiceover, the focusable outer button is announced as "name-1, group". In Chrome and Voiceover, it is announced as "menu name-1, zero items". The focusable menuitem/button inside is announced as "text menuitem" in both, but there's no menuitem count like with DIV elements. I'd definitely want to see more information before changing axe-core across the board. In JAWS 2018 and IE11, the menu is announced as "menu. to navigate, press up or down arrow". The menu item is announced as "text" and that's it–hence wanting to see more about the scripting involved. NVDA and Firefox works well; the buttons are announced as "name-1 menu" and "text, 1 of 1". But support is sorta all over the place. |
@marcysutton change |
@dylanb I did that, and it didn't change anything. Here's a Codepen for testing. https://codepen.io/marcysutton/pen/QxQpbG |
Ha, that makes sense–and it explains the inconsistent tab/shift-tab behavior I found. It should actually fail the rule I proposed then, for nested interactive elements: #601 |
@marcysutton I don't think it will fail that rule because of the browser's hoisting of the one button out of the other button, but the bottom line is that this is not a false positive @iamrafan can you confirm this is the same behavior you are seeing so we can close this issue? |
@dylanb that might be a better rule for eslint/AST tooling since it could check pre-rendering...? |
@marcysutton There are some violations of the #601 type that will not be hoisted - so it is still a valuable rule for the DOM. You are right though, it will surface more issues in a pre-rendered linter. |
@marcysutton @dylanb thanks for looking into this issue. I confirm that I am seeing the same behaviour |
Ok, I'm going to close this issue since it isn't a recommended technique! Thanks for posting. |
Example:
The text was updated successfully, but these errors were encountered: