-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Clean up redundant ARIA roles #2212
Comments
@metamoni Thanks for performing this audit of our
|
I would be careful with removing some of these. Let's definitely revalidate as some of these may no longer be needed, but most of these likely served a purpose at some point. ..Most times that purpose is catering to VO in safari losing context resulting from certain CSS styles. For example, when we set For tables, we change the display from |
@svinkle and @menigk-shopify can you help us out here? Which ones of these are safe to remove? |
All that said, it's been a good year or more since these were implemented. Feel free to test to verify these are still required. |
@metamoni Where is this being output? |
@svinkle in the |
@metamoni Swapping the element to |
There are several places in the codebase where we're using ARIA roles on semantic HTML elements that already have that implicit role. This is bad practice and we should stop doing it going forward.
See W3C author requirements
We should clean up the codebase and remove all redundant ARIA roles. This can be done in multiple PRs and we can handle each role at a time:
role="main"
onmain
role="navigation"
onnav
role="rowheader"
ontd
, which is improperly used. If we want the purpose of this to be a table header, then we should useth
insteadFor the following, further investigation is needed across different browsers/screen readers, before removing. See comments below for further details about why these were implented.
role="list"
onul
orol
role="table"
ontable
role="rowgroup"
ontbody
,tfoot
,thead
role="cell"
ontd
role="columnheader"
onth
role="row"
ontr
The text was updated successfully, but these errors were encountered: