Skip to content

Commit a556263

Browse files
author
Courtney Nguyen
committed
Added rule details cautioning the usage of disabled
1 parent 167c235 commit a556263

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/rules/no-disabled.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
Rule that `disabled` prop should be cautioned on elements. Disabling interactive elements removes the element from the accessibility tree. Consider using `aria-disabled`.
44

55
## Rule details
6-
7-
Warns usage of `disabled` property.
6+
The general consensus is that `disabled` should be used with specific intent. It goes against intuition since `disabled` is a native HTML attribute, which disables. However, from a usability stand-point it is not a good UX for screen readers: It removes the element from the a11y tree, and may omit critical information. It is best to use `aria-disabled` and add the additional JS logic to "disable" the element.
87

98
### Succeed
109
```jsx

0 commit comments

Comments
 (0)