Skip to content

Commit 83161d2

Browse files
authored
First stab at definition of "disabled"
1 parent 8e05cfe commit 83161d2

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

pages/glossary/disabled.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,31 @@ title: Disabled
33
key: disabled
44
---
55

6-
TODO
6+
An element that is normally [perceivable][] and [operable][], but has been rendered [inoperable][operable] either temporarily or permanently, is considered disabled. While there exists several techniques through which elements can be disabled, the most typical are:
7+
8+
1. The [`disabled`][disabled] attribute. The presence of this attribute, regardless of its value, either
9+
10+
- on a [`button`][button], [`input`][input], [`select`][select], [`textarea`][textarea], or [form-associated custom element][]; or
11+
- on a [`fieldset`][fieldset] element
12+
13+
will disable the element itself if it is not a [`fieldset`][fieldset] or, if it is, will disable any [descendants][descendant] of the element, excluding those that are [descendants][descendant] of the first [`legend`][legend] [child][] of the element.
14+
15+
**Note:** When the [`disabled`][disabled] attribute is specified on a [`fieldset`][fieldset] element, [shadow-including descendants][shadow-including descendant] are **not** disabled.
16+
17+
2. The [`aria-disabled`][aria-disabled] attribute. The presence of this attribute with a value of `true` will semantically disable an element and its [focusable][] [shadow-including descendants][shadow-including descendant].
18+
19+
[operable]: https://www.w3.org/TR/wai-aria/#dfn-operable
20+
[perceivable]: https://www.w3.org/TR/wai-aria/#dfn-perceivable
21+
[aria-disabled]: https://www.w3.org/TR/wai-aria/#aria-disabled
22+
[disabled]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-disabled
23+
[form-associated custom element]: https://html.spec.whatwg.org/multipage/custom-elements.html#form-associated-custom-element
24+
[button]: https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element
25+
[input]: https://html.spec.whatwg.org/multipage/input.html#the-input-element
26+
[select]: https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element
27+
[textarea]: https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element
28+
[fieldset]: https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element
29+
[descendant]: https://dom.spec.whatwg.org/#concept-tree-descendant
30+
[legend]: https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element
31+
[child]: https://dom.spec.whatwg.org/#concept-tree-child
32+
[shadow-including descendant]: https://dom.spec.whatwg.org/#concept-shadow-including-descendant
33+
[focusable]: https://html.spec.whatwg.org/multipage/interaction.html#focusable-area

0 commit comments

Comments
 (0)