Skip to content

Commit 2219de8

Browse files
vdhbeefancohen
authored andcommitted
[no-static-element-interactions] List valid interactive elements in docs (#105)
* [no-static-element-interactions] List valid interactive elements in docs Updated documentation for `no-static-element-interactions` to list the interactive elements defined in `isInteractiveElement`. * [no-static-element-interactions] Further clarification of valid interactive elements
1 parent 9b9c72b commit 2219de8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/rules/no-static-element-interactions.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Enforce non-interactive DOM elements have no interactive handlers. Static elements such as `<div>` and `<span>` should not have mouse/keyboard event listeners. Instead use something more semantic, such as a button or a link.
44

5+
Valid interactive elements are:
6+
- `<a>` elements with `href` or `tabIndex` props
7+
- `<button>` elements
8+
- `<input>` elements that are not `hidden`
9+
- `<select>` and `<option>` elements
10+
- `<textarea>` elements
11+
- `<area>` elements
12+
513
## Rule details
614

715
This rule takes no arguments.

0 commit comments

Comments
 (0)