Closed Bug 1982985 Opened 1 year ago Closed 1 year ago

Voice Access: Selecting a range of text and moving the cursor before/after text is broken with UIA enabled

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox143 --- fixed
firefox144 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

(Whiteboard: [uiaShipBlocker])

Attachments

(2 external files)

STR:

  1. Turn on Windows Voice Access and ensure it is active.
  2. Open:
    data:text/html,<textarea>
  3. Focus the textarea.
  4. Say: "This is a test"
    • Observe: "This is a test" is entered into the text box.
  5. Say: "select is through test"
    • Expected: "is a test" should be selected.
    • Actual: Nothing happens. If you press a key, Voice Access reports "Sorry, something went wrong. Please try again."
  6. Say: "move before is"
    • Expected: The caret should move to the start of "is".
    • Actual: Nothing happens.

This works as expected if UIA is disabled.

Assignee: nobody → jteh

FindText walks the leaf segments of the range, gathers all the text and then searches that accumulated text for the requested string.
Previously, it included the full text of each leaf.
However, a range can start in the middle of a leaf.
This could result in a match being returned that was before the start of the origin range.
For example, if a textarea contained "This is a test" but the origin range encompassed "is a test", searching for "is" previously returned the "is" at offset 2 instead of the instance at offset 5.
This caused Windows Voice Access to get stuck in an infinite loop.
To fix this, only include the text spanned by the offsets of each segment.
This also requires that we adjust the matched offset accordingly if the match is in the origin start leaf.

Pushed by jteh@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/57480741d802 https://hg.mozilla.org/integration/autoland/rev/58b44fa0b259 UiaTextRange::FindText: Don't match text before the start of the range in the same leaf. r=eeejay
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch

FindText walks the leaf segments of the range, gathers all the text and then searches that accumulated text for the requested string.
Previously, it included the full text of each leaf.
However, a range can start in the middle of a leaf.
This could result in a match being returned that was before the start of the origin range.
For example, if a textarea contained "This is a test" but the origin range encompassed "is a test", searching for "is" previously returned the "is" at offset 2 instead of the instance at offset 5.
This caused Windows Voice Access to get stuck in an infinite loop.
To fix this, only include the text spanned by the offsets of each segment.
This also requires that we adjust the matched offset accordingly if the match is in the origin start leaf.

Original Revision: https://phabricator.services.mozilla.com/D261222

Attachment #9509425 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Users will be unable to select a range of text or move the cursor to specific pieces of text using Windows Voice Access.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: not applicable
  • Risk associated with taking this patch: low
  • Explanation of risk level: Changes isolated to a single accessibility method covered by automated tests.
  • String changes made/needed: none
  • Is Android affected?: no
Flags: in-testsuite+
Attachment #9509425 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: