Skip to content

Commit

Permalink
Merge branch 'main' into eslint-doc-generator
Browse files Browse the repository at this point in the history
* main:
  [Docs] `prefer-tag-over-role`: rename docs file
  • Loading branch information
bmish committed Oct 28, 2022
2 parents f27d22b + 0bdf95b commit 9dd3ce1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 31 deletions.
30 changes: 0 additions & 30 deletions docs/rules/element-roles.md

This file was deleted.

29 changes: 28 additions & 1 deletion docs/rules/prefer-tag-over-role.md
Expand Up @@ -2,4 +2,31 @@

<!-- end auto-generated rule header -->

TODO
Enforces using semantic DOM elements over the ARIA `role` property.

## Rule details

This rule takes no arguments.

### Succeed

```jsx
<div>...</div>
<header>...</header>
<img alt="" src="image.jpg" />
```

### Fail

```jsx
<div role="checkbox">
<div role="img">
```

## Accessibility guidelines

- [WAI-ARIA Roles model](https://www.w3.org/TR/wai-aria-1.0/roles)

### Resources

- [MDN WAI-ARIA Roles](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles)

0 comments on commit 9dd3ce1

Please sign in to comment.