Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 550 Bytes

prefer-tag-over-role.md

File metadata and controls

32 lines (20 loc) · 550 Bytes

jsx-a11y/prefer-tag-over-role

Enforces using semantic DOM elements over the ARIA role property.

Rule details

This rule takes no arguments.

Succeed

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

Fail

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

Accessibility guidelines

Resources