fix: Coalesce adjacent field labels#9996
Merged
Merged
Conversation
maribethb
approved these changes
Jun 17, 2026
| /** | ||
| * Returns whether an input's list of visible fields begins with a FieldLabel | ||
| * | ||
| * @internal |
Contributor
There was a problem hiding this comment.
You don't need to mark these as internal because they already aren't exported from this file
| assert.include(label, 'third fourth'); | ||
| }); | ||
| test('Statement inputs are not combined', function () { | ||
| const statementBlock = Blockly.Xml.domToBlock( |
Contributor
There was a problem hiding this comment.
prefer using json for these kinds of tests (even if older existing tests use xml).
…ml to functional block creation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The basics
The details
Resolves
Fixes #9855
Proposed Changes
Coalesces adjacent field labels, taking into account whether the labels are on the same visual row.
Reason for Changes
Blocks built in ways where multiple labels are next to one another were computed as being comma separated when building out the block's ARIA label. This is confusing for users as these labels are treated as a single string for sighted users while being read as separate strings for screenreader users.
Test Coverage
Unit tests have been added to cover the edge cases around this change.