Skip to content

Update the AccessibilityPlugin::Announce method to account for the view #172669

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

mattkae
Copy link
Contributor

@mattkae mattkae commented Jul 23, 2025

What's new?

  • The accessibility "announce" method now takes a view_id
  • The view_id is used to lookup the corresponding FlutterView in the win32 embedder
  • Updated the associated tests

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • 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.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine repository. See also e: labels. f: material design flutter/packages/flutter/material repository. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) platform-windows Building on or for Windows specifically a: desktop Running on desktop labels Jul 23, 2025
@mattkae mattkae force-pushed the announce-event-multi-view branch 2 times, most recently from 0f84654 to e81b319 Compare July 24, 2025 13:51
@mattkae mattkae marked this pull request as ready for review July 24, 2025 14:14
@mattkae mattkae requested review from knopp and loic-sharma July 24, 2025 14:14
@mattkae mattkae force-pushed the announce-event-multi-view branch from e81b319 to 29aa8c9 Compare July 24, 2025 14:52
@github-actions github-actions bot added the a: tests "flutter test", flutter_test, or one of our tests label Jul 24, 2025
@loic-sharma loic-sharma requested a review from hannah-hyj July 24, 2025 23:29
@loic-sharma
Copy link
Member

@hannah-hyj Could you also review this as it affects accessibility announcements? For multi-window on Windows, we need to route the accessibility announcement to the right window. This requires piping a view ID in the accessibility announcement.

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

Functionally this looks good to me, but we should avoid the breaking change.

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

Windows changes look good to me!

Framework changes look to good to me as well, but please get an approval from an accessibility expert like @hannah-hyj before merging.

@flutter-dashboard
Copy link

CI had a failure that stopped further tests from running. We need to investigate to determine the root cause.

SHA at time of execution: d1d01ef.

Possible causes:

  • Configuration Changes: The .ci.yaml file might have been modified between the creation of this pull request and the start of this test run. This can lead to ci yaml validation errors.
  • Infrastructure Issues: Problems with the CI environment itself (e.g., quota) could have caused the failure.

A blank commit, or merging to head, will be required to resume running CI for this PR.

Error Details:

GitHub Error: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID 9770:2E63:2B814:59FA1:6883D2CC.

Stack trace:

#0      GitHub.handleStatusCode (package:github/src/common/github.dart:486:5)
#1      GitHub.request (package:github/src/common/github.dart:422:7)
<asynchronous suspension>
#2      GitHub.requestJson (package:github/src/common/github.dart:323:22)
<asynchronous suspension>
#3      RetryOptions.retry (package:retry/retry.dart:131:16)
<asynchronous suspension>
#4      LuciBuildService.scheduleTryBuilds (package:cocoon_service/src/service/luci_build_service.dart:246:24)
<asynchronous suspension>
#5      Scheduler._runCiTestingStage (package:cocoon_service/src/service/scheduler.dart:1250:9)
<asynchronous suspension>
#6      Scheduler.proceedToCiTestingStage (package:cocoon_service/src/service/scheduler.dart:1311:7)
<asynchronous suspension>
#7      Scheduler._closeSuccessfulEngineBuildStage (package:cocoon_service/src/service/scheduler.dart:1122:5)
<asynchronous suspension>
#8      Scheduler.processCheckRunCompletion (package:cocoon_service/src/service/scheduler.dart:1055:9)
<asynchronous suspension>
#9      Scheduler.processCheckRun (package:cocoon_service/src/service/scheduler.dart:1395:9)
<asynchronous suspension>
#10     GithubWebhookSubscription.post (package:cocoon_service/src/request_handlers/github/webhook_subscription.dart:118:24)
<asynchronous suspension>
#11     RequestHandler.service (package:cocoon_service/src/request_handling/request_handler.dart:45:20)
<asynchronous suspension>
#12     SubscriptionHandler.service (package:cocoon_service/src/request_handling/subscription_handler.dart:140:5)
<asynchronous suspension>
#13     createServer.<anonymous closure> (package:cocoon_service/server.dart:329:7)
<asynchronous suspension>

mattkae and others added 2 commits July 28, 2025 10:00
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
@loic-sharma loic-sharma requested a review from chunhtai July 30, 2025 17:09
@dkwingsmt dkwingsmt removed the f: material design flutter/packages/flutter/material repository. label Jul 30, 2025
@github-actions github-actions bot added the f: material design flutter/packages/flutter/material repository. label Jul 31, 2025
///
/// {@macro flutter.semantics.service.announce}
static Future<void> sendAnnouncement(
int viewId,
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels weird about forcing people to give an id, even for non-multiview case

Can we choose one of the following?

  1. use kImplicitViewId if not provided

  2. let SemanticsService to be a per View object instead of a global singleton, and use SemanticsService.of(context).annonce() instead, or View.of(context).semanticsService.announce

I slightly more leaning toward 2 since i imagine we may have more method added into this class in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am leaning towards 1 because it allows SemanticsService to continue to be a static service, rather than needing to maintain global instances of it. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am ok with that. if that is the case, we should reuse the original announce with an optional view_id parameter so that we don't need a breaking change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: desktop Running on desktop a: tests "flutter test", flutter_test, or one of our tests engine flutter/engine repository. See also e: labels. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. platform-windows Building on or for Windows specifically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy