Skip to content

Conversation

@rodrigogmdias
Copy link
Contributor

@rodrigogmdias rodrigogmdias commented Sep 2, 2025

Issue: #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] [2] [3] [4] [5] [6]

Testing:

  • Added a new test for SliverList.builder to verify that the semanticIndexOffset is respected in the generated semantics tree. [1] [2]
  • 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

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

@google-cla
Copy link

google-cla bot commented Sep 2, 2025

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.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Sep 2, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Copy link
Contributor

@Renzo-Olivares Renzo-Olivares left a 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!

@rodrigogmdias
Copy link
Contributor Author

LGTM, thank you for the contribution!

Hi, @Renzo-Olivares, should I do anything else or just wait?

@Renzo-Olivares
Copy link
Contributor

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

Copy link
Member

@loic-sharma loic-sharma left a 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!

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 12, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Sep 12, 2025
Merged via the queue into flutter:master with commit adca933 Sep 12, 2025
79 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 12, 2025
@rodrigogmdias rodrigogmdias deleted the fix173019 branch September 13, 2025 04:03
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 15, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Sep 15, 2025
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
dixita0607 pushed a commit to dixita0607/flutter that referenced this pull request Sep 17, 2025
…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]>
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…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]>
Jaineel-Mamtora pushed a commit to Jaineel-Mamtora/flutter_forked that referenced this pull request Sep 24, 2025
…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]>
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
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants