You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Accessibility module currently allows for a aria-roledescription attribute on the slider container via the containerRoleDescriptionMessage option, but there is no support for setting a role to the same container.
Ensure aria-roledescription is only used on elements with an implicit or explicit role. Success criteria 4.1.2
Suggested solution
Add a containerRole parameter to the Accessibility module so we can set the proper role (region) when setting the containerRoleDescriptionMessage option.
Providing users an ability to set an aria-roledescription without an aria role is an accessibility error.
What does it do?
Adding this would allow Swiper to be more accessible.
What is it for?
Better accessibility.
What does it fix?
The accessibility error of having an aria-roledescription without a proper role.
Why you can't just add aria-role with "hands" to HTML element?
For the same reason you provide containerRoleDescriptionMessage in the first place: we don't always have direct control over the markup.
Clearly describe the issue including steps to reproduce when it is a bug.
Make sure you fill in the earliest version that you know has the issue.
Provide live link or JSFiddle/Codepen or website with isssue
This is on all versions, it's a new feature being added, not a code bug to reproduce. The w3 guidelines for this are linked above.
Clear and concise description of the problem
The Accessibility module currently allows for a aria-roledescription attribute on the slider container via the containerRoleDescriptionMessage option, but there is no support for setting a role to the same container.
As per https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription, this is a violation of best practices, and my a11y auditors have flagged it as an issue to be fixed.
Ensure aria-roledescription is only used on elements with an implicit or explicit role. Success criteria 4.1.2
Suggested solution
Add a containerRole parameter to the Accessibility module so we can set the proper role (region) when setting the containerRoleDescriptionMessage option.
Additional context
Answers for @nolimits4web
What is the issue?
Providing users an ability to set an aria-roledescription without an aria role is an accessibility error.
What does it do?
Adding this would allow Swiper to be more accessible.
What is it for?
Better accessibility.
What does it fix?
The accessibility error of having an aria-roledescription without a proper role.
Why you can't just add aria-role with "hands" to HTML element?
For the same reason you provide
containerRoleDescriptionMessage
in the first place: we don't always have direct control over the markup.This is on all versions, it's a new feature being added, not a code bug to reproduce. The w3 guidelines for this are linked above.
Validations
Would you like to open a PR for this feature?
The text was updated successfully, but these errors were encountered: