Skip to content

iOS a11y sets header trait based on heading level#186916

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
chunhtai:migrate-ios-header
Jun 11, 2026
Merged

iOS a11y sets header trait based on heading level#186916
auto-submit[bot] merged 5 commits into
flutter:masterfrom
chunhtai:migrate-ios-header

Conversation

@chunhtai

@chunhtai chunhtai commented May 21, 2026

Copy link
Copy Markdown
Contributor

After some testing UIAccessibilityTraitHeader actually means heading in iOS, the voice over will announce "heading" if set.

The header in flutter has a different meaning, which is the banner (e.g. app bar. or html <header>). This PR fixes the mistranslation.

I will prepare a breaking change doc for this.

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.

@chunhtai chunhtai requested a review from a team as a code owner May 21, 2026 21:54
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 21, 2026
@github-actions github-actions Bot added platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels May 21, 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 iOS semantics implementation to determine the UIAccessibilityTraitHeader based on the headingLevel property instead of the isHeader flag. A new test case was added to verify that a positive heading level correctly sets the header trait. Feedback suggests adding a complementary test to ensure the isHeader flag no longer sets this trait when the heading level is zero, fully validating the logic change.

@chunhtai chunhtai requested a review from LouiseHsu May 21, 2026 22:32
@chunhtai chunhtai force-pushed the migrate-ios-header branch from 368a95d to 92c437c Compare May 22, 2026 17:50
@github-actions github-actions Bot removed the CICD Run CI/CD label May 22, 2026
@chunhtai chunhtai added the CICD Run CI/CD label May 22, 2026
LouiseHsu
LouiseHsu previously approved these changes May 26, 2026

@LouiseHsu LouiseHsu 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!

chunhtai added a commit to flutter/website that referenced this pull request Jun 3, 2026
migration guide for flutter/flutter#186916

## Presubmit checklist

- [ ] If you are unwilling, or unable, to sign the CLA, even for a
_tiny_, one-word PR, please file an issue instead of a PR.
- [ ] If this PR is not meant to land until a future stable release,
mark it as draft with an explanation.
- [ ] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style)—for example, it doesn't
use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first-person
pronouns).
- [ ] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
  of 80 characters or fewer.
@chunhtai chunhtai force-pushed the migrate-ios-header branch from 92c437c to aa39055 Compare June 3, 2026 16:28
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 3, 2026
@chunhtai chunhtai added the CICD Run CI/CD label Jun 3, 2026
@chunhtai chunhtai force-pushed the migrate-ios-header branch from aa39055 to 369c221 Compare June 4, 2026 16:29
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 4, 2026
@chunhtai chunhtai added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Jun 4, 2026
@auto-submit

auto-submit Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/186916, because - The status or check suite Mac module_uiscene_test_ios has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 4, 2026
@chunhtai chunhtai force-pushed the migrate-ios-header branch from 369c221 to 9250d16 Compare June 5, 2026 21:00
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 5, 2026
@chunhtai chunhtai added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Jun 5, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 5, 2026
@auto-submit

auto-submit Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/186916, because - The status or check suite Mac module_uiscene_test_ios has failed. Please fix the issues identified (or deflake) before re-applying this label.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 5, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 10, 2026
@chunhtai chunhtai added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Jun 10, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2026
@auto-submit

auto-submit Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/186916, because - The status or check suite Linux windows_host_engine has failed. Please fix the issues identified (or deflake) before re-applying this label.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2026
@auto-submit

auto-submit Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/186916, because - The status or check suite Mac_arm64 build_tests_1_5 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 10, 2026
@auto-submit

auto-submit Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/186916, because - The status or check suite Mac plugin_test_android_variants has failed. Please fix the issues identified (or deflake) before re-applying this label.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 11, 2026
@chunhtai chunhtai added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Jun 11, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 11, 2026
@auto-submit

auto-submit Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/186916, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 11, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Jun 11, 2026
Merged via the queue into flutter:master with commit 8c17c5e Jun 11, 2026
211 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 11, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 12, 2026
flutter/flutter@8bdce07...b7cb925

2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from cadbde1ec4b7 to 8c89bf2b0ee3 (5 revisions) (flutter/flutter#187926)
2026-06-12 engine-flutter-autoroll@skia.org Roll Packages from 1b56cde to b78ad83 (5 revisions) (flutter/flutter#187928)
2026-06-12 engine-flutter-autoroll@skia.org Roll Dart SDK from f3441f2067ae to f6c31f4c3a63 (17 revisions) (flutter/flutter#187924)
2026-06-12 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 2KosSR4ONUjIB7tP_... to A3eaUn9mQ_EkSNxVI... (flutter/flutter#187923)
2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from a2228b926c68 to cadbde1ec4b7 (9 revisions) (flutter/flutter#187921)
2026-06-12 kustermann@google.com Remove dynamic module loading code in flutter web engine (flutter/flutter#187777)
2026-06-12 matt.kosarek@canonical.com Remove EnableTransparentWindowBackground because it did nothing important and because Windows 10 does not support DWMWA_SYSTEMBACKDROP_TYPE (flutter/flutter#187848)
2026-06-12 engine-flutter-autoroll@skia.org Roll Fuchsia Test Scripts from dQ4PjIJB5kZFU8Y32... to EmfiOMUge_nnNS33B... (flutter/flutter#187912)
2026-06-12 mvincentong@gmail.com Clarify RichText selection docs (flutter/flutter#186844)
2026-06-12 1063596+reidbaker@users.noreply.github.com Custom KGP task and migration to AGP api for geting kgp version (flutter/flutter#182788)
2026-06-12 engine-flutter-autoroll@skia.org Roll Skia from f61acb31edf8 to a2228b926c68 (5 revisions) (flutter/flutter#187896)
2026-06-12 bdero@google.com [Flutter GPU] Expose ASTC HDR texture formats (flutter/flutter#187715)
2026-06-12 awolff@google.com Expand coverage of android_hardware_smoke_test. Add image, text, blend mode, and blur tests. (flutter/flutter#187600)
2026-06-11 bdero@google.com [Flutter GPU] Add blit operations (flutter/flutter#187289)
2026-06-11 bkonyi@google.com [flutter_tools] Fix version cache git fallback performance regression (flutter/flutter#187400)
2026-06-11 nshahan@google.com Rewrite `-d web-server` hot reload/restart tests (flutter/flutter#187453)
2026-06-11 bdero@google.com [Impeller] Allow sampling textures with manually-uploaded mip levels (flutter/flutter#187729)
2026-06-11 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#187884)
2026-06-11 47866232+chunhtai@users.noreply.github.com iOS a11y sets header trait based on heading level (flutter/flutter#186916)
2026-06-11 engine-flutter-autoroll@skia.org Roll Skia from 9f02102df298 to f61acb31edf8 (19 revisions) (flutter/flutter#187869)
2026-06-11 engine-flutter-autoroll@skia.org Roll ICU from ee5f27adc28b to d578f2e8b7bd (8 revisions) (flutter/flutter#187829)

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 louisehsu@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

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

After some testing UIAccessibilityTraitHeader actually means heading in
iOS, the voice over will announce "heading" if set.

The header in flutter has a different meaning, which is the banner (e.g.
app bar. or html \<header\>). This PR fixes the mistranslation.

I will prepare a breaking change doc for this.

## 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-ios iOS applications specifically team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants