-
Notifications
You must be signed in to change notification settings - Fork 273
bug: *ByA11yState
query ignores default state values of false
#1165
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
Comments
I have one question, is state read by the screen reader if there's no role? Does it even make sense? Looking at the MDN docs, only |
@AugustinLF this is a valid question, I guess we already have the I have a couple of thoughts about this query:
|
Yeah, I agree. We can fix the current behaviour for now, and see what is the future way forward. |
Describe the bug
When using
*ByA11yState
queries they perform match given element only when given option has the exact values as passed.Current behavior
getByA11yState({ disabled: true })
will match<View accessibilityState={{ disabled: true }} />
(OK)getByA11yState({ disabled: false })
will match<View accessibilityState={{ disabled: false }} />
(OK)getByA11yState({ disabled: false })
will NOT match<View accessibilityState={{}} />
(NOT OK)Expected behavior
getByA11yState({ disabled: false })
should match<View />
false
if not specified otherwise.Versions
11.2.0 and below
Related issues
#1161 - issue where we discovered the bug
CC: @thymikee @AugustinLF @pierrezimmermannbam
The text was updated successfully, but these errors were encountered: