Skip to content
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

aria-required-parent: Improve failure messaging when 'menuitem', 'menuitemcheckbox' and 'menuitemradio' are in a 'group' #2904

Closed
iamrafan opened this issue Apr 29, 2021 · 3 comments
Labels
pr A pr has been created for the issue rule metadata Issues in the rule metadata code (lib/rules)

Comments

@iamrafan
Copy link
Contributor

iamrafan commented Apr 29, 2021

When menuitem, menuitemcheckbox and menuitemradio are in a group that is not contained by a menu or menubar , the fix message(shown below) mentions group as one of the required parents though it is already a parent

Fix the following:
Required ARIA parents role not present: menu, menubar, group

Demo link: https://codepen.io/iamrafan/full/eYgaxrb

image

Product: axe-core

Expectation: Not suggest group as one of the required parents

Actual: The fix message mentions group as one of the required parents though it is already a parent


axe-core version: 4.2.0-canary.43394bc
axe-coconut: 4.8.6.11818 build 7ad6fe9b86
@straker
Copy link
Contributor

straker commented Apr 30, 2021

I see what you are saying, we definitely should clarify that. Thanks for letting us know.

@straker straker added the rule metadata Issues in the rule metadata code (lib/rules) label Apr 30, 2021
@clottman
Copy link
Contributor

@straker for this check, the rule metadata already is set to use whatever missingParents is (code for check result messages), but there's nothing in getMissingContext that I can see that filters out parent roles that do exist.

@padmavemulapati
Copy link

Validated with the latest axe-core develop branch code base,
Earlier for the aria-required-parent int he fix message, group appearing as one of the required parents though it is already a parent - as shown below:
image

Now group is not appearing as the required parent:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr A pr has been created for the issue rule metadata Issues in the rule metadata code (lib/rules)
Projects
None yet
Development

No branches or pull requests

5 participants