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
fix(android): a11y - do not provide content description for TextView elements #9673
fix(android): a11y - do not provide content description for TextView elements #9673
Conversation
…xtView elements Android accessibility services automatically announce the text itself as the description (see https://developer.android.com/guide/topics/ui/accessibility/apps#describe-ui-element) fixes NativeScript#9588
|
One test is failing: test_automation_text_set_to_native For some reason, my change causes a new issue: My check for |
If an accessibility-property is provided, the content description should also be set for TextView elements to keep the support for Labels/Buttons that only have a font icon as text and therefore need to have an accessibilityLabel.
|
Now all tests are succeeding, at least when running them on my local machine. |
2890381
into
NativeScript:release/8.2.0
…elements (#9673) Android accessibility services automatically announce the text itself as the description (see https://developer.android.com/guide/topics/ui/accessibility/apps#describe-ui-element) If an a11y property is provided, the content description should also be set for TextView elements to keep the support for Labels/Buttons that only have a font icon as text and therefore need to have an accessibilityLabel. Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com> closes #9588
…elements (#9673) Android accessibility services automatically announce the text itself as the description (see https://developer.android.com/guide/topics/ui/accessibility/apps#describe-ui-element) If an a11y property is provided, the content description should also be set for TextView elements to keep the support for Labels/Buttons that only have a font icon as text and therefore need to have an accessibilityLabel. Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com> closes #9588
…elements (#9673) Android accessibility services automatically announce the text itself as the description (see https://developer.android.com/guide/topics/ui/accessibility/apps#describe-ui-element) If an a11y property is provided, the content description should also be set for TextView elements to keep the support for Labels/Buttons that only have a font icon as text and therefore need to have an accessibilityLabel. Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com> closes #9588
…elements (#9673) Android accessibility services automatically announce the text itself as the description (see https://developer.android.com/guide/topics/ui/accessibility/apps#describe-ui-element) If an a11y property is provided, the content description should also be set for TextView elements to keep the support for Labels/Buttons that only have a font icon as text and therefore need to have an accessibilityLabel. Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com> closes #9588
…elements (#9673) Android accessibility services automatically announce the text itself as the description (see https://developer.android.com/guide/topics/ui/accessibility/apps#describe-ui-element) If an a11y property is provided, the content description should also be set for TextView elements to keep the support for Labels/Buttons that only have a font icon as text and therefore need to have an accessibilityLabel. Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com> closes #9588
fix(android-accessibility): do not provide content description for TextView elements
Android accessibility services automatically announce the text itself as the description (see https://developer.android.com/guide/topics/ui/accessibility/apps#describe-ui-element)
fixes #9588
PR Checklist
What is the current behavior?
Right now, content descriptions are also applied to Labels (Android TextViews) which breaks accessibility when using Labels/FormattedStrings with databinding or inside RadListViews.
The Android docs say:
What is the new behavior?
The assignment of a content description is skipped for TextView elements, now screenreaders (e.g. Google Talkback) are reading the text of a Label correctly in all situations (simple Label, FormattedString, databinding with some delay, inside RadListViews, etc...).
Fixes #9588 .