Are aria roles now redundant in react table v7 #2723
Replies: 1 comment 2 replies
-
Not all tables are built with table elements. Eg div tables.
Tanner Linsley
…On Sep 11, 2020, 11:00 AM -0700, Shane McCoy ***@***.***>, wrote:
A discussion recently came up while using react table v7.
There was a shift from using div's to semantic html - great for accessibility and readability. v7 still adds aria-roles to these elements though.
<table role="table"></table>
Per W3 guidelines
> It is NOT RECOMMENDED for web developers to set the ARIA role and aria-* attributes to values that match the implicit ARIA semantics defined in the table. Doing so is unnecessary and can potentially lead to unintended consequences.
Elements table, tr, th etc are included in the table referenced in above quote.
I have not experienced any unintended consequences and have not found any reports about issues in relation to this.
My preference is to not write code to strip out the roles in v7 either.
Is there a reason roles have remained with semantic html?
If there is a reason I would like to hear about it and if not, we can remove the redundant roles.
Best,
Shane
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
scmccoy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A discussion recently came up while using react table v7. (edited)
There was a shift from using div's to allowing semantic html - great for accessibility and readability. v7 still adds aria-roles to these elements though.
<table role="table"></table>
Per W3 guidelines
Elements
table
,tr
,th
etc are included in the table referenced in above quote.I have not experienced any unintended consequences and have not found any reports about issues in relation to this.
Our preference is to use semantic html but not have to strip out the
roles
if they cause issues for users.Is there a reason
roles
have remained with semantic html?If there is a reason I would like to hear about it and if not, we can maybe make the redundant
roles
optional.Best,
Shane
Beta Was this translation helpful? Give feedback.
All reactions