Prevent table heading text being announced twice#12763
Merged
Merged
Conversation
Chrome is referencing cell headers as their own header, which is causing the name of the header to be announced twice when navigating to it. This change checks if the header is referring to itself before adding the name of the header for the cell to the speech output.
See test results for failed build of commit 2897f53d80 |
This comment has been minimized.
This comment has been minimized.
seanbudd
approved these changes
Aug 25, 2021
seanbudd
left a comment
Member
There was a problem hiding this comment.
Thanks for your work here @mfairchild365, LGTM.
Member
|
Just so you know, I updated the PR description:
|
|
NVDA is still announcing table headers twice for tables viewed using NVDA 2023.1 and Chrome browser. How is this issue closed? |
Member
|
This is a pull request. Please open a new issue if you are experience a problem @bleeksstacy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Fixes #10840
Summary of the issue:
NVDA+Chromium browsers are announcing the name of table header cells twice when navigating directly to the header cell.
For example, NVDA was announcing a header like this "row 1 Subject column 1 Subject" where the name is announced twice.
Description of how this pull request fixes the issue:
Chrome is referencing cell headers as their own header, which is causing the name of the header to be announced twice when navigating to it directly.
This change checks if the header is referring to itself before adding the name of the header for the cell to the speech. output. If it is a self-reference, the name is not added to the speech output.
I'm confident that this PR fixes the issue, but I'm not as confident that this is the best fix. Feedback is more than welcome!
Now "row 1 Subject column 1 Subject" is announced as "row 1 column 1 Subject".
Since this is due to how Chrome is surfacing the header, it could be considered a bug in Chromium instead of NVDA. Why fix it here? Because it is low effort and makes NVDA more resilient if other browsers end up surfacing headers in a similar way in the future. Also, other screen readers such as JAWS handle this scenario well and don't announce the header name twice.
Testing strategy:
I added a system test for this case as part of this PR. I also manually tested several tables found in the wild in chrome and firefox.
Known issues with pull request:
Change log entries:
Bug fixes
Code Review Checklist: