Skip to content

[a11y] Map some framework semantics roles to android classes. #185217

Merged
auto-submit[bot] merged 11 commits into
flutter:masterfrom
hannah-hyj:android-spinner
Jun 15, 2026
Merged

[a11y] Map some framework semantics roles to android classes. #185217
auto-submit[bot] merged 11 commits into
flutter:masterfrom
hannah-hyj:android-spinner

Conversation

@hannah-hyj

@hannah-hyj hannah-hyj commented Apr 17, 2026

Copy link
Copy Markdown
Member

In #183897 I added semantics roles in [AccessibilityBridge.java], I found some other current semantics roles can be mapped to android classes.

There are some other android classes in AccessibilityBridge.java are currently set by flags instead of by roles. example: we use "isSlider" instead of slider role. we will need to add a slider role for it : #184029.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@hannah-hyj hannah-hyj requested a review from a team as a code owner April 17, 2026 19:57
@hannah-hyj hannah-hyj requested a review from chunhtai April 17, 2026 19:57
@github-actions github-actions Bot added platform-android Android applications specifically engine flutter/engine related. See also e: labels. team-android Owned by Android platform team labels Apr 17, 2026
@hannah-hyj hannah-hyj added the CICD Run CI/CD label Apr 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the AccessibilityBridge to map COMBO_BOX, LIST, and RADIO_GROUP semantics roles to their corresponding Android widget class names and adds unit tests for these mappings. Feedback suggests setting canOpenPopup for combo boxes, adding a mapping for the GRID role, and replacing magic numbers in tests with named constants to improve readability.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 17, 2026
@hannah-hyj hannah-hyj added the CICD Run CI/CD label Apr 17, 2026
case COMBO_BOX:
case MENU:
result.setClassName("android.widget.Spinner");
result.setCanOpenPopup(true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current android a11ybridge makes me slightly worry about scalability, the set* property calls on ANI are all over the places in this giant createANI method, and some guarded by one-off if condition.

If we were to start handling roles. I suggest we do something like web engine's role system where we use inheritance or semantics behavior to add these property calls

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, I did some refactoring to extract roles and behaviors out of the giant createANI method

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 23, 2026
@hannah-hyj hannah-hyj added the CICD Run CI/CD label Apr 23, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 23, 2026
@hannah-hyj hannah-hyj added the CICD Run CI/CD label Apr 23, 2026
@reidbaker reidbaker requested review from reidbaker and removed request for a team April 28, 2026 21:10
@hannah-hyj hannah-hyj requested a review from chunhtai April 30, 2026 03:44
result.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD);
}
}
new ScrollableBehavior().configure(result, semanticsNode);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For those that will assign class name they should be run as one of the "role" configure.

Maybe create a generic AccessibilityNodeConfigurator for SemanticsRole.none and do old behavior where fallback to using semantics property to determine checkbox/listview/seekbar... etc

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the code to use a generic AccessibilityNodeConfigurator for SemanticsRole.none with all fallback behaviors

@github-actions github-actions Bot removed the CICD Run CI/CD label May 7, 2026
@hannah-hyj hannah-hyj requested a review from chunhtai May 7, 2026 20:14
chunhtai
chunhtai previously approved these changes May 8, 2026

@chunhtai chunhtai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just some minor suggestions

*/
public static class GenericRoleConfigurator implements AccessibilityNodeConfigurator {
@Override
public void configure(AccessibilityNodeInfo result, SemanticsNode node) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider breaking this method up with a bit more helper method, for example scrollable class and textfield class should probably be split into a helper method

@@ -3313,6 +2878,420 @@ private CharSequence getTextFieldHint() {
}
}

public interface AccessibilityNodeConfigurator {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be willing to break the clases and interfaces out into their own files possibly in a new folder? The file is quite large.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
}

if (Build.VERSION.SDK_INT >= API_LEVELS.API_36) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like on line 3126 can you add a comment explaining why you need to check api level?

} else {
result.setClassName("android.widget.CheckBox");
}
// Starting on API level 36, setChecked takes int instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider breaking out setChecked to a method to use here and directly below where it looks like you do something similar for android.widget.Switch

@github-actions github-actions Bot removed the CICD Run CI/CD label May 27, 2026
@hannah-hyj hannah-hyj requested a review from reidbaker May 27, 2026 20:11
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 27, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 15, 2026
@hannah-hyj hannah-hyj added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Jun 15, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Jun 15, 2026
Merged via the queue into flutter:master with commit bb5cc62 Jun 15, 2026
204 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 15, 2026
@cbracken

Copy link
Copy Markdown
Member

Reason for revert: triggers test failures in android_semantics_integration_test

Speifically dev/integration_tests/android_semantics_testing/integration_test/main_test.dart

To be clear, it looks like the fix itself is good but the tests have not been updated to test the corrected behaviour. Reverting to get the tree green but I think all that needs doing is updating the tests.

AccessibilityBridge TextField TextField has correct Android semantics

The test expects the paste action to be present, but it is missing from the actual node.

Expected: AndroidSemanticsNode with className: android.widget.EditText with actions:
[AndroidSemanticsAction.click, AndroidSemanticsAction.paste, AndroidSemanticsAction.setSelection,
AndroidSemanticsAction.setText] ...
  Actual: AndroidSemanticsNode:<{... actions: [128, 131072, 2097152, 16]}>
   Which: Expected actions: [AndroidSemanticsAction.click, AndroidSemanticsAction.paste,
AndroidSemanticsAction.setSelection, AndroidSemanticsAction.setText]
          Actual actions: [AndroidSemanticsAction.click, AndroidSemanticsAction.setSelection,
AndroidSemanticsAction.setText]
          Unexpected: {}
          Missing: {AndroidSemanticsAction.paste}

AccessibilityBridge Popup Controls Popup Menu has correct Android semantics

The test expects a generic Button but the PR exposes it as a MenuItem.

Expected: AndroidSemanticsNode with className: android.widget.Button with actions:
[AndroidSemanticsAction.click] ...
  Actual: AndroidSemanticsNode:<{... className: android.view.MenuItem, liveRegion: 0, id: 25, text: null, actions: [64, 16]}>
   Which: Expected className: android.widget.Button
Popup Item 1 doesn't have the right semantics

AccessibilityBridge Popup Controls Dropdown Menu has correct Android semantics
Identical failure to the Popup Menu test.

Expected: AndroidSemanticsNode with className: android.widget.Button with actions:
[AndroidSemanticsAction.click] ...
  Actual: AndroidSemanticsNode:<{... className: android.view.MenuItem, liveRegion: 0, id: 25, text: null, actions: [128, 16]}>
   Which: Expected className: android.widget.Button
Dropdown Item 1 doesn't have the right semantics

@cbracken cbracken added the revert Autorevert PR (with "Reason for revert:" comment) label Jun 15, 2026
@cbracken

Copy link
Copy Markdown
Member

@hannah-hyj sorry for the revert! The patch itself looks like it's doing the right thing; it looks like it's the tests that need fixing.

@auto-submit auto-submit Bot removed the revert Autorevert PR (with "Reason for revert:" comment) label Jun 15, 2026
@cbracken

cbracken commented Jun 15, 2026

Copy link
Copy Markdown
Member

fwiw here's what gemini claims is what's needed to fix the test. I didn't patch locally so take it with a grain of salt but at least, to me, it looks roughly like what I'd expect and consistent with your change.

--- a/dev/integration_tests/android_semantics_testing/integration_test/main_test.dart
+++ b/dev/integration_tests/android_semantics_testing/integration_test/main_test.dart
@@ -106,7 +106,6 @@
         actions: <AndroidSemanticsAction>[
           AndroidSemanticsAction.click,
-          AndroidSemanticsAction.paste,
           AndroidSemanticsAction.setSelection,
           AndroidSemanticsAction.setText,
         ],
@@ -393,7 +392,7 @@
       final int id = app.getSemanticsId(find.text('Item 1'));
       expect(
         app.getSemanticsNode(id),
         matchesSemantics(
-          className: 'android.widget.Button',
+          className: 'android.view.MenuItem',
           isFocusable: true,
           actions: <AndroidSemanticsAction>[
@@ -459,7 +458,7 @@
       final int id = app.getSemanticsId(find.text('Item 1'));
       expect(
         app.getSemanticsNode(id),
         matchesSemantics(
-          className: 'android.widget.Button',
+          className: 'android.view.MenuItem',
           isFocusable: true,
           actions: <AndroidSemanticsAction>[

pull Bot pushed a commit to Spencerx/flutter that referenced this pull request Jun 15, 2026
flutter#185217)" (flutter#188008)

<!-- start_original_pr_link -->
Reverts: flutter#185217
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: cbracken
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: triggers test failures in
android_semantics_integration_test

Speifically
`dev/integration_tests/android_semantics_testing/integration_test/main_test.dart`

To be clear, it looks like the fix itself is good but the tests have not
been updated to test the corrected behaviour. Reverting to get the tree
green but I think all that needs doing is updating the tests.

`AccessibilityBridge TextFiel
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: hannah-hyj
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {chunhtai, reidbaker}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
In flutter#183897 I added semantics
roles in [AccessibilityBridge.java], I found some other current
semantics roles can be mapped to android classes.

There are some other android classes in AccessibilityBridge.java are
currently set by flags instead of by roles. example: we use "isSlider"
instead of slider role. we will need to add a slider role for it :
flutter#184029.



## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 15, 2026
Roll Flutter from b7cb925419e6 to 5827d5fd2b8d (35 revisions)

flutter/flutter@b7cb925...5827d5f

2026-06-15 engine-flutter-autoroll@skia.org Roll Skia from 7128af60575a to c8d9f80f13e4 (1 revision) (flutter/flutter#188015)
2026-06-15 jason-simmons@users.noreply.github.com In the APNG decoder, validate the chunk data length before calling GetChunkSize to avoid potential overflow in the chunk size calculation (flutter/flutter#187949)
2026-06-15 engine-flutter-autoroll@skia.org Roll Skia from 6b4ac3bfb39d to 7128af60575a (1 revision) (flutter/flutter#188011)
2026-06-15 engine-flutter-autoroll@skia.org Roll Skia from 0a3b8549cbf0 to 6b4ac3bfb39d (7 revisions) (flutter/flutter#188007)
2026-06-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[a11y] Map some framework semantics roles to android classes.  (#185217)" (flutter/flutter#188008)
2026-06-15 chris@bracken.jp [ios] Filter UIScene events to those relating to Flutter VC scene (flutter/flutter#187987)
2026-06-15 jhy03261997@gmail.com [a11y] Map some framework semantics roles to android classes.  (flutter/flutter#185217)
2026-06-15 engine-flutter-autoroll@skia.org Roll Skia from f46928e7f50c to 0a3b8549cbf0 (1 revision) (flutter/flutter#188004)
2026-06-14 stuartmorgan@google.com Rework docs for flutter/packages changelogs (flutter/flutter#187666)
2026-06-14 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from nvzMQAmuRSzo7-wAP... to TbB86Po_HDe1dvXvT... (flutter/flutter#187997)
2026-06-14 engine-flutter-autoroll@skia.org Roll Skia from 4e2c9b5e4dad to f46928e7f50c (1 revision) (flutter/flutter#187996)
2026-06-14 engine-flutter-autoroll@skia.org Roll Skia from c52667607242 to 4e2c9b5e4dad (1 revision) (flutter/flutter#187990)
2026-06-14 737941+loic-sharma@users.noreply.github.com Improve RenderTargetCache docs (flutter/flutter#187893)
2026-06-13 brackenavaron@gmail.com [Test cross_imports] Check cross imports in flutter_test/** (flutter/flutter#187587)
2026-06-13 matt.kosarek@canonical.com Fixing corrupted window size OnEmptyFrameGenerated due to transpsed width/height (flutter/flutter#187954)
2026-06-13 engine-flutter-autoroll@skia.org Roll Skia from 42355271a335 to c52667607242 (2 revisions) (flutter/flutter#187979)
2026-06-13 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from A3eaUn9mQ_EkSNxVI... to nvzMQAmuRSzo7-wAP... (flutter/flutter#187975)
2026-06-13 engine-flutter-autoroll@skia.org Roll Skia from 9ef46390c2d1 to 42355271a335 (1 revision) (flutter/flutter#187974)
2026-06-13 bdero@google.com [Flutter GPU] Make ShaderLibrary.fromAsset asynchronous (flutter/flutter#187716)
2026-06-13 engine-flutter-autoroll@skia.org Roll Skia from 8c89bf2b0ee3 to 9ef46390c2d1 (6 revisions) (flutter/flutter#187968)
2026-06-12 bdero@google.com [Flutter GPU] Add surface API for framework presentation (flutter/flutter#187358)
2026-06-12 bkonyi@google.com [gen_l10n] Exclude inherited keys from untranslated-messages-file (flutter/flutter#187950)
2026-06-12 31859944+LongCatIsLooong@users.noreply.github.com Update `MediaQueryData` docs for devicePixelRatio overriding (flutter/flutter#187542)
2026-06-12 bdero@google.com [Impeller] Fix dirty-range race in DeviceBufferGLES uploads (flutter/flutter#187932)
2026-06-12 pascal@phntm.xyz Compare isModifiedAfter against the given time (flutter/flutter#187727)
2026-06-12 planetmarshall@users.noreply.github.com Enable unit tests for compilation of compute shaders on non-metal backends (flutter/flutter#179683)
2026-06-12 matt.boetger@gmail.com [flutter_tools] Add doctor validator warning for multiple adb installations (flutter/flutter#186031)
2026-06-12 matt.boetger@gmail.com Optimize SHA hash calculation of generated APK (flutter/flutter#187184)
2026-06-12 mu7ammadkamel@hotmail.com Scope widget inspector overlay to the selected widget's modal route (flutter/flutter#186784)
2026-06-12 30870216+gaaclarke@users.noreply.github.com Switches Windows to OpenGLESSDF (flutter/flutter#187877)
2026-06-12 matt.boetger@gmail.com [integration_test] Update README to support modern Kotlin-based setups by default (flutter/flutter#186080)
2026-06-12 jason-simmons@users.noreply.github.com Convert the PNG signature constant in APNGImageGenerator to a std::array and use it in the APNG tests (flutter/flutter#187930)
2026-06-12 matt.boetger@gmail.com Correct backoff retry time cap unit and add regression tests (flutter/flutter#187250)
2026-06-12 chingjun@google.com Fix std::vector out-of-bounds access in Flutter Android JNI and Delegate (flutter/flutter#187218)
2026-06-12 matt.boetger@gmail.com [Android] Adding 30-second timeouts to adb stopApp and uninstallApp (flutter/flutter#187876)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
...
@hannah-hyj

Copy link
Copy Markdown
Member Author

@cbracken thank you for taking a look, I will fix these tests

andywolff pushed a commit to andywolff/flutter that referenced this pull request Jun 16, 2026
…lutter#188037)

reland flutter#185217 with some updating
some tests in
dev/integration_tests/android_semantics_testing/integration_test/main_test.dart

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…r#185217)

In flutter#183897 I added semantics
roles in [AccessibilityBridge.java], I found some other current
semantics roles can be mapped to android classes.

There are some other android classes in AccessibilityBridge.java are
currently set by flags instead of by roles. example: we use "isSlider"
instead of slider role. we will need to add a slider role for it :
flutter#184029.



## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
flutter#185217)" (flutter#188008)

<!-- start_original_pr_link -->
Reverts: flutter#185217
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: cbracken
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: triggers test failures in
android_semantics_integration_test

Speifically
`dev/integration_tests/android_semantics_testing/integration_test/main_test.dart`

To be clear, it looks like the fix itself is good but the tests have not
been updated to test the corrected behaviour. Reverting to get the tree
green but I think all that needs doing is updating the tests.

`AccessibilityBridge TextFiel
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: hannah-hyj
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {chunhtai, reidbaker}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
In flutter#183897 I added semantics
roles in [AccessibilityBridge.java], I found some other current
semantics roles can be mapped to android classes.

There are some other android classes in AccessibilityBridge.java are
currently set by flags instead of by roles. example: we use "isSlider"
instead of slider role. we will need to add a slider role for it :
flutter#184029.



## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…lutter#188037)

reland flutter#185217 with some updating
some tests in
dev/integration_tests/android_semantics_testing/integration_test/main_test.dart

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-android Android applications specifically team-android Owned by Android platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants