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

Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions. #62

Closed
danderson421 opened this issue Jun 28, 2023 · 6 comments
Labels
accessibility This issue involves accessibility bug Something isn't working

Comments

@danderson421
Copy link

Lighthouse reports new error:

Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions.

What are the steps to reproduce this issue?

  1. Go to https://mandrasch.github.io/accessible-menu-bootstrap-examples/bs5-examples/
  2. Run Lighthouse
  3. See error

image

@danderson421 danderson421 added the bug Something isn't working label Jun 28, 2023
@danderson421
Copy link
Author

.dropdown-menu should probably be role="group" instead of a menubar within a menubar, but I'm not expert.

I believe the issue is that there is a menubar within a menubar when using a dropdown menu

@NickDJM NickDJM added the accessibility This issue involves accessibility label Jun 29, 2023
@NickDJM
Copy link
Owner

NickDJM commented Jun 29, 2023

@danderson421 yup, that's definitely a bug!

Submenus should be role "menu". This is probably an upstream issue, so we'll fix it in accessible-menu and that it'll update here as well.

https://www.w3.org/WAI/ARIA/apg/patterns/menubar/examples/menubar-navigation/

@NickDJM
Copy link
Owner

NickDJM commented Jun 29, 2023

I have the changes pushed up in MRs which I'll merge in shortly and get releases for 3.x and 4.x out.

Here are some screenshots of lighthouse/axe/wave tests with the fix applied (using the demo site in 4.x).

Lighthouse

Screenshot from 2023-06-29 11-15-04

Axe

Screenshot from 2023-06-29 11-15-18

Wave

Screenshot from 2023-06-29 11-17-21

@NickDJM
Copy link
Owner

NickDJM commented Jun 29, 2023

It's probably also worth looking into automated lighthouse tests so prevent these kinds of bugs in the future. I'll need to look into that.

NickDJM added a commit to NickDJM/accessible-menu that referenced this issue Jun 29, 2023
NickDJM added a commit to NickDJM/accessible-menu that referenced this issue Jun 29, 2023
NickDJM added a commit that referenced this issue Jun 29, 2023
This is to resolve issues with menubar submenu roles

See #62
NickDJM added a commit that referenced this issue Jun 29, 2023
This is to fix menubar submenu roles

See #62
NickDJM added a commit to NickDJM/accessible-menu-bootstrap-4 that referenced this issue Jun 29, 2023
NickDJM added a commit to NickDJM/accessible-menu-bootstrap-4 that referenced this issue Jun 29, 2023
@danderson421
Copy link
Author

Thanks! Love the script.

@NickDJM
Copy link
Owner

NickDJM commented Jun 30, 2023

@danderson421 Glad to hear it!

This change is now captured in v1.0.3 (and also in the latest releases of the beta, main accessible-menu project, and the bs4 version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility This issue involves accessibility bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants