Gathering detailed insights and metrics for eslint-plugin-react-native-a11y
Gathering detailed insights and metrics for eslint-plugin-react-native-a11y
Gathering detailed insights and metrics for eslint-plugin-react-native-a11y
Gathering detailed insights and metrics for eslint-plugin-react-native-a11y
@anolilab/eslint-config
ESLint shareable config for the Anolilab JavaScript style guide.
eslint-plugin-rn-a11y
ESLint Plugin for Accessibility on React Native
eslint-plugin-react-native-accessibility
React Native specific accessibility linting rules.
eslint-config-get-off-my-lawn
A highly opinionated, sharable config of ESLint rules to produce beautiful, readable JavaScript.
React Native specific accessibility linting rules.
npm install eslint-plugin-react-native-a11y
Typescript
Module System
Min. Node Version
Node Version
NPM Version
89.8
Supply Chain
94.5
Quality
82.6
Maintenance
100
Vulnerability
97
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
299 Stars
125 Commits
28 Forks
47 Watchers
5 Branches
64 Contributors
Updated on Jun 16, 2025
Latest Version
3.5.1
Package Id
eslint-plugin-react-native-a11y@3.5.1
Unpacked Size
66.07 kB
Size
16.21 kB
File Count
36
NPM Version
10.7.0
Node Version
18.20.4
Published on
Nov 04, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
1
23
Eslint-plugin-react-native-a11y is a collection of React Native specific ESLint rules for identifying accessibility issues. Building upon the foundation set down by eslint-plugin-jsx-a11y, eslint-plugin-react-native-a11y detects a few of the most commonly made accessibility issues found in react native apps. These rules make it easier for your apps to be navigable by users with screen readers.
Before starting, check you already have ESLint as a devDependency
of your project.
Projects created using
react-native init
will already have this, but for Expo depending on your template you may need to follow ESLint's installation instructions.
Next, install eslint-plugin-react-native-a11y
:
1npm install eslint-plugin-react-native-a11y --save-dev 2 3# or 4 5yarn add eslint-plugin-react-native-a11y --dev
Note: If you installed ESLint globally (using the -g
flag in npm, or the global
prefix in yarn) then you must also install eslint-plugin-react-native-a11y
globally.
This plugin exposes four recommended configs.
Name | Description |
---|---|
basic | Only use basic validation rules common to both iOS & Android |
ios | Use all rules from "basic", plus iOS-specific extras |
android | Use all rules from "basic", plus Android-specific extras |
all | Use all rules from "basic", plus iOS-specific extras, plus Android-specific extras |
If your project only supports a single platform, you may get the best experience using a platform-specific config. This will both avoid reporting issues which do not affect your platform and also results in slightly faster linting for larger projects.
If you are unsure which one to use, in most cases
all
can be safely used.
Add the config you want to use to the extends
section of your ESLint config using the pattern plugin:react-native-a11y/
followed by your config name, as shown below:
1// .eslintrc.js 2 3module.exports = { 4 root: true, 5 extends: ['@react-native-community', 'plugin:react-native-a11y/ios'], 6};
Alternatively if you do not want to use one of the pre-defined configs — or want to override the behaviour of a specific rule — you can always include a list rules and configurations in the rules
section of your ESLint config.
1// .eslintrc.js 2 3module.exports = { 4 root: true, 5 extends: ['@react-native-community'], 6 rules: { 7 'react-native-a11y/rule-name': 2, 8 }, 9};
For more information on configuring behaviour of an individual rule, please refer to the ESLint docs
accessibilityHint
is used in conjunction with accessibilityLabel
<Touchable\*>
components only have either the accessibilityRole
prop or both accessibilityTraits
and accessibilityComponentType
props setaccessibilityActions
and onAccessibilityAction
props are validaccessibilityRole
property value is validaccessibilityState
property value is validaccessibilityStates
property value is validaccessibilityComponentType
property value is validaccessibilityTraits
and accessibilityComponentType
prop values must be validaccessibilityValue
property value is validaccessible={true}
, that there are no touchable elements insideaccessibilityIgnoresInvertColors
to avoid being inverted by device color settings.accessibilityLiveRegion
prop values must be validimportantForAccessibility
property value is validThe following options are available to customize the recommended rule set.
react-native-a11y/has-accessibility-props
and react-native-a11y/no-nested-touchables
allow you to define an array of names for custom components that you may have that conform to the same accessibility interfaces as Touchables.
1"react-native-a11y/has-accessibility-props": [ 2 "error", 3 { 4 "touchables": ["TouchableCustom"] 5 } 6]
react-native-a11y/has-valid-accessibility-ignores-invert-colors
allows you to optionally define an Array of component names to check in addition to <Image />
.
For more information, see the rule docs.
1"react-native-a11y/has-valid-accessibility-ignores-invert-colors": [ 2 "error", 3 { 4 "invertableComponents": [ 5 "FastImage", 6 ] 7 } 8]
If you are developing new rules for this project, you can use the create-rule
script to scaffold the new files.
$ ./scripts/create-rule.js my-new-rule
This project started as a fork of eslint-plugin-jsx-a11y and a lot of the work was carried out by its contributors, to whom we owe a lot!
eslint-plugin-react-native-a11y is licensed under the MIT License.
Active: Nearform is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 8/26 approved changesets -- score normalized to 3
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More