FormidableLabs / eslint-plugin-react-native-a11y

React Native specific accessibility linting rules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

accessibilityState doesn't recognize boolean value in checked variable

reedwilliams24 opened this issue · comments

Building off of this previous issue that was fixed in #85.

const itemChecked = true;

...

<TouchableHighlight accessibilityState={{ checked: itemChecked }} /> // error
<TouchableHighlight accessibilityState={{ selected: itemChecked }} /> // no error

Looks like this check needs to be added around this error as well.

commented

hey @reedwilliams24 -- thank you so much for raising this bug. I've just published a new release that includes a fix for this.

No problem @jpdriver - thanks for the quick fix.