question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Accessibility Bug

See original GitHub issue

Description

Enabling Accessibility is reading out parent’s accessibilityRole first and then reading out children’s accessibilityRole. Expected: Accessibility should read children’s accessibilityRole first and then parent’s accessibilityRole.

Lets take following example:

<TouchableOpacity accessible=“true” accessibilityRole=“button">
      <Text>Hi I am First Text Element</Text>
      <Text>Hi I am Second Text Element</Text>
      <Text>Hi I am Third Text Element</Text>
</TouchableOpacity >

Here, TouchableOpacity’s accessibilityRole is reading out first and then Text 1, Text 2, Text 3 and so on.

React Native version:

System: OS: macOS 10.15.7 CPU: (12) x64 Intel® Core™ i7-8850H CPU @ 2.60GHz Memory: 413.25 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 15.0.1 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.0.3 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0 IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 12.1/12A7403 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: react-native-cli: 2.0.1

Steps To Reproduce

Enable Accessibility Click on the Parent Component(TouchableOpacity)

Expected Results

Accessibility should read children’s first and then parent’s accessibilityRole.

Snack, code example, screenshot, or link to a repository:

<TouchableOpacity accessible=“true” accessibilityRole=“button">
      <Text>Hi I am First Text Element</Text>
      <Text>Hi I am Second Text Element</Text>
      <Text>Hi I am Third Text Element</Text>
</TouchableOpacity >

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
blavallacommented, Jun 1, 2022

Just to clarify a few things here.

  1. This is still an issue, and is related to the way that Talkback combines element descriptions (see #31042 for all the details).
  2. This is being worked on in this PR https://github.com/facebook/react-native/pull/33690
  3. The original issues “expected behavior”, written as “Accessibility should read children’s accessibilityRole first and then parent’s accessibilityRole.” is actually incorrect. An element can only really have one role, even if it’s made up of the combination of other elements. So there is never a case where both the parent’s role and the child’s role should be announced. Talkback will always defer to the parent in this case, and whatever role it has, as it only pulls up the contentDescription/text of the child when combining them. This is by design so that you don’t end up with elements that have two conflicting roles (for example, “button” and “slider”). Generally speaking, if the child has a role defined, it should probably also be accessible on its own, and therefore won’t get pulled up into its parents announcement in the first place.

Once the above PR is finished, the core of this issue will be resolved and the example in the issue would be announced as:

“Hi I am First Text Element, Hi I am Second Text Element, Hi I am Third Text Element, button”

1reaction
amarlettecommented, Mar 18, 2021

This issue should be resolved by #31042 once that issue is closed as part of the Improved React Native Accessibility Project

Read more comments on GitHub >

github_iconTop Results From Across the Web

Team guide - , - Accessibility bugs - BBC Open Source
Accessibility bugs don't just apply to users with disabilities. Accessibility bugs mean that our content is not available to and accessible to as...
Read more >
Why accessibility bugs are a good thing and how to handle them
Many accessibility bugs are particular to the user's environment. They can be device, operating system, browser, and assistive technology-specific, and even sub ...
Read more >
How & Where to report accessibility bugs - DigitalA11Y
The following table provides you with information on where you can raise accessibility bugs for browsers & assistive technologies. Bug Tracker, URL, Details/Bug ......
Read more >
How to file ARIA-related bugs - Accessibility - MDN Web Docs
If you notice an implementation issue, please take a little time and let the developers know. Here's where to file bugs:
Read more >
The Accessibility Bugs Introduced and Resolved in iOS 16 for ...
Apple has released iOS 16 to the public. This post contains details of the VoiceOver, low vision, and Braille bugs which we believe...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found