From 141e28d1de3446c41cff5ee167977ebf9face83c Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Wed, 19 Nov 2025 14:31:04 -0800 Subject: [PATCH] fix: Correct ARIA label is for invalid values. (#9469) ## The basics - [x] I [validated my changes](https://developers.google.com/blockly/guides/contribute/core#making_and_verifying_a_change) ## The details ### Resolves Fixes #9466 ### Proposed Changes Ensures `FieldInput`'s ARIA labels are recomputed when an invalid value is attempted to be set. ### Reason for Changes Previously the `FieldInput` would continuously update its ARIA label as the value changed, including for invalid values. If the editor was cancelled this would correctly revert but if an invalid value was attempted to be saved then it would cancel the update but not correct the ARIA label. ### Test Coverage No new tests are needed for this experimental change. This has been manually verified locally using `FieldNumber` in Core's advanced playground. ### Documentation No documentation changes are needed for this experimental change. ### Additional Information None. --- core/field_input.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/field_input.ts b/core/field_input.ts index 244c6da42..696e23079 100644 --- a/core/field_input.ts +++ b/core/field_input.ts @@ -227,6 +227,7 @@ export abstract class FieldInput extends Field< const oldValue = this.value_; // Revert value when the text becomes invalid. this.value_ = this.valueWhenEditorWasOpened_; + this.recomputeAriaLabel(); if ( this.sourceBlock_ && eventUtils.isEnabled() &&