-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add button semantics in list tile #151599
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
Add button semantics in list tile #151599
Conversation
| autofocus: autofocus, | ||
| enableFeedback: enableFeedback ?? tileTheme.enableFeedback ?? true, | ||
| child: Semantics( | ||
| button: onTap != null || onLongPress != null, |
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.
does this need to take enabled into account?
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.
if enable is false and onTap is not null, I think it's still a button just a disabled button
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
629f128 to
8cd4a52
Compare
8cd4a52 to
ece02e3
Compare
|
Reason for revert: broke an internal test. |
This reverts commit 37dff27.
…ntrol behavior. (#152526) #151599 was reverted because it was a breaking change to g3 Will reland 151599 in 5 steps 1. Make changes with an additional parameter ( bool internalAddSemanticForOnTap = false) 2. Send regular CLs in google3 to pass internalAddSemanticForOnTap: true, and update the tests / text goldens accordingly. 3. Send a PR to flip the default value to true. 4. Send CLs internally to remove internalAddSemanticForOnTap: true. 5. Send another PR to remove the now-redundant internalAddSemanticForOnTap flag. (<----This PR is step 1)
Manual roll requested by [email protected] flutter/flutter@4d12197...f817e51 2024-07-27 [email protected] Roll Flutter Engine from 38fddb289f18 to add1b784b80a (3 revisions) (flutter/flutter#152436) 2024-07-27 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add button semantics in list tile (#151599)" (flutter/flutter#152425) 2024-07-27 [email protected] Roll Flutter Engine from 739ae15e8bf2 to 38fddb289f18 (2 revisions) (flutter/flutter#152424) 2024-07-27 [email protected] Document that `flutter drive --test-arguments` can opt-in to `dart test` (flutter/flutter#152410) 2024-07-27 [email protected] Roll Flutter Engine from 0c5504e15e15 to 739ae15e8bf2 (4 revisions) (flutter/flutter#152417) 2024-07-27 [email protected] Roll Flutter Engine from e28f8755e25b to 0c5504e15e15 (5 revisions) (flutter/flutter#152414) 2024-07-26 [email protected] Add button semantics in list tile (flutter/flutter#151599) 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
fixes: flutter#111960 ## 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
…#152425) Reverts: flutter#151599 Initiated by: chingjun Reason for reverting: broke an internal test. Original PR Author: hangyujin Reviewed By: {chunhtai} This change reverts the following previous change: fixes: flutter#111960
…g to control behavior. (flutter#152526) flutter#151599 was reverted because it was a breaking change to g3 Will reland 151599 in 5 steps 1. Make changes with an additional parameter ( bool internalAddSemanticForOnTap = false) 2. Send regular CLs in google3 to pass internalAddSemanticForOnTap: true, and update the tests / text goldens accordingly. 3. Send a PR to flip the default value to true. 4. Send CLs internally to remove internalAddSemanticForOnTap: true. 5. Send another PR to remove the now-redundant internalAddSemanticForOnTap flag. (<----This PR is step 1)
fixes: flutter#111960 ## 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
…#152425) Reverts: flutter#151599 Initiated by: chingjun Reason for reverting: broke an internal test. Original PR Author: hangyujin Reviewed By: {chunhtai} This change reverts the following previous change: fixes: flutter#111960
…g to control behavior. (flutter#152526) flutter#151599 was reverted because it was a breaking change to g3 Will reland 151599 in 5 steps 1. Make changes with an additional parameter ( bool internalAddSemanticForOnTap = false) 2. Send regular CLs in google3 to pass internalAddSemanticForOnTap: true, and update the tests / text goldens accordingly. 3. Send a PR to flip the default value to true. 4. Send CLs internally to remove internalAddSemanticForOnTap: true. 5. Send another PR to remove the now-redundant internalAddSemanticForOnTap flag. (<----This PR is step 1)
fixes: #111960
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.