Some tests in display-contents-role-and-label.html have markup of the form:
<tr style="display: contents;">
<td data-expectedrole="cell" data-expectedlabel="x" class="ex-role-and-label">x</td>
</tr>
I think the expected label ("x") doesn't match spec expectations. Section 4.1.12 of the HTML-AAM spec has the following rules for tr, td, and th elements:
- If the element has an aria-label or an aria-labelledby attribute the accessible name is to be calculated using the algorithm defined in Accessible Name and Description: Computation and API Mappings.
- Otherwise use the title attribute.
- If none of the above yield a usable text string there is no accessible name.
These tests don't have aria-label or aria-labelledby and don't have titles, so I think they should have no accessible name.
To fix these tests, we could either change the classes to .ex-role, or change to data-expectedlabel="".
Tests in question:
- Label: td as child of tr with display: contents, within table with display: flex, has cell role
- Label: td as child of tr with display: contents, within table with role=table with display: flex, has cell role
- Label: td (no explicit role) as child of tr with display: contents, within table with role=grid with display: flex, has gridcell role
- Label: td within tr in table with role table, all with display: contents, has cell role
- Label: td within table with role grid, both with display: contents, has gridcell role
Some tests in display-contents-role-and-label.html have markup of the form:
I think the expected label ("x") doesn't match spec expectations. Section 4.1.12 of the HTML-AAM spec has the following rules for
tr,td, andthelements:These tests don't have aria-label or aria-labelledby and don't have titles, so I think they should have no accessible name.
To fix these tests, we could either change the classes to
.ex-role, or change todata-expectedlabel="".Tests in question: