Prevent table heading text being announced twice (#12763)
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.
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.
Testing strategy:
System tests added and updated, manual testing was performed on Chrome and Firefox