---
url: /docs/guide/usage/linter/rules/jsx_a11y/prefer-tag-over-role.md
---

### What it does

Enforces using semantic HTML tags over `role` attribute.

### Why is this bad?

Using semantic HTML tags can improve accessibility and readability of the code.

### Examples

Examples of **incorrect** code for this rule:

```jsx
<div role="button" />
```

Examples of **correct** code for this rule:

```jsx
<button />
```

## How to use

## Version

This rule was added in v0.1.1.

## References
