-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Use aria-hidden attribute for platform view accessibility on web #177969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 introduces the use of the inert attribute for platform views on the web to improve accessibility. Platform views are now made inert by default upon rendering. A new method, updatePlatformViewAccessibility, is added to PlatformViewManager to dynamically control the inert state. This is integrated with the semantics layer in SemanticPlatformView to show or hide platform views based on the isHidden semantic flag. The changes are accompanied by new tests. My review includes a high-severity comment to address a potential bug in state management and a medium-severity comment to improve maintainability.
engine/src/flutter/lib/web_ui/lib/src/engine/platform_views/content_manager.dart
Outdated
Show resolved
Hide resolved
|
CI had a failure that stopped further tests from running. We need to investigate to determine the root cause. SHA at time of execution: 6c5a35b. Possible causes:
A blank commit, or merging to head, will be required to resume running CI for this PR. Error Details: Stack trace: |
|
After the change, when ExcludeSemantics in on, the map can't be interacted with using mouse, is this expected? |
|
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
it is not expected. let me revisit the issue again. |
|
An existing Git SHA, To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with |
mdebbar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
engine/src/flutter/lib/web_ui/lib/src/engine/semantics/platform_view.dart
Show resolved
Hide resolved
chunhtai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…10408) Manual roll requested by [email protected] flutter/flutter@31a8481...ee23168 2025-11-07 [email protected] Roll Packages from f13bad3 to 3caa48b (5 revisions) (flutter/flutter#178164) 2025-11-07 [email protected] Fix text input actions in DropdownMenu. (flutter/flutter#177313) 2025-11-07 [email protected] Roll Skia from f838c4b31edb to 581d1ecd5029 (1 revision) (flutter/flutter#178157) 2025-11-07 [email protected] Roll Skia from eb3c5b280ae6 to f838c4b31edb (3 revisions) (flutter/flutter#178149) 2025-11-07 [email protected] Roll Skia from 360fe72b5bf4 to eb3c5b280ae6 (1 revision) (flutter/flutter#178147) 2025-11-07 [email protected] Roll Skia from 116f237bb39d to 360fe72b5bf4 (4 revisions) (flutter/flutter#178146) 2025-11-07 [email protected] Roll Fuchsia Linux SDK from cm88aTLui5yorSGYQ... to qDVe2mrpSgQdxra7p... (flutter/flutter#178144) 2025-11-07 [email protected] fix: findChildIndexCallback to take seperators into account for seperated named constructor in ListView and SliverList (flutter/flutter#174491) 2025-11-06 [email protected] [web] Remove unnecessary android_sdk dep (flutter/flutter#178078) 2025-11-06 [email protected] Add haptic notifications support. (flutter/flutter#177721) 2025-11-06 [email protected] Allow label to be used to compute InputDecorator Intrinsic width (flutter/flutter#178101) 2025-11-06 [email protected] Respect product flavor abiFilters by adding a `disable-abi-filtering` Android project flag. (flutter/flutter#177753) 2025-11-06 [email protected] Use aria-hidden attribute for platform view accessibility on web (flutter/flutter#177969) 2025-11-06 [email protected] [tool] Fix IP parsing by using Uri constructor (flutter/flutter#178083) 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 [email protected],[email protected] 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 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…tter#177969) Use aria-hidden attribute for platform view accessibility on web Before change: https://map-1023-before.web.app/ After change: https://map-1023-after.web.app/ Fixes flutter#171948. Note: When a descendant element receives focus (for example, a marker), the browser automatically overrides aria-hidden. This behavior is correct and expected for accessibility compliance.
…tter#177969) Use aria-hidden attribute for platform view accessibility on web Before change: https://map-1023-before.web.app/ After change: https://map-1023-after.web.app/ Fixes flutter#171948. Note: When a descendant element receives focus (for example, a marker), the browser automatically overrides aria-hidden. This behavior is correct and expected for accessibility compliance.
Use aria-hidden attribute for platform view accessibility on web
Before change:
https://map-1023-before.web.app/
After change:
https://map-1023-after.web.app/
Fixes #171948.
Note: When a descendant element receives focus (for example, a marker), the browser automatically overrides aria-hidden. This behavior is correct and expected for accessibility compliance.