Skip to content

Commit 01ff05a

Browse files
authored
allow Toucables with accessible=false (#130)
1 parent f176ef2 commit 01ff05a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

__tests__/src/rules/has-valid-accessibility-descriptors-test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ ruleTester.run('has-valid-accessibility-descriptors', rule, {
6565
},
6666
{
6767
code: `<TextInput accessibilityLabel="Accessibility label." />`,
68-
errors: [expectedError],
68+
},
69+
{
70+
code: `<TouchableOpacity accessible={false}>
71+
<Text>Back</Text>
72+
</TouchableOpacity>`,
6973
},
7074
].map(parserOptionsMapper),
7175
invalid: [

src/rules/has-valid-accessibility-descriptors.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = {
3333
'accessibilityRole',
3434
'accessibilityLabel',
3535
'accessibilityActions',
36+
'accessible',
3637
])
3738
) {
3839
context.report({

0 commit comments

Comments
 (0)