# generic

> The `generic` ARIA role is used for elements that don't have a specific semantic meaning but need to be included in the accessibility tree.

## What is the ARIA generic role and should I ever set it?

The nameless role that browsers assign to elements without semantic meaning, such as `<div>` and `<span>`. Authors should not set it explicitly, since it adds nothing for assistive technologies.

- Topic: Structural Elements
- Type: role

## Example

Wrong:

```html
<div aria-label="Close" onclick="close()">
  ×
</div>
```

Right:

```html
<button type="button" aria-label="Close" onclick="close()">
  ×
</button>
```

A `<div>` is `generic` and cannot take a name; a `<button>` gives role, name and keyboard support.

## Common mistakes

- Putting `aria-label` on a `<div>` and expecting it to be read.
- Building buttons from `<div>`s that stay `generic` to assistive technologies.

## Key points

- No element sets `role="generic"` explicitly.
- Interactive or meaningful content is not left as `<div>` or `<span>` with click handlers.
- `aria-label` is not set on plain `<div>` or `<span>`, where the role prohibits naming.

## Interview questions

### Why is `aria-label` ignored on a `<div>`?

A plain `<div>` has the `generic` role, which prohibits an accessible name, so many screen readers ignore the label.

### What is the difference between `generic` and `none`?

Both have no meaning. `generic` is what browsers assign to `<div>` and `<span>`; `none` is set by authors to remove an element's role.

## Related cards

- [presentation, none](https://wonderium.dev/a11y/presentation-none.md)
- [`<div>`](https://wonderium.dev/html/div.md)
- [`<span>`](https://wonderium.dev/html/span.md)
- [\[aria-label\]](https://wonderium.dev/a11y/aria-label.md)
- [button](https://wonderium.dev/a11y/button.md)

---

- Level: [Accessibility](https://wonderium.dev/a11y.md)
- HTML version: https://wonderium.dev/a11y/generic
- Last updated: 2026-11-25
