So I have this navigation bar with the following structure:
I am following the same structure that is present in https://www.w3.org/WAI/ARIA/apg/patterns/menubar/examples/menubar-navigation/ (standard for accessibility)
However when I run Axe devtools it throws the following errors:
Certain Aria roles must contain particular children
- Ensures elements with an ARIA role that require child roles contain them
- To solve this problem, you need to fix at least (1) of the following: - Element has children which are not allowed: [role=none] - Element uses aria-busy="true" while showing a loader
Certain aria roles must be contained by particular parents (showing the error for span element)
- Ensures elements with an ARIA role that require parent roles are contained by them
- Required ARIA parents role not present: menu, menubar, group
- Ensures elements with an ARIA role that require parent roles are contained by them
When I run axe devtools in w3.org site it throws no such error. I am not able to understand where I am going wrong. I am following the same semantic structure as mentioned in the site. The only difference I can see that I have a span element. Is that's what's causing the issue? And why is role none not allowed when its the same in w3.org site. I am not able to find much info in this topic. Any inputs will be highly appreciated.