-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add semanticIndexOffset argument to SliverList.builder, SliverGrid.builder, and SliverFixedExtentList.builder #174856
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
Conversation
…ilder, and SliverFixedExtentList.builder
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Code Review
This pull request correctly adds the semanticIndexOffset parameter to SliverList.builder, SliverFixedExtentList.builder, and SliverGrid.builder, enhancing accessibility features. The changes are well-tested. My feedback focuses on improving test code quality by reducing duplication and ensuring consistency in test naming.
Renzo-Olivares
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, thank you for the contribution!
Hi, @Renzo-Olivares, should I do anything else or just wait? |
|
@rodrigogmdias This PR needs a secondary review/approval, i'll try to find one and then we can land this. Thank you for your patience! |
loic-sharma
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.
Thanks for the wonderful contribution!
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
flutter/flutter@f331a55...29a238d 2025-09-15 [email protected] Roll Skia from d84a369255c4 to f950263bb3d4 (1 revision) (flutter/flutter#175354) 2025-09-15 [email protected] Roll Fuchsia Linux SDK from 4ZIBcdI2x_y8trVYz... to wzk_HjPLGu-mlg5hC... (flutter/flutter#175349) 2025-09-15 [email protected] Roll Dart SDK from 24179911b2fe to 50e61e5bff51 (2 revisions) (flutter/flutter#175346) 2025-09-15 [email protected] Roll Skia from 785f8859c7b9 to d84a369255c4 (5 revisions) (flutter/flutter#175342) 2025-09-15 [email protected] Roll Dart SDK from 628b3f869d9b to 24179911b2fe (1 revision) (flutter/flutter#175331) 2025-09-15 [email protected] Roll Skia from 4fb7e988c981 to 785f8859c7b9 (1 revision) (flutter/flutter#175330) 2025-09-14 [email protected] Roll Skia from 64c5ab69997f to 4fb7e988c981 (1 revision) (flutter/flutter#175322) 2025-09-14 [email protected] Roll Fuchsia Linux SDK from TrB_3av7CK7a5Wb0h... to 4ZIBcdI2x_y8trVYz... (flutter/flutter#175319) 2025-09-14 [email protected] Roll Skia from 7b489cee9eca to 64c5ab69997f (1 revision) (flutter/flutter#175316) 2025-09-13 [email protected] Roll Dart SDK from 5deba9e4e108 to 628b3f869d9b (1 revision) (flutter/flutter#175314) 2025-09-13 [email protected] Roll Fuchsia Linux SDK from b1AYfAFOnvBMHSsYL... to TrB_3av7CK7a5Wb0h... (flutter/flutter#175306) 2025-09-13 [email protected] Roll Dart SDK from e82f3fc8b2d5 to 5deba9e4e108 (1 revision) (flutter/flutter#175302) 2025-09-13 [email protected] Roll Skia from 3321829b90dd to 7b489cee9eca (1 revision) (flutter/flutter#175298) 2025-09-13 [email protected] [ios]Do not re-adds delaying recognizer on iOS 26 (flutter/flutter#175097) 2025-09-13 [email protected] Roll Skia from b2cdcf07b2b5 to 3321829b90dd (22 revisions) (flutter/flutter#175295) 2025-09-13 [email protected] Roll Dart SDK from 11dedad2d062 to e82f3fc8b2d5 (3 revisions) (flutter/flutter#175294) 2025-09-12 [email protected] Add semanticIndexOffset argument to SliverList.builder, SliverGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856) 2025-09-12 [email protected] Fix crash when attaching to a device with multiple active flutter apps (flutter/flutter#175147) 2025-09-12 [email protected] Update transformHitTests documentation for clarity (flutter/flutter#174286) 2025-09-12 [email protected] Roll Skia from ead9277819fc to b2cdcf07b2b5 (1 revision) (flutter/flutter#175226) 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
…ilder, and SliverFixedExtentList.builder (flutter#174856) Issue: flutter#173019 This pull request adds support for the `semanticIndexOffset` parameter to the `SliverList.builder`, `SliverFixedExtentList.builder`, and `SliverGrid.builder` constructors in Flutter. This allows developers to offset the starting semantic index for items in these slivers, which is important for accessibility scenarios (such as when combining multiple slivers). The changes are thoroughly tested with new widget tests to ensure correct behavior. **Accessibility improvements:** * Added `semanticIndexOffset` parameter to the constructors of `SliverList.builder`, `SliverFixedExtentList.builder`, and `SliverGrid.builder`, and ensured it is passed to the underlying `SliverChildBuilderDelegate`. This allows customization of the starting semantic index for sliver children. [[1]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR219) [[2]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR228) [[3]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR476) [[4]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR485) [[5]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR751) [[6]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR760) **Testing:** * Added a new test for `SliverList.builder` to verify that the `semanticIndexOffset` is respected in the generated semantics tree. [[1]](diffhunk://#diff-9aec0ee8c35ea1c71be420610fe37f772e45b5c1f715285fe76ac5ba328ea76dR366-R382) [[2]](diffhunk://#diff-9aec0ee8c35ea1c71be420610fe37f772e45b5c1f715285fe76ac5ba328ea76dR446-R474) * Added a new test for `SliverFixedExtentList.builder` to verify correct semantics index offsetting. * Added a new test for `SliverGrid.builder` to ensure it respects the `semanticIndexOffset` parameter. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Loïc Sharma <[email protected]>
…ilder, and SliverFixedExtentList.builder (flutter#174856) Issue: flutter#173019 This pull request adds support for the `semanticIndexOffset` parameter to the `SliverList.builder`, `SliverFixedExtentList.builder`, and `SliverGrid.builder` constructors in Flutter. This allows developers to offset the starting semantic index for items in these slivers, which is important for accessibility scenarios (such as when combining multiple slivers). The changes are thoroughly tested with new widget tests to ensure correct behavior. **Accessibility improvements:** * Added `semanticIndexOffset` parameter to the constructors of `SliverList.builder`, `SliverFixedExtentList.builder`, and `SliverGrid.builder`, and ensured it is passed to the underlying `SliverChildBuilderDelegate`. This allows customization of the starting semantic index for sliver children. [[1]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR219) [[2]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR228) [[3]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR476) [[4]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR485) [[5]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR751) [[6]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR760) **Testing:** * Added a new test for `SliverList.builder` to verify that the `semanticIndexOffset` is respected in the generated semantics tree. [[1]](diffhunk://#diff-9aec0ee8c35ea1c71be420610fe37f772e45b5c1f715285fe76ac5ba328ea76dR366-R382) [[2]](diffhunk://#diff-9aec0ee8c35ea1c71be420610fe37f772e45b5c1f715285fe76ac5ba328ea76dR446-R474) * Added a new test for `SliverFixedExtentList.builder` to verify correct semantics index offsetting. * Added a new test for `SliverGrid.builder` to ensure it respects the `semanticIndexOffset` parameter. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Loïc Sharma <[email protected]>
…ilder, and SliverFixedExtentList.builder (flutter#174856) Issue: flutter#173019 This pull request adds support for the `semanticIndexOffset` parameter to the `SliverList.builder`, `SliverFixedExtentList.builder`, and `SliverGrid.builder` constructors in Flutter. This allows developers to offset the starting semantic index for items in these slivers, which is important for accessibility scenarios (such as when combining multiple slivers). The changes are thoroughly tested with new widget tests to ensure correct behavior. **Accessibility improvements:** * Added `semanticIndexOffset` parameter to the constructors of `SliverList.builder`, `SliverFixedExtentList.builder`, and `SliverGrid.builder`, and ensured it is passed to the underlying `SliverChildBuilderDelegate`. This allows customization of the starting semantic index for sliver children. [[1]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR219) [[2]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR228) [[3]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR476) [[4]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR485) [[5]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR751) [[6]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR760) **Testing:** * Added a new test for `SliverList.builder` to verify that the `semanticIndexOffset` is respected in the generated semantics tree. [[1]](diffhunk://#diff-9aec0ee8c35ea1c71be420610fe37f772e45b5c1f715285fe76ac5ba328ea76dR366-R382) [[2]](diffhunk://#diff-9aec0ee8c35ea1c71be420610fe37f772e45b5c1f715285fe76ac5ba328ea76dR446-R474) * Added a new test for `SliverFixedExtentList.builder` to verify correct semantics index offsetting. * Added a new test for `SliverGrid.builder` to ensure it respects the `semanticIndexOffset` parameter. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Loïc Sharma <[email protected]>
…verGrid.builder, and SliverFixedExtentList.builder (flutter/flutter#174856)
…ilder, and SliverFixedExtentList.builder (flutter#174856) Issue: flutter#173019 This pull request adds support for the `semanticIndexOffset` parameter to the `SliverList.builder`, `SliverFixedExtentList.builder`, and `SliverGrid.builder` constructors in Flutter. This allows developers to offset the starting semantic index for items in these slivers, which is important for accessibility scenarios (such as when combining multiple slivers). The changes are thoroughly tested with new widget tests to ensure correct behavior. **Accessibility improvements:** * Added `semanticIndexOffset` parameter to the constructors of `SliverList.builder`, `SliverFixedExtentList.builder`, and `SliverGrid.builder`, and ensured it is passed to the underlying `SliverChildBuilderDelegate`. This allows customization of the starting semantic index for sliver children. [[1]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR219) [[2]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR228) [[3]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR476) [[4]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR485) [[5]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR751) [[6]](diffhunk://#diff-a7ccc8e04affff00abaa0800e680e94c325930dac396f134a70ce5c5c17f8c4dR760) **Testing:** * Added a new test for `SliverList.builder` to verify that the `semanticIndexOffset` is respected in the generated semantics tree. [[1]](diffhunk://#diff-9aec0ee8c35ea1c71be420610fe37f772e45b5c1f715285fe76ac5ba328ea76dR366-R382) [[2]](diffhunk://#diff-9aec0ee8c35ea1c71be420610fe37f772e45b5c1f715285fe76ac5ba328ea76dR446-R474) * Added a new test for `SliverFixedExtentList.builder` to verify correct semantics index offsetting. * Added a new test for `SliverGrid.builder` to ensure it respects the `semanticIndexOffset` parameter. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Loïc Sharma <[email protected]>
Issue: #173019
This pull request adds support for the
semanticIndexOffsetparameter to theSliverList.builder,SliverFixedExtentList.builder, andSliverGrid.builderconstructors in Flutter. This allows developers to offset the starting semantic index for items in these slivers, which is important for accessibility scenarios (such as when combining multiple slivers). The changes are thoroughly tested with new widget tests to ensure correct behavior.Accessibility improvements:
semanticIndexOffsetparameter to the constructors ofSliverList.builder,SliverFixedExtentList.builder, andSliverGrid.builder, and ensured it is passed to the underlyingSliverChildBuilderDelegate. This allows customization of the starting semantic index for sliver children. [1] [2] [3] [4] [5] [6]Testing:
SliverList.builderto verify that thesemanticIndexOffsetis respected in the generated semantics tree. [1] [2]SliverFixedExtentList.builderto verify correct semantics index offsetting.SliverGrid.builderto ensure it respects thesemanticIndexOffsetparameter.Pre-launch Checklist
///).