Screen reader - toolbox and flyout position and count readout inconsistencies

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

When navigating the toolbox, and at least one flyout, the treeitem / block position and total counts are inconsistent and can be incorrect. See the screen recording below, noting the change from the "p5 blocks" toolbox item, into the "Misc" and "A subcategory" tree items. Also note the readout while navigating through the flyout items when inside the "p5 blocks" flyout.

Reproduction steps

  1. Use https://google.github.io/blockly-keyboard-experimentation/screenreader/
  2. With a screen reader switched on, note the inconsistencies in item position and count while navigating to the last toolbox items, and flyout items.

Stack trace

Screenshots

Screen.Recording.2025-09-24.at.11.19.40.mov

Browsers

No response