You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: react/README.md
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,19 @@
245
245
<img src="hello.jpg" alt="Me waving hello" />
246
246
```
247
247
248
+
- Use only valid, non-abstract [ARIA roles](https://www.w3.org/TR/wai-aria/roles#role_definitions). eslint: [`jsx-a11y/valid-aria-role`](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/valid-aria-role.md)
249
+
250
+
```javascript
251
+
// bad - not an ARIA role
252
+
<div role="datepicker"></div>
253
+
254
+
// bad - abstract ARIA role
255
+
<div role="range"></div>
256
+
257
+
// good
258
+
<div role="button"></div>
259
+
```
260
+
248
261
## Parentheses
249
262
250
263
- Wrap JSX tags in parentheses when they span more than one line. eslint: [`react/wrap-multilines`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/wrap-multilines.md)
0 commit comments