DetailsList uses ARIA attributes that are not allowed by the role
Bug Report
Describe the issue:
There are few cases where the DetailsList component breaks common accessibility patterns. These were found by Keros. (If these are exceptions you have decided to make intentionally and the component is still accessible, I am also fine with it)
- Roles "grid" and "gridcell" don't allow certain ARIA attributes that DetailsList uses.
- Sometimes aria-describedby is added with an id that doesn't exist.
Actual behavior:
Example snippet 1 (DOM):
<div role="grid" aria-label="This is a custom aria label for grid" aria-rowcount="11" aria-colcount="6" aria-readonly="true"></div>
Example snippet 2 (DOM):
<div role="gridcell" aria-colindex="0" class="ms-DetailsRow-cell cell_1da72bd0 my-cell" data-automationid="DetailsRowCell" data-automation-key="name" style="width: 516px;"></div>
Example snippet 3 (DOM):
<span class="ms-DetailsHeader-cellTitle cellTitle_dfd65359" data-is-focusable="true" role="button" aria-describedby="header9-headerName-tooltip" tabindex="0"></span>
Expected behavior:
Example 1: ARIA attributes are not allowed: aria-rowcount="11" aria-colcount="6"
Example 2: ARIA attribute is not allowed: aria-colindex="0"
Example 3: Invalid ARIA attribute value: aria-describedby="header9-headerName-tooltip" (I believe "header9-headerName-tooltip" doesn't exist.)
The violation described in Example 3 can be worked around by specifying an ariaLabel for each column, but it would be better for the details header code to not emit the aria-describedby attribute at DetailsHeader.tsx@260 if it's not going to emit the label at DetailsHeader.tsx@301 and there is no onRenderColumnHeaderTooltip override.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!
This issue has been automatically closed because it has not had recent activity after being marked as stale. If you belive this issue is still a problem or should be reopened, please reopen it! Thank you for your contributions to Fabric React! Why am I receiving this notification?