nvda icon indicating copy to clipboard operation
nvda copied to clipboard

Remove FakeEmbeddingTextInfo which is no longer necessary.

Open jcsteh opened this issue 5 days ago • 3 comments

Link to issue number:

None.

Summary of the issue:

ia2TextMozilla.FakeEmbeddingTextInfo was necessary when Firefox didn't support IAccessibleText on tables and table rows. However, that was fixed 6 years ago in Mozilla bug 1052866. Now, this NVDA code is never used.

Description of user facing changes

None. I have not included a change log entry because this is purely code cleanup and has no impact for users or add-on developers.

Description of development approach

Removed the code.

Note that this code mentions a hack for Mozilla bug 1169238. That hack couldn't have worked once Mozilla bug 1052866 was fixed because we never would have used FakeEmbeddingTextInfo after that. Regardless, Mozilla bug 1169238 was fixed over a year ago and that fix is available in all supported versions of Firefox.

Testing strategy:

Test case: data:text/html,<button>Before</button><div contentEditable="true">foo<table><tr><th>1</th><td>2</td></tr></table>bar</div>

In both Firefox and Chrome (results the same before and after this PR):

  1. Opened the test case.
  2. Focused the editor.
  3. Pressed control+a. Verified that NVDA reported "foo 12 bar selected".
  4. Selected just the last "o" and "1". Used NVDA's report selection command and verified that NVDA reported "o 1 selected".
  5. Selected just "1" and "2". Used NVDA's report selection command and verified that NVDA reported "12 selected".
  6. Selected just "2" and "b". Used NVDA's report selection command and verified that NVDA reported "2 b" selected.

Known issues with pull request:

None.

Code Review Checklist:

  • [x] Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • [x] Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • [x] UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • [ ] API is compatible with existing add-ons.
  • [x] Security precautions taken.

Summary by CodeRabbit

  • Refactor
    • Improved internal text handling by removing the FakeEmbeddingTextInfo class and updating related methods for more efficient processing.

jcsteh avatar Jun 29 '24 03:06 jcsteh