I have an R shiny dashboard and I am currently trying to fix accessibility issues flagged by the axe DevTools chrome extension, and I have been able to fix all the issues but one. The issue that I cannot resolve is flagged by a test that ensures ARIA attributes are allowed for an element's role. The problem is that the sidebarMenu's menuItems contain href elements that contain the aria-selected tag which is automatically set to true when the tab is selected or set to false when a different tab is selected. However, these elements should not have this type of tag, which is why it is failing the accessibility check. I have tried removing the tags and replacing it with aria-current manually using JS every time a menuItem is selected, since aria-current is allowed, but the aria-selected tag is added back automatically by the sidebarMenu code, so I am not able to remove it and fix the issue.
I have an R shiny dashboard and I am currently trying to fix accessibility issues flagged by the axe DevTools chrome extension, and I have been able to fix all the issues but one. The issue that I cannot resolve is flagged by a test that ensures ARIA attributes are allowed for an element's role. The problem is that the sidebarMenu's menuItems contain href elements that contain the
aria-selected
tag which is automatically set to true when the tab is selected or set to false when a different tab is selected. However, these elements should not have this type of tag, which is why it is failing the accessibility check. I have tried removing the tags and replacing it witharia-current
manually using JS every time a menuItem is selected, sincearia-current
is allowed, but thearia-selected
tag is added back automatically by the sidebarMenu code, so I am not able to remove it and fix the issue.