Skip to content

Unexpected behavior with table and container navigation for nested tables #7382

@LeonarddeR

Description

@LeonarddeR

I've seen the case below in a corporate environment. I agree it isn't common style of coding.

Steps to reproduce:

  1. Execute the following from a Firefox location bar:

    data:text/html, <p>Prepare for a table</p><table><tr><th>Header 1</th><th>Header 2</th></tr><tr><td>Outer table cell 1</td><td>Outer table cell 2</td></tr><tr><td><table><tr><td>Inner table cell 1</td><td>Inner table cell 2</td></tr></table></td><td>Outer table cell 4</td></tr><tr><td>Outer table cell 5</td><td>Outer table cell 6</td></tr></table>
    
  2. Use table navigation inside the table. Everything works fine, until you reach outer table cell 3, which consists of a table itself with two cells.

Expected behavior:

A. When in the inner table, pressing comma moves you out of it to outer table cell 4
B. Table navigation doesn't get trapped into the inner table as soon as you are in it.

Actual behavior:

A. When in the inner table, pressing comma moves you out of it to outer table cell 6, so the bottom of the outer table
B. Table navigation gets trapped into the inner table as soon as you are in it.

Technical details

The outer table is treated as a content table, the inner table is treated as a layout table. This is why pressing comma in the inner table moves you to the edge of the outer table, since layout tables aren't treated as containers. If you enable "Include layout tables" in browse mode settings, issue A goes away.

Points to discuss:

At least there is an inconsistency here, as table nav works for layout tables, but they aren't treated as containers.

  • Should we disable table navigation altogether for layout tables inside content tables? I think we should consider this. May be we should even disable table navigation in all layout tables
  • If the former is too much, how about treating layout tables as containers, so if you get trapped with table nav, you can navigate out of the container to the outer table?

Metadata

Metadata

Labels

p3https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions