Skip to content

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

Closed

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

Activity

  1. BenHenning commented on Nov 13, 2025

    @BenHenning
    Contributor

    Wow. I'm pretty sure I tested this flow a while back but we've made a bunch of changes to field labeling and it probably broke (or maybe I didn't check going back to the field). Nice catch!

  2. self-assigned this
    on Nov 13, 2025
  3. BenHenning commented on Nov 13, 2025

    @BenHenning
    Contributor

    Sent #9469 to fix. Fortunately a very easy fix.

  4. added a commit that references this issue on Nov 19, 2025
    141e28d
  5. BenHenning commented on Nov 19, 2025

    @BenHenning
    Contributor

    Fixed in #9469.

  6. moved this from Todo to Done in Blocklyon Nov 25, 2025
  7. added theissue type on Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

status: triageIssues awaiting triage by a Blockly team member

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions