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
Primeface's data tables is labeling table-headers (<th>) with role="columnheader" and table-rows (<tr>) with role="row".
Both annotations result in warnings and even errors by the NU-HTML-Checker
From the NU HTML Check result of the showcase
Error: The role attribute must not be used on a tr element which has a table ancestor with no role attribute, or with a role attribute whose value is table, grid, or treegrid.
Warning: The row role is unnecessary for element tr.
Error: The role attribute must not be used on a th element which has a table ancestor with no role attribute, or with a role attribute whose value is table, grid, or treegrid.
Warning: The columnheader role is unnecessary for element th.
According to the accessibility (test) team at our work the annotations are also not needed for screenreader users, because the underlying elements (here <th> and <tr>) clearly indicate what kind of element was rendered. The individual roles are only needed if you use e.g. a div as a button.
If they are set, when not needed it might turn bad as some screenreaders might pick the addional annotation and may read out them to the user.
Describe the solution you would like
Remove the role attributs on table-headers and table-rows.
Additional context
The same was already done for other HTML elements with clear purpose, like button (#8481) or textinput (#8467) (and others).
The text was updated successfully, but these errors were encountered:
This commit removes the "role"-attribute on every element which are
written as HTML table-row (tr) or table-header (tr) elements.
It's not removed on those where the header row is not rendered as such.
closesprimefaces#9261
This commit removes the "role"-attribute on every element which are
written as HTML table-row (tr) or table-header (tr) elements.
It's not removed on those where the header row is not rendered as such.
closes#9261
Description
Primeface's data tables is labeling table-headers (
<th>
) withrole="columnheader"
and table-rows (<tr>
) withrole="row"
.Both annotations result in warnings and even errors by the NU-HTML-Checker
From the NU HTML Check result of the showcase
According to the accessibility (test) team at our work the annotations are also not needed for screenreader users, because the underlying elements (here
<th>
and<tr>
) clearly indicate what kind of element was rendered. The individual roles are only needed if you use e.g. a div as a button.If they are set, when not needed it might turn bad as some screenreaders might pick the addional annotation and may read out them to the user.
Describe the solution you would like
Remove the role attributs on table-headers and table-rows.
Additional context
The same was already done for other HTML elements with clear purpose, like
button
(#8481) ortext
input (#8467) (and others).The text was updated successfully, but these errors were encountered: