Skip to content

Fix acc label expectations for td elements in display-contents-role-and-label.html #119

@nmlapre

Description

@nmlapre

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:

  1. 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.
  2. Otherwise use the title attribute.
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions