@amazon-devices/eslint-plugin-kepler 0.1.15-rn-83 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/formatters/default.js +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -83
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ To use Vega ESLint Plugin, complete the below steps in your Vega App Project.
|
|
|
37
37
|
|
|
38
38
|
Available configs:
|
|
39
39
|
- `kepler` - All Vega rules (performance + system distributed library checks + API privileges + backward compatibility + component migration)
|
|
40
|
+
- `accessibility` - React Native accessibility rules only
|
|
40
41
|
- `performance` - Performance-related rules only
|
|
41
42
|
- `system-distributed-libs` - System distributed library checks (package.json validation and import informational flagging)
|
|
42
43
|
- `api-privileges` - API privileges validation rules
|
|
@@ -48,6 +49,7 @@ To use Vega ESLint Plugin, complete the below steps in your Vega App Project.
|
|
|
48
49
|
module.exports = {
|
|
49
50
|
plugins: ["@amazon-devices/eslint-plugin-kepler"],
|
|
50
51
|
extends: [
|
|
52
|
+
"plugin:@amazon-devices/eslint-plugin-kepler/accessibility",
|
|
51
53
|
"plugin:@amazon-devices/eslint-plugin-kepler/performance",
|
|
52
54
|
"plugin:@amazon-devices/eslint-plugin-kepler/system-distributed-libs",
|
|
53
55
|
"plugin:@amazon-devices/eslint-plugin-kepler/api-privileges",
|
|
@@ -190,6 +192,34 @@ To use Vega ESLint Plugin, complete the below steps in your Vega App Project.
|
|
|
190
192
|
],
|
|
191
193
|
```
|
|
192
194
|
|
|
195
|
+
## Accessibility Rules
|
|
196
|
+
|
|
197
|
+
The plugin includes React Native accessibility rules that can be enabled through the `plugin:@amazon-devices/eslint-plugin-kepler/accessibility` preset or through the full `kepler` preset:
|
|
198
|
+
|
|
199
|
+
### `@amazon-devices/kepler/missing-accessible-label`
|
|
200
|
+
Requires interactive and informative React Native elements to expose an accessible label through `aria-label`, `accessibilityLabel`, `aria-labelledby`, `accessibilityLabelledBy`, nested text, or component-specific supported props such as `Button.title`.
|
|
201
|
+
|
|
202
|
+
### `@amazon-devices/kepler/missing-accessibility-role`
|
|
203
|
+
Requires interactive React Native elements to expose a role when the role is not already implicit for the component.
|
|
204
|
+
|
|
205
|
+
### `@amazon-devices/kepler/missing-accessibility-hint`
|
|
206
|
+
Encourages interactive React Native elements to provide an `accessibilityHint` describing the result of the action.
|
|
207
|
+
|
|
208
|
+
### `@amazon-devices/kepler/missing-accessibility-state`
|
|
209
|
+
Requires stateful roles such as `switch`, `checkbox`, `radio`, and `tab` to expose their toggle or selection state with `aria-checked`, `aria-selected`, or `accessibilityState`.
|
|
210
|
+
|
|
211
|
+
### `@amazon-devices/kepler/invalid-role-value`
|
|
212
|
+
Validates `role` and `accessibilityRole` values against the supported Kepler React Native role sets.
|
|
213
|
+
|
|
214
|
+
### `@amazon-devices/kepler/deprecated-prop-rename`
|
|
215
|
+
Flags deprecated React Native accessibility props and recommends the supported ARIA replacement when a direct swap is available.
|
|
216
|
+
|
|
217
|
+
### `@amazon-devices/kepler/dangling-described-by-ref`
|
|
218
|
+
Ensures `accessibilityDescribedBy` points to a `nativeID` that exists in the same file.
|
|
219
|
+
|
|
220
|
+
### `@amazon-devices/kepler/dangling-transport-control-ref`
|
|
221
|
+
Ensures `transportControls` points to valid `nativeID` values in the same file.
|
|
222
|
+
|
|
193
223
|
## System Distributed Library Rules
|
|
194
224
|
|
|
195
225
|
The plugin includes rules for managing system distributed libraries:
|