Skip to content

[A11y] Add UI for AccessibilityOverridesPane#9892

Merged
hannah-hyj merged 7 commits into
flutter:masterfrom
hannah-hyj:a11y_override_pane_ui
Jul 15, 2026
Merged

[A11y] Add UI for AccessibilityOverridesPane#9892
hannah-hyj merged 7 commits into
flutter:masterfrom
hannah-hyj:a11y_override_pane_ui

Conversation

@hannah-hyj

@hannah-hyj hannah-hyj commented Jul 14, 2026

Copy link
Copy Markdown
Member

This PR is only UI for buttons, no functions yet.
The screen is gated by the FeatureFlags.accessibility flag, internal link: go/devtool-a11y-userjourney
issue: #9893

Screenshot 2026-07-14 at 15 15 27

Pre-launch Checklist

General 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 the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I updated/added relevant documentation (doc comments with ///).

Issues checklist

Tests checklist

  • I added new tests to check the change I am making...
  • OR there is a reason for not adding tests, which I explained in the PR description.

AI-tooling checklist

  • I did not use any AI tooling in creating this PR.
  • OR I did use AI tooling, and...
    • I read the AI contributions guidelines and agree to follow them.
    • I reviewed all AI-generated code before opening this PR.
    • I understand and am able to discuss the code in this PR.
    • I have verifed the accuracy of any AI-generated text included in the PR description.
    • I commit to verifying the accuracy of any AI-generated code or text that I upload in response to review comments.

Feature-change checklist

  • This PR does not change the DevTools UI or behavior and...
    • I added the release-notes-not-required label or left a comment requesting the label be added.
  • OR this PR does change the DevTools UI or behavior and...
    • I added an entry to packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.
    • I included before/after screenshots and/or a GIF demo of the new UI to my PR description.
    • I ran the DevTools app locally to manually verify my changes.

build.yaml badge

If you need help, consider asking for help on Discord.

@hannah-hyj hannah-hyj requested a review from elliette July 14, 2026 20:07
@hannah-hyj hannah-hyj requested a review from a team as a code owner July 14, 2026 20:07
@hannah-hyj hannah-hyj requested review from srawlins and removed request for a team July 14, 2026 20:07

@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 implements the UI and corresponding tests for the AccessibilityOverridesPane in Flutter DevTools, replacing a placeholder with interactive controls for brightness, text scale, bold text, screen reader debugger, and high contrast. The reviewer suggests two key improvements: simplifying the widget tree in _TextScaleOverride by consolidating two separate ValueListenableBuilder widgets into a single builder, and making the widget tests more robust by finding Switch widgets using their associated labels rather than fragile index-based lookups.

Comment thread packages/devtools_app/lib/src/screens/accessibility/accessibility_screen.dart Outdated

@srawlins srawlins 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.

Love it. @kenzieschmoll should also review.

final theme = Theme.of(context);
final controller = screenControllers.lookup<AccessibilityController>();
return DevToolsAreaPane(
header: const AreaPaneHeader(title: Text('Accessibility Overrides')),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Based on screenshot, it looks like this is causing the border to be rendered twice. You likely need to pass includeTopBorder: false (ditto for the semantics tree pane).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider splitting AccessibilityOverridesPane and AccessibilitySemanticsTreePane into separate files (e.g. accessibility/accessibility_screen.dart, accessibility/overrides_pane.dart, and accessibility/semantics_tree_pane.dart) before this file gets too big :)

style: theme.subtleTextStyle,
),
const SizedBox(height: denseSpacing),
ValueListenableBuilder<String>(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since there are set number of options here, I think it might be better for controller.brightness to be an enum instead of a string to allow for exhaustive checks and prevent any typo bugs.

Comment on lines +143 to +151
Text(
'Brightness',
style: theme.boldTextStyle,
),
const SizedBox(height: densePadding),
Text(
'Override the color scheme mode of the app.',
style: theme.subtleTextStyle,
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Consider defining a widget (e.g. _AccessibilityPanelLabel) for easier reuse:

_AccessibilityPanelLabel(
    label: 'Brightness',
     description: 'Override the color scheme mode of the app.',
)

ValueListenableBuilder<bool>(
valueListenable: notifier,
builder: (context, enabled, _) {
return Switch(

@kenzieschmoll kenzieschmoll Jul 14, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: use NotifierSwitch common widget. This enforces DevTools styling and size defaults as part of the implementation

@kenzieschmoll kenzieschmoll left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

one comment then lgtm

@hannah-hyj hannah-hyj added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 15, 2026
@hannah-hyj hannah-hyj merged commit ee63060 into flutter:master Jul 15, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App release-notes-not-required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants