Screen readers do not announce helper and error text when user is focused on the input or textarea. This does not align with the accessibility guidelines.
What is the new behavior?
The appropriate aria tags are added to the native input and textarea in order to associate them to the helper and error texts.
aria-describedBy will only be added to the native element based on helper or error text. If helper text exists then the helper text ID will be used. If the error text exists and the component has the ion-touched ion-invalid classes, then the error text ID will be used.
aria-invalid will only be added if the error text exists and the component has the ion-touched ion-invalid classes.
Issue number: internal
What is the current behavior?
Screen readers do not announce helper and error text when user is focused on the input or textarea. This does not align with the accessibility guidelines.
What is the new behavior?
aria
tags are added to the native input and textarea in order to associate them to the helper and error texts.aria-describedBy
will only be added to the native element based on helper or error text. If helper text exists then the helper text ID will be used. If the error text exists and the component has theion-touched ion-invalid
classes, then the error text ID will be used.aria-invalid
will only be added if the error text exists and the component has theion-touched ion-invalid
classes.Does this introduce a breaking change?
Other information
How to test:
main
branchROU-11274
branchmain
branchROU-11274
branchKnown Webkit issues: This fix will not work on macOS 16 and 17 as VoiceOver will not read any text using
aria-describedby
. Works fine on macOS 18.