Skip to content

[Screen reader] Incorrect aria-label after entering an invalid value in input #9466

@microbit-robert

Description

@microbit-robert

Check for duplicates

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

Description

Something goes wrong when editing a number field if you enter an invalid value. If you edit a number field by entering "3whoops", the input is invalid. The input value reverts to what it previously was (e.g., 400), however, the aria-label for the input now includes "3" and not "400". This doesn't seem to go wrong if the number is at the end of the invalid input. Refocusing the input doesn't correct the aria-label. I don't know how far this extends to other inputs or what other values the user can enter to make this fail.

Reproduction steps

  1. Go to the screen reader test page
  2. Turn on a screen reader and navigate to or inspect the aria-label for the "width" input in the "create canvas" block and note that it is currently "400"
  3. Edit the field and enter "3whoops" - this is invalid and when hitting "Enter" the value will revert to "400"
  4. Note that the aria-label for the input is now "3" instead of "400"

Priority

No response

Stack trace

Screenshots

Screen.Recording.2025-11-12.at.09.36.27.mov

Browsers

No response

Metadata

Metadata

Assignees

Labels

issue: bugDescribes why the code or behaviour is wrongissue: triageIssues awaiting triage by a Blockly team member

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions