TalkBack cannot announce column header when unordered list is in table

Viewed 11

We have a pet table. We implement pet names as unordered list:

<table>
    <caption>Pets</caption>
    <thead>
      <tr>
          <th>owner</th>
          <th>pets</th>
      </tr>
    </thead>

    <tbody>
    <tr>
        <td>Amy</td>
        <td>
            <ul>
              <li>Piggy</li>
              <li>Tracy</li>
            </ul>
        </td>
    </tr>
    </tbody>
</table>

However when navigating the table, TalkBack are unable to announce the row id and the column header "Amy, row one, owner", just announce the content "Amy".

Change the unordered list to spans, the screen readers announce normally:

<table>
    <caption>Pets</caption>
    <thead>
      <tr>
          <th>owner</th>
          <th>pets</th>
      </tr>
    </thead>

    <tbody>
    <tr>
        <td>Amy</td>
        <td>
            <span>Piggy</span>
            <span>Tracy</span>
        </td>
    </tr>
    </tbody>
</table>

Should we prevent from unordered lists in table cells? Or is it a bug of TalkBack?

0 Answers
Related