Closed Bug 2040352 Opened 6 months ago Closed 5 months ago

[a11y] Accessibility support of complex IME physical keyboard typing

Categories

(Firefox for Android :: Tooling, enhancement, P1)

All
Android
enhancement

Tracking

()

RESOLVED FIXED
153 Branch
Accessibility Severity s2
Tracking Status
firefox153 --- fixed

People

(Reporter: mcarare, Assigned: mcarare)

References

Details

(Whiteboard: [fxdroid][group6] )

Attachments

(1 external file)

References:
Android 17 Behavior Changes: Accessibility support of complex IME physical keyboard typing
AccessibilityEvent.setTextChangeTypes(int)
TextAttribute.isTextSuggestionSelected()

Android 17 (API 37) introduces new AccessibilityEvent and TextAttribute APIs to enhance screen reader spoken feedback, particularly for CJKV (Chinese, Japanese, Korean, Vietnamese) language input. These changes allow apps to signal the nature of a text change—specifically whether it is part of an ongoing composition, a finalized commit, or the result of a specific conversion suggestion being selected.
While standard TextView components handle these signals automatically when targeting Android 17, apps that maintain a custom InputConnection are required to manually adopt these behaviors to maintain parity.

Currently, InlineAutocompleteEditText uses a custom InputConnectionWrapper to handle its autocomplete logic. Because it overrides the input connection, it does not automatically benefit from the platform's default handling.

The current behaviour needs to be updated to:

  1. Process the TextAttribute provided in commitText and setComposingText.
  2. Signal the appropriate text change types (e.g., TEXT_CHANGE_TYPE_IN_COMPOSITION, TEXT_CHANGE_TYPE_COMMITTED_BY_IME) when dispatching TYPE_VIEW_TEXT_CHANGED accessibility events.

Marking access-s2 because it sounds like using a custom wrapper without explicit implementation handling prevents some ATs from functioning

Accessibility Severity: --- → s2
  • Overrode commitText and setComposingText in the InputConnection wrapper to support the TextAttribute parameter introduced in Android 15 (API 35).
  • Implemented tracking of pendingTextChangeTypes to capture specific IME actions, such as text composition and conversion suggestion selection.
  • Updated sendAccessibilityEventUnchecked to populate AccessibilityEvent.textChangeTypes for TYPE_VIEW_TEXT_CHANGED events on API 37 and above.
  • Ensured existing autocomplete removal logic is preserved within the new InputConnection method overrides.
Pushed by mcarare@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3bb816c59cef https://hg.mozilla.org/integration/autoland/rev/e673d0dd76c1 Update InlineAutocompleteEditText to support IME text attributes and accessibility text change types r=android-reviewers,pollymce
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: