Closed Bug 1981794 Opened 1 year ago Closed 1 year ago

The location of the Text Cursor Indicator is not correctly positioned in blank text boxes all around the browser

Categories

(Core :: Disability Access APIs, defect)

Firefox 143
Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox141 --- unaffected
firefox142 --- unaffected
firefox143 --- wontfix
firefox144 --- verified

People

(Reporter: danibodea, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

(Whiteboard: [uiaFastFollow])

Attachments

(2 files, 1 external file, 1 obsolete file)

Note

  • When the Text Cursor Indicator is enabled in Windows and UIA is enabled in Firefox, when the user focuses a blank text box throughtout the browser, the TCI is not displayed in the position of the actual cursor.
  • Blank boxes cause a bunch of problems in different areas (all search boxes in “about” pages, in the profile name text box from the Profile Manager, in the Bookmarks/History/Downloads Manager search boxes, Report Broken Site window, etc. In most cases, the actual text cursor is displayed right after an icon or image, while the Text Cursor Indicator is displayed right at the left edge of the text box. In other cases where the text box is tall, half the TCI is displayed at the top left edge of the box, and the other half at the bottom.
  • This is only cosmetic, not a severe issue (S4).

Found in

  • Nightly v143.0a1

Affected versions

  • Nightly v143.0a1

Tested platforms

  • Affected platforms: Windows 10, Windows 11
  • Unaffected platforms: Mac, Linux

Steps to reproduce

  1. Enable Text Cursor Indicator in Windows
  2. Enable UIA in Firefox (default in Nightly 143)
  3. Load Preferences and focus the Search box

Expected result

  • The Text Cursor Indicator is displayed in the same position as the actual Text Cursor

Actual result

  • The Text Cursor Indicator is displayed in a different position than the actual Text Cursor.
  • The Text Cursor Indicator is displayed right at the left edge of the text box.

Regression range

  • This is not a regression, but an issue since the implementation of the UI Automation feature.

Additional notes

  • This issue only occurs in blang text boxes; if the user starts typing, the TCI will correctly display in the same position as the actual Text Cursor.
Has STR: --- → yes
OS: Unspecified → Windows
Hardware: Unspecified → Desktop
Summary: The location of the Texc Cursor Indicator is not correctly positioned in blank text boxes all around the browser → The location of the Text Cursor Indicator is not correctly positioned in blank text boxes all around the browser
Version: unspecified → Firefox 143
Blocks: 1981821
Blocks: uiatext

Thanks for testing and reporting. To clarify, does this only occur when UIA is enabled? That is, is the indicator displayed in the correct position in blank text boxes when UIA is disabled?

Flags: needinfo?(dbodea)

This only occurs with UIA enabled, because the Text Cursor Indicator is not displayed at all in blank text boxes around the browser when UIA is disabled. Please feel free to address this report however you see fit.

Severity: -- → S4
Flags: needinfo?(dbodea)
QA Whiteboard: [qa-found-in-n143] [S4]
Component: Disability Access → Disability Access APIs
Product: Firefox → Core
Depends on: 1979968

Previously, UIA had its own code to use the caret rect for the end of line insertion point or a line feed at the end of a textarea.
However, this didn't account for an empty text box.
To fix this, now that we have unified code in TextLeafRange to use the insertion point in all cases where it is necessary, use that instead of UIA specific code.
This involved moving the call to TextLeafPoint::InsertionPointBounds from TextLeafRange::Bounds to TextLeafRange::WalkLineRects, since UIA uses TextLeafRange::LineRects, not TextLeafRange::Bounds.

Assignee: nobody → jteh
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch

The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(jteh)

Morgan, would you mind testing this and bug 1981821 with latest Nightly? This is a little time sensitive, as I need to get this uplifted ASAP if we're to get it into the final beta for 143 on 5 September. Thanks.

Flags: needinfo?(jteh) → needinfo?(mreschenberg)

(In reply to James Teh [:Jamie] from comment #10)

Morgan, would you mind testing this and bug 1981821 with latest Nightly? This is a little time sensitive, as I need to get this uplifted ASAP if we're to get it into the final beta for 143 on 5 September. Thanks.

Hello! Sorry for the lag here -- this is fixed in 2025-09-04's nightly build. I tested the input field in about:preferences and the text cursor is placed appropriately within the input when focus lands there, it also moves correctly when you input text.

Flags: needinfo?(mreschenberg)

Thanks. I'm elevating this to s3 because I'm closing bug 1981821 as a duplicate, which is s3.

No longer blocks: 1981821
Duplicate of this bug: 1981821
Severity: S4 → S3

Previously, UIA had its own code to use the caret rect for the end of line insertion point or a line feed at the end of a textarea.
However, this didn't account for an empty text box.
To fix this, now that we have unified code in TextLeafRange to use the insertion point in all cases where it is necessary, use that instead of UIA specific code.
This involved moving the call to TextLeafPoint::InsertionPointBounds from TextLeafRange::Bounds to TextLeafRange::WalkLineRects, since UIA uses TextLeafRange::LineRects, not TextLeafRange::Bounds.

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

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

firefox-beta Uplift Approval Request

  • User impact if declined: Windows Text Cursor Indicator will appear in the wrong place in an empty text box.
  • 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: Isolated to a specific area of accessibility code which is well covered by multiple layers of testing.
  • String changes made/needed: none
  • Is Android affected?: no
Flags: in-testsuite+
Attachment #9511574 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9511574 - Attachment description: Bug 1981794: Always return insertion point bounds for a collapsed UIA text range. → Bug 1981794: Always return insertion point bounds for a collapsed UIA text range. r=eeejay
Flags: needinfo?(jteh)
Attachment #9511574 - Attachment is obsolete: true

I neglected to realise this depends on patches (bug 1979968) which only landed in 144. Those patches add quite a bit of code. I don't think the benefit here is worth the additional risk, so I'm abandoning this uplift request. Sorry for the churn.

Flags: needinfo?(jteh)
Whiteboard: [uiaFastFollow]--do_not_change--
Whiteboard: [uiaFastFollow]--do_not_change-- → [uiaFastFollow]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: