-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Table accessibility issues #606
Comments
Want to submit a PR?
…On Mar 4, 2017 12:03 AM, "Jackie Chen" ***@***.***> wrote:
There are a few issues with the aria roles on the current table
implementation:
- role="grid" should be an attribute on the table element instead of
the inner grid
- all table rows (including the header row) should have role="row"
even if they don't have event handlers like onRowClick
See aria documentation <https://www.w3.org/TR/wai-aria/roles#grid> for
more details. Elements with role="grid" require descendants with
role="row", and elements with role="rowheader" require an ancestor with
role="row" which requires an ancestor with role="grid".
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#606>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AABzna-nD3yxjenVvdUzE8XkbCUytE9Kks5riRrlgaJpZM4MTBEn>
.
|
Move role="grid" from the inner grid to the table and add role="row" to all table rows. Fixes bvaughn#606.
I think you mean to say that elements with role="row" require an ancestor with role="grid" ? I also wonder if it would be appropriate to set role for a |
Thanks for taking the time to educate me on the incorrect use of roles in this case. I really appreciate the PR! I just merged it, with the small addition of adding |
Re: your comment about Thanks for the quick review and |
Is there a way how to not add these attributes? You have it wrong and even if that was implemented correctly it's not always what you want, which is our case. Role grid must be sued only when it's a data grid with implemented keyboard navigation. Using such roles without implementing the rest hurts the accessibility. I strongly suggest removal of the role grid and I would like to know the motivation behind adding it. This is how to use it properly and believe me, that's not what you wan't in many cases. |
There are a few issues with the aria roles on the current table implementation:
role="grid"
should be an attribute on the table element instead of the inner gridrole="row"
even if they don't have event handlers likeonRowClick
See aria documentation for more details. Elements with
role="grid"
require descendants withrole="row"
, and elements withrole="rowheader"
require an ancestor withrole="row"
which requires an ancestor withrole="grid"
.The text was updated successfully, but these errors were encountered: