Tab on iOS - unable to override default accessibilityValue (tab description), no accessibilityRole communicated, no matching accessibilityTrait to provide. #30610
Labels
Needs: Triage 🔍
Platform: iOS
iOS applications.
Stale
There has been a lack of activity on this issue and it may be closed soon.
Hi,
I'm running into an issue with accessibility trying to use any touchable component as a tab on iOS.
When the component's role is set to 'tab' on iOS, it will include an accessibilityValue 'Tab description' that cannot be overridden in any way. I tested this on Android, where the behaviour is correct and the 'Tab description' is not present.
To solve the issue, I tried to override the accessibilityValue with
accessibilityValue={{text: 'new value'}}
, but rather than overwriting it, it appends the string after, resulting in 'Tab description, new value' in the announcement.In the same time, on iOS the role of the component is not announced. I tried following the example of native iOS apps where the tab items are communicated with accessibilityTraits: button, tab, but currently there is no way to provide 'tab' as an accessibilityTrait.
React Native version:
0.63.4 (replicated on 0.63.2 and 0.63.3)
Full react-native info output below:
Steps To Reproduce
Scenario A - no attempt to override the value
Create a simple Touchable component and add accessibility props: accessibilityRole, accessibilityLabel, accessibilityState (example A in code section below)
Open Accessibility Inspector and navigate to the element. See the result:
Announcement does not include the role, but does include the 'tab description' string.
Scenario B - attempting to override the value
Announcement does not include the role, but does include the 'tab description' string.
Expected Results
Snack, code example, screenshot, or link to a repository:
Example A: no override for default value
Example B: override for default value
The text was updated successfully, but these errors were encountered: