Sidebar : Combination of role 'complementary' and aria-modal attribute causes accessibility violation. #14818
Labels
Component: Accessibility
Issue or pull request is related to WCAG or ARIA
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Describe the bug
Currently the role for the prime ng sidebar is set as 'complementary' (not configurable but hardcoded in library [Pic-1]) which is correct for a sidebar panel but due to aria-modal attribute being present in the element we are getting accessibility violation (Pic-2).
As per the aria-modal description, it is only recommended for role values like 'dialog' and 'alertdialog' (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-modal)
We would ideally want the sidebar to have role 'complementary' with overlay mask behind the sidebar and the aria-modal attribute not present at all (even a value 'false' will result in accessibility violation) in the HTML element.
Otherwise if you are planning to make the [attr.role] as configurable then we will also need to give ability to add [attr.aria-label] for avoiding further accessibility violations.
[Pic-1]
[Pic-2]
Environment
OS: Windows 10
Reproducer
No response
Angular version
16.2.10
PrimeNG version
16.5.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.16.0
Browser(s)
Chrome, Edge
Steps to reproduce the behavior
[Pic-1]
[Pic-2]
[Pic-3]
Expected behavior
The text was updated successfully, but these errors were encountered: