Skip to content

AccessibilityBridge in Android needs to use BreakIterator instead of relying on regex for predicting cursor movements #175623

Open

Description

@ash2moon

Currently in the AccessibilityBridge we have some fragile hardcoded regexes that try to predict where the cursor should land next (see example).

Instead of relying on regex we should use BreakIterator so we do not have to maintain this code. For example, from JDK 19, a breaking change was introduced that resulted in having to skip the itCanPredictCursorMovementsWithGranularityWordUnicode test due to a change in how unicode characters were handled in word breaks.

Activity

  1. added theissue type on Sep 18, 2025
  2. added
    fyi-androidFor the attention of Android platform team
    fyi-accessibilityFor the attention of Framework Accessibility team
    P2Important issues not at the top of the work list
    on Sep 18, 2025
  3. added
    in triagePresently being triaged by the triage team
    platform-androidAndroid applications specifically
    engineflutter/engine related. See also e: labels.
    team-androidOwned by Android platform team
    and removed
    in triagePresently being triaged by the triage team
    on Sep 19, 2025
  4. flutter-triage-bot commented on Sep 19, 2025

    @flutter-triage-bot

    The fyi-android label is redundant with the team-android label.

  5. removed theissue type on Sep 19, 2025
  6. chunhtai commented on Sep 24, 2025

    @chunhtai
    Contributor

    This part of the code was added to support voice access text editing. I agree we should use a more standard library for text parsing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.engineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions