Skip to content

Commit a6da4bb

Browse files
committed
[eslint config] [react] [breaking] enable aria rules:
- `jsx-a11y/aria-props` - `jsx-a11y/aria-proptypes` - `jsx-a11y/aria-unsupported-elements` - `jsx-a11y/role-has-required-aria-props` - `jsx-a11y/role-supports-aria-props`
1 parent 6857f7a commit a6da4bb

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

packages/eslint-config-airbnb/rules/react-a11y.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,17 @@ module.exports = {
1212
'jsx-a11y/aria-role': 2,
1313

1414
// Enforce all aria-* props are valid.
15-
// TODO: enable
1615
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md
17-
'jsx-a11y/aria-props': 0,
16+
'jsx-a11y/aria-props': 2,
1817

1918
// Enforce ARIA state and property values are valid.
20-
// TODO: enable
2119
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md
22-
'jsx-a11y/aria-proptypes': 0,
20+
'jsx-a11y/aria-proptypes': 2,
2321

2422
// Enforce that elements that do not support ARIA roles, states, and
2523
// properties do not have those attributes.
26-
// TODO: enable
2724
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md
28-
'jsx-a11y/aria-unsupported-elements': 0,
25+
'jsx-a11y/aria-unsupported-elements': 2,
2926

3027
// disallow href "#"
3128
// TODO: enable
@@ -69,15 +66,13 @@ module.exports = {
6966

7067
// Enforce that elements with ARIA roles must have all required attributes
7168
// for that role.
72-
// TODO: enable
7369
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md
74-
'jsx-a11y/role-has-required-aria-props': 0,
70+
'jsx-a11y/role-has-required-aria-props': 2,
7571

7672
// Enforce that elements with explicit or implicit roles defined contain
7773
// only aria-* properties supported by that role.
78-
// TODO: enable
7974
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md
80-
'jsx-a11y/role-supports-aria-props': 0,
75+
'jsx-a11y/role-supports-aria-props': 2,
8176

8277
// Enforce tabIndex value is not greater than zero.
8378
// TODO: evaluate

0 commit comments

Comments
 (0)