From 7bab05ac69e7992be25b23b2017b03d2ef4f7869 Mon Sep 17 00:00:00 2001
From: Wenson Hsieh Denotes elements that inherit the
- accesskey
autocapitalize
autocorrect
autofocus
contenteditable
dir
autocapitalize
- attribute from their form owner.autocorrect
attributes from their form
+ owner.
type
attribute is not in the Hidden state: Interactive content.type
attribute is not in the Hidden state: Listed, labelable, submittable, resettable, and autocapitalize-inheriting form-associated element.type
attribute is in the Hidden state: Listed, submittable, resettable, and autocapitalize-inheriting form-associated element.type
attribute is not in the Hidden state: Listed, labelable, submittable, resettable, and autocapitalize-and-autocorrect inheriting form-associated element.type
attribute is in the Hidden state: Listed, submittable, resettable, and autocapitalize-and-autocorrect inheriting form-associated element.type
attribute is not in the Hidden state: Palpable content.input
or textarea
element to control the behavior
for inputting text into that element, or on a form
element to control the default
- behavior for all autocapitalize-inheriting elements
- associated with the form
element.
+ behavior for all autocapitalize-and-autocorrect inheriting
+ elements associated with the form
element.
The If element is an autocapitalize-inheriting element and has a non-null
- form owner, return the own autocapitalization hint of
- element's form owner.autocapitalize
attribute never causes
autocapitalization to be enabled for input
elements whose
Return default.
Some methods of entering text assist users by automatically correcting misspelled words while
+ typing, a process also known as autocorrection. User agents can support autocorrection of editable
+ text, either in form controls (such as the value of textarea
elements), or in
+ elements in an editing host (e.g., using contenteditable
). Autocorrection may be accompanied by user
+ interfaces indicating that text is about to be autocorrected or has been autocorrected, and is
+ commonly performed when inserting punctuation characters, spaces, or new paragraphs after
+ misspelled words. The autocorrect
attribute allows authors
+ to control such behavior.
The autocorrect
attribute can be used on an editing host
+ to control autocorrection behavior for the hosted editable region, on an input
or
+ textarea
element to control the behavior when inserting text into that element, or on
+ a form
element to control the default behavior for all autocapitalize-and-autocorrect inheriting
+ elements associated with the form
element.
The autocorrect
attribute never causes autocorrection to
+ be enabled for input
elements whose type
+ attribute is in one of the URL, E-mail, or Password states. (This behavior is included
+ in the used autocorrection state algorithm below.)
The autocorrect
attribute is an enumerated attribute with the
+ following keywords and states:
Keyword + | State + | Brief description + |
---|---|---|
on
+ | on + | The user agent is permitted to automatically correct spelling errors while the user types. + Whether spelling is automatically corrected while typing left is for the user agent to decide, + and may depend on the element as well as the user's preferences. + |
(the empty string) + | ||
off
+ | off + | The user agent is not allowed to automatically correct spelling while the user types. + |
The attribute's invalid value default and missing value default are both the on state.
+ +The autocorrect
+ getter steps are: return true if the element's used autocorrection state is on and false if the element's used autocorrection
+ state is off. The setter steps are: if the
+ given value is true, then the element's autocorrect
+ attribute must be set to "on
"; otherwise it must be set to "off
".
To compute the used autocorrection state of an element element, run these + steps:
+ +If element is an input
element whose type
attribute is in one of the URL, E-mail, or
+ Password states, then return off.
If the autocorrect
content attribute is present on
+ element, then return the state of the attribute.
If element is an autocapitalize-and-autocorrect inheriting
+ element and has a non-null form owner, then return the state of
+ element's form owner's autocorrect
+ attribute.
Return on.
autocorrect
Returns the autocorrection behavior of the element. Note that for autocapitalize-and-autocorrect inheriting
+ elements that inherit their state from a form
element, this will return the
+ autocorrection behavior of the form
element, but for an element in an editable
+ region, this will not return the autocorrection behavior of the editing host (unless
+ this element is, in fact, the editing host).
autocorrect
=
+ valueUpdates the autocorrect
content attribute (and
+ thereby changes the autocorrection behavior of the element).
The input
element in the following example would not allow autocorrection, since
+ it does not have an autocorrect
content attribute and
+ therefore inherits from the form
element, which has an attribute of "off
". However, the textarea
element would allow
+ autocorrection, since it has an autocorrect
content
+ attribute with a value of "on
".
<form autocorrect="off">
+ <input type="search">
+ <textarea autocorrect="on"></textarea>
+</form>
+ inputmode
attributeUser agents can support the inputmode
attribute on form
@@ -140394,7 +140516,8 @@ interface External {
—
button
;
fieldset
;
@@ -140599,6 +140722,12 @@ interface External {
textarea
autocorrect
+ on
";
+ "off
"
autofocus