Fix handling of table cells without a containing table in browse mode. #8887
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to issue number:
None.
Summary of the issue:
When using browse mode quick navigation to move to anything inside a message body in the new Gmail, the entire message body is reported after the element to which you just navigated.
Description of how this pull request fixes the issue:
In the new Gmail, message bodies are contained within a "gridcell" which does not have a containing grid. The gridcell's name is the entire body of the message. When using quick navigation to move to anything inside these "cells", NVDA reports information about the cell, including its name, after the element to which you just navigated.
To fix this, cells outside of tables are now treated as layout.
Having a gridcell outside of a grid is authoring error, violates the ARIA spec and really should be fixed by Gmail. (I've reported it to Google already.) However, it doesn't hurt us to handle this more gracefully and thus mitigate user pain in the interim.
Testing performed:
All tests performed in Firefox.
Tested that navigating to a link in a Gmail message body no longer reports the entire message body afterwards.
With this test case:
data:text/html,<div role="cell" aria-label="unwanted">foo<h1>bar</h1></div>
verified that quick navigating to the heading with "h" does not report "unwanted cell" after the heading.
With this test case:
data:text/html,<table><tr><th>foo<h1>bar</h1></th><td>baz</td></tr></table>
verified that quick navigating to the heading still just reports the heading, and that the column number is still reported when using the cursor keys and column navigation commands to move between cells.
With this test case:
data:text/html,<table><tr><td>foo<h1>bar</h1></td><td>baz</td></tr></table>
verified that quick navigating to the heading still just reports the heading. Verified that with include layout tables disabled (default), no table coordinates are reported. Verified that with include layout tables enabled, verified that the column number is still reported when using the cursor keys and column navigation commands to move between cells.
Known issues with pull request:
None.
Change log entry:
Section: Bug Fixes
- In the new Gmail, when using quick navigation inside messages while reading them, the entire body of the message is no longer reported after the element to which you just navigated.