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: site/content/docs/05-accessibility-warnings.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,6 +213,20 @@ Enforce that `on:mouseover` and `on:mouseout` are accompanied by `on:focus` and
213
213
214
214
---
215
215
216
+
### `a11y-no-redundant-roles`
217
+
218
+
Some HTML elements have default ARIA roles. Giving these elements an ARIA role that is already set by the browser [has no effect](https://www.w3.org/TR/using-aria/#aria-does-nothing) and is redundant.
219
+
220
+
```sv
221
+
<!-- A11y: Redundant role 'button' -->
222
+
<button role="button" />
223
+
224
+
<!-- A11y: Redundant role 'img' -->
225
+
<img role="img" src="foo.jpg" />
226
+
```
227
+
228
+
---
229
+
216
230
### `a11y-positive-tabindex`
217
231
218
232
Avoid positive `tabindex` property values. This will move elements out of the expected tab order, creating a confusing experience for keyboard users.
0 commit comments