Skip to content

Conversation

@hannah-hyj
Copy link
Member

@hannah-hyj hannah-hyj commented Jun 20, 2025

the isFocused and isFocusable flags should be more consistent,

this is also to prepare for #170696 ,

So all EditableText and TextField widgets will have isFocusable flag set to true now. (because they set isFocused).

Pre-launch Checklist

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

@flutter-dashboard

This comment was marked as outdated.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: focus Focus traversal, gaining or losing focus labels Jun 20, 2025
@hannah-hyj hannah-hyj changed the title [draft] : set isFocused will update isFocusable to true [a11y] : set isFocused will update isFocusable to true Jun 25, 2025
@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. f: cupertino flutter/packages/flutter/cupertino repository labels Jun 25, 2025
@hannah-hyj hannah-hyj requested a review from chunhtai June 25, 2025 06:24
@github-actions github-actions bot removed the a: tests "flutter test", flutter_test, or one of our tests label Jun 25, 2025
@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch from 376de89 to 5408de2 Compare June 25, 2025 18:04
@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch from ed7ed86 to e823d05 Compare June 26, 2025 20:13
@hannah-hyj hannah-hyj requested a review from chunhtai June 26, 2025 20:25
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

we also need to add a migration guide

_flags = _flags.copyWith(isFocused: value);
bool? get isFocused => _flags.isFocusable ? _flags.isFocused : null;
set isFocused(bool? value) {
if (value != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if this is null, should this reset isFocusable? I looked at other property looks like they just pass the null to the flags, not sure if those make sense neither

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated this to reset isFocusable to false if this is null, i think it makes more sense to me.

config.isReadOnly = properties.readOnly!;
}
if (properties.focusable != null) {
config.isFocusable = properties.focusable!;
Copy link
Contributor

Choose a reason for hiding this comment

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

we should attempt to migrate this, the focusable in SemanticsProperty should be deprecated as well

@hannah-hyj hannah-hyj requested a review from chunhtai June 27, 2025 20:13
@hannah-hyj
Copy link
Member Author

PR to add breaking changes doc flutter/website#12159

}
if (properties.focused != null) {
config.isFocused = properties.focused!;
if (properties.focusable != null ||properties.focused != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

not formatted correctly

Copy link
Contributor

Choose a reason for hiding this comment

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

is this for backward compatibility? why do we need to check for focusable?

Copy link
Member Author

@hannah-hyj hannah-hyj Jun 30, 2025

Choose a reason for hiding this comment

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

This was for backward compatibility but yeah this should be updated

previously, properties.focused== null means the properties don't have a meaningful value for focused , now it explicitly means this semantics node is not focusable. So the config.focused should be updated even if properties.focused is null. but if we always update config.focused , the _hasBeenAnnotated in semanticsNode might be messed up and the tree structure will change.

Copy link
Member Author

@hannah-hyj hannah-hyj Jul 2, 2025

Choose a reason for hiding this comment

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

discussed offline, the tree structure changes are intended, for example the dropdown menu will lose a semantic node but the node contains no information.
Screenshot 2025-07-01 at 18 24 47

defaultTargetPlatform != TargetPlatform.iOS && _couldRequestFocus
? focusNode.requestFocus
: null,
focusable: _couldRequestFocus,
Copy link
Contributor

Choose a reason for hiding this comment

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

should remove any invocation to the deprecated property

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like Semantics(focusable) is not deprecated. is there a reason we want to keep it around?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah i should remove this, my mistake

Copy link
Member Author

@hannah-hyj hannah-hyj Aug 15, 2025

Choose a reason for hiding this comment

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

Actually removing this line caused a lot of test failures in g3,
When Semantics(focusable: false, focused: false) becomes Semantics(focused: null), they are the same in flag values. However, the first one is annotated in the semantics tree, while the second one is not. This difference can sometimes cause the tree structure to change.

Because Focus is so widely used, it caused many tests to fail. For example, an InkWell(onTap: null) might have previously formed a semantics node because it was annotated, but with focusable removed here, it will no longer form a semantics node.

I agree I should remove the invocation of focusable here but i will split this 1 line change into another PR (#173880) like i split the textfield focusable into another PR #173235 , just so it's easier to resolve semantics tree structure changes and test failures.

@hannah-hyj hannah-hyj requested a review from chunhtai July 2, 2025 02:23
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

_hasBeenAnnotated = true;
}

/// Whether the owning [RenderObject] currently holds the input focus.
Copy link
Contributor

Choose a reason for hiding this comment

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

the doc around isFocused should mention null if this is not focusable

Copy link
Contributor

Choose a reason for hiding this comment

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

here and elsewhere

await tester.pumpWidget(buildDropdownMenu(requestFocusOnTap: true));

expect(
tester.getSemantics(find.byType(TextField)),
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change?

Copy link
Member Author

@hannah-hyj hannah-hyj Jul 2, 2025

Choose a reason for hiding this comment

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

Screenshot 2025-07-02 at 10 32 18

The semantics tree structure didn't change after my PR. Only the isFocusable flag value is changed. however, tester.getSemantics(find.byType(TextField)) will find the node 3 : scopeRoute. tester.getSemantics(find.text('Test')) will find the node 5

@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch 2 times, most recently from 7a2c556 to 46f29bb Compare July 7, 2025 21:48
@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch from 46f29bb to 790c6c1 Compare July 11, 2025 21:00
@hannah-hyj
Copy link
Member Author

hannah-hyj commented Jul 11, 2025

This PR is failing dozens of google 3 tests , some because textfield now have isFocusable flags, some because of other reasons, i'm still fixing google 3 tests.

@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch from e63ff63 to 9341156 Compare July 21, 2025 18:39
@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch from 9341156 to 2bdc659 Compare August 1, 2025 20:06
@hannah-hyj
Copy link
Member Author

hannah-hyj commented Aug 4, 2025

I'm splitting this PR into #173235 and this one, so less google3 tests will be failing in each PR

@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch 2 times, most recently from 1238f23 to f790e53 Compare August 15, 2025 19:42
@github-actions github-actions bot removed the f: material design flutter/packages/flutter/material repository. label Aug 15, 2025
@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch 2 times, most recently from 893fe20 to 32969e7 Compare August 15, 2025 21:08
hannah-hyj and others added 3 commits August 15, 2025 14:11
1

isfocusable changes

revert inkwell changes

isfocusable changes

Update ink_well.dart

Update semantics.dart

lint

Update shortcuts_test.dart

fix tests

test

resolve comments

fix tests

Update semantics.dart

fix tests

resolve comments

Update semantics.dart

Update packages/flutter/lib/src/semantics/semantics.dart

mark Deprecated

Update semantics_test.dart

update more tests

fix tests

updates

lint

Update semantics.dart

Update semantics.dart

Update semantics.dart

Co-Authored-By: chunhtai <[email protected]>
Update menu_anchor_test.dart

revert changes in focus_scope

Co-Authored-By: chunhtai <[email protected]>
Co-Authored-By: chunhtai <[email protected]>
@hannah-hyj hannah-hyj force-pushed the isfocusable-and-isfocused branch from 32969e7 to 0560984 Compare August 15, 2025 21:11
@hannah-hyj hannah-hyj added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 15, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Aug 15, 2025
Merged via the queue into flutter:master with commit 35375e4 Aug 15, 2025
78 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 16, 2025
flutter/flutter@52af7a5...0a2906b

2025-08-16 [email protected] Improve `SweepGradient` angle and `TileMode` documentation (flutter/flutter#172406)
2025-08-16 [email protected] Roll Skia from 1e148cada9d4 to 16dbd908dcab (1 revision) (flutter/flutter#173901)
2025-08-16 [email protected] Roll Skia from 91ad1f21ca61 to 1e148cada9d4 (3 revisions) (flutter/flutter#173890)
2025-08-16 [email protected] Roll Dart SDK from 9277d6303da5 to 67ca79475db6 (1 revision) (flutter/flutter#173886)
2025-08-15 [email protected] Blocks exynos9820 chip from vulkan (flutter/flutter#173807)
2025-08-15 [email protected] Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" (flutter/flutter#173879)
2025-08-15 [email protected] Roll `package:analyzer` forward to `8.1.1` (flutter/flutter#173867)
2025-08-15 [email protected] Roll Skia from 2f66be8a593a to 91ad1f21ca61 (3 revisions) (flutter/flutter#173877)
2025-08-15 [email protected] [a11y] : set isFocused will update isFocusable to true (flutter/flutter#170935)
2025-08-15 [email protected] Reland predictive back route transitions by default (flutter/flutter#173860)
2025-08-15 [email protected] Roll Fuchsia Linux SDK from zWRpLglb48zC1vZLv... to H1kVA85LyQsK8EDp2... (flutter/flutter#173874)
2025-08-15 [email protected] Add onHover callback support for TableRowInkWell (flutter/flutter#173373)
2025-08-15 [email protected] Roll Skia from 5654ac32ede0 to 2f66be8a593a (6 revisions) (flutter/flutter#173866)
2025-08-15 [email protected] Roll Dart SDK from cc008dc8e7aa to 9277d6303da5 (2 revisions) (flutter/flutter#173864)
2025-08-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implements the Android native stretch effect as a fragment shader (Impeller-only). (#169293)" (flutter/flutter#173865)
2025-08-15 [email protected] Re-add `Linux_android_emu *` tests that had KVM issues, now resolved (flutter/flutter#173812)

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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
split from flutter#170935, will remove "
..isFocusable = true" when 170935 is merged


## 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.

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

**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
[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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
the isFocused and isFocusable flags should be more consistent,

this is also to prepare for
flutter#170696 ,


So all EditableText and TextField widgets will have isFocusable flag set
to true now. (because they set isFocused).



## 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.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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

---------

Co-authored-by: chunhtai <[email protected]>
WillBLogical pushed a commit to WillBLogical/packages that referenced this pull request Aug 20, 2025
…r#9836)

flutter/flutter@52af7a5...0a2906b

2025-08-16 [email protected] Improve `SweepGradient` angle and `TileMode` documentation (flutter/flutter#172406)
2025-08-16 [email protected] Roll Skia from 1e148cada9d4 to 16dbd908dcab (1 revision) (flutter/flutter#173901)
2025-08-16 [email protected] Roll Skia from 91ad1f21ca61 to 1e148cada9d4 (3 revisions) (flutter/flutter#173890)
2025-08-16 [email protected] Roll Dart SDK from 9277d6303da5 to 67ca79475db6 (1 revision) (flutter/flutter#173886)
2025-08-15 [email protected] Blocks exynos9820 chip from vulkan (flutter/flutter#173807)
2025-08-15 [email protected] Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" (flutter/flutter#173879)
2025-08-15 [email protected] Roll `package:analyzer` forward to `8.1.1` (flutter/flutter#173867)
2025-08-15 [email protected] Roll Skia from 2f66be8a593a to 91ad1f21ca61 (3 revisions) (flutter/flutter#173877)
2025-08-15 [email protected] [a11y] : set isFocused will update isFocusable to true (flutter/flutter#170935)
2025-08-15 [email protected] Reland predictive back route transitions by default (flutter/flutter#173860)
2025-08-15 [email protected] Roll Fuchsia Linux SDK from zWRpLglb48zC1vZLv... to H1kVA85LyQsK8EDp2... (flutter/flutter#173874)
2025-08-15 [email protected] Add onHover callback support for TableRowInkWell (flutter/flutter#173373)
2025-08-15 [email protected] Roll Skia from 5654ac32ede0 to 2f66be8a593a (6 revisions) (flutter/flutter#173866)
2025-08-15 [email protected] Roll Dart SDK from cc008dc8e7aa to 9277d6303da5 (2 revisions) (flutter/flutter#173864)
2025-08-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implements the Android native stretch effect as a fragment shader (Impeller-only). (#169293)" (flutter/flutter#173865)
2025-08-15 [email protected] Re-add `Linux_android_emu *` tests that had KVM issues, now resolved (flutter/flutter#173812)

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
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
the isFocused and isFocusable flags should be more consistent,

this is also to prepare for
flutter#170696 ,


So all EditableText and TextField widgets will have isFocusable flag set
to true now. (because they set isFocused).



## 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.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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

---------

Co-authored-by: chunhtai <[email protected]>
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
the isFocused and isFocusable flags should be more consistent,

this is also to prepare for
flutter#170696 ,


So all EditableText and TextField widgets will have isFocusable flag set
to true now. (because they set isFocused).



## 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.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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

---------

Co-authored-by: chunhtai <[email protected]>
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
split from flutter#170935, will remove "
..isFocusable = true" when 170935 is merged


## 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.

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

**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
[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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
the isFocused and isFocusable flags should be more consistent,

this is also to prepare for
flutter#170696 ,


So all EditableText and TextField widgets will have isFocusable flag set
to true now. (because they set isFocused).



## 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.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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

---------

Co-authored-by: chunhtai <[email protected]>
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
split from flutter#170935, will remove "
..isFocusable = true" when 170935 is merged


## 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.

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

**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
[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
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
the isFocused and isFocusable flags should be more consistent,

this is also to prepare for
flutter#170696 ,


So all EditableText and TextField widgets will have isFocusable flag set
to true now. (because they set isFocused).



## 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.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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

---------

Co-authored-by: chunhtai <[email protected]>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
split from flutter#170935, will remove "
..isFocusable = true" when 170935 is merged


## 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.

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

**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
[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
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
the isFocused and isFocusable flags should be more consistent,

this is also to prepare for
flutter#170696 ,


So all EditableText and TextField widgets will have isFocusable flag set
to true now. (because they set isFocused).



## 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.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[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

---------

Co-authored-by: chunhtai <[email protected]>
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) f: focus Focus traversal, gaining or losing focus framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants