Skip to content

Validated form controls: Error messages don't reach the interactive element on delegate-based controls #76741

@mirka

Description

@mirka

For validated controls that use a hidden element as a validation delegate (ValidatedCustomSelectControl, ValidatedFormTokenField, ValidatedToggleGroupControl), the aria-describedby for the validation error message is attached to the hidden delegate element rather than the interactive control the user actually focuses. This means screen reader users will not hear the validation error when they manually focus back to the control (after the fix for #76694 is in place).

We may need to introduce a getInteractiveTarget() ref alongside getValidityTarget(), so ControlWithError can attach the error description to the element users actually interact with.

Metadata

Metadata

Assignees

Labels

[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Package] Components/packages/components[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions