Skip to content

fix(input): improve error text accessibility #30635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

fix(input): improve error text accessibility #30635

wants to merge 8 commits into from

Conversation

ShaneK
Copy link
Member

@ShaneK ShaneK commented Aug 14, 2025

Issue number: resolves internal


What is the current behavior?

Currently, when an error text is shown, it may not announce itself to voice assistants. This is because the way error text currently works is by always existing in the DOM, but being hidden when there is no error. When the error state changes, the error text is shown, but as far as the voice assistant can tell it's always been there and nothing has changed.

What is the new behavior?

With these changes, both input and textarea have been updated so they'll properly announce error text when it shows up. We had to do this with a mutation observer and state because it's important in some frameworks, like Angular, that state changes to cause a re-render. This, combined with some minor aria changes, makes it so that when a field is declared invalid, it immediately announces the invalid state instead of waiting for the user to go back to the invalid field.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Current dev build:

8.7.3-dev.11755622775.1fc05815

Screens

Textarea
Input

@ShaneK ShaneK requested a review from brandyscarney August 14, 2025 18:38
@ShaneK ShaneK requested a review from a team as a code owner August 14, 2025 18:38
Copy link

vercel bot commented Aug 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ionic-framework Ready Ready Preview Comment Aug 21, 2025 8:45pm

@github-actions github-actions bot added the package: core @ionic/core package label Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant