@@ -10082,6 +10082,7 @@ interface <dfn>HTMLElement</dfn> : <span>Element</span> {
1008210082 readonly attribute DOMString <span data-x="dom-accessKeyLabel">accessKeyLabel</span>;
1008310083 [<span>CEReactions</span>] attribute boolean <span data-x="dom-draggable">draggable</span>;
1008410084 [<span>CEReactions</span>] attribute boolean <span data-x="dom-spellcheck">spellcheck</span>;
10085+ [<span>CEReactions</span>] attribute DOMString <span data-x="dom-autocapitalize">autocapitalize</span>;
1008510086
1008610087 [<span>CEReactions</span>] attribute [TreatNullAs=EmptyString] DOMString <span data-x="dom-innerText">innerText</span>;
1008710088};
@@ -11284,6 +11285,7 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%
1128411285
1128511286 <ul class="brief">
1128611287 <li><code data-x="attr-accesskey">accesskey</code></li>
11288+ <li><code data-x="attr-autocapitalize">autocapitalize</code></li>
1128711289 <li><code data-x="attr-contenteditable">contenteditable</code></li>
1128811290 <li><code data-x="attr-dir">dir</code></li>
1128911291 <li><code data-x="attr-draggable">draggable</code></li>
@@ -74145,9 +74147,11 @@ body { display:none }
7414574147 <p>The definition of the terms
7414674148 <dfn data-x-href="https://w3c.github.io/editing/execCommand.html#active-range">active range</dfn>,
7414774149 <dfn data-x-href="https://w3c.github.io/editing/execCommand.html#editing-host">editing host</dfn>,
74148- and <dfn data-x-href="https://w3c.github.io/editing/execCommand.html#editable">editable</dfn>, the
74149- user interface requirements of elements that are <span data-x="editing host">editing hosts</span>
74150- or <span>editable</span>, the
74150+ <dfn data-x-href="https://w3c.github.io/editing/execCommand.html#editing-host-of">editing host
74151+ of</dfn>, and <dfn
74152+ data-x-href="https://w3c.github.io/editing/execCommand.html#editable">editable</dfn>, the user
74153+ interface requirements of elements that are <span data-x="editing host">editing hosts</span> or
74154+ <span>editable</span>, the
7415174155
7415274156 <dfn data-x="dom-document-execCommand" id="execCommand" data-x-href="https://w3c.github.io/editing/execCommand.html#execcommand%28%29"><code>execCommand()</code></dfn>,
7415374157 <dfn data-x-href="https://w3c.github.io/editing/execCommand.html#querycommandenabled%28%29"><code data-x="dom-document-queryCommandEnabled">queryCommandEnabled()</code></dfn>,
@@ -74371,6 +74375,172 @@ body { display:none }
7437174375 checkers. A user agent could offer on-demand checking, could perform continuous checking while the
7437274376 checking is enabled, or could use other interfaces.</p>
7437374377
74378+ <h4>Autocapitalization</h4>
74379+
74380+ <p>Some methods of entering text, for example virtual keyboards on mobile devices, and also voice
74381+ input, often assist users by automatically capitalizing the first letter of sentences (when
74382+ composing text in a language with this convention). A virtual keyboard that implements
74383+ autocapitalization might automatically switch to showing uppercase letters (but allow the user to
74384+ toggle it back to lowercase) when a letter that should be autocapitalized is about to be typed.
74385+ Other types of input, for example voice input, may perform autocapitalization in a way that does
74386+ not give users an option to intervene first. The <code
74387+ data-x="attr-autocapitalize">autocapitalize</code> attribute allows authors to control such
74388+ behavior.</p>
74389+
74390+ <p>The <code data-x="attr-autocapitalize">autocapitalize</code> attribute, as typically
74391+ implemented, does not affect behavior when typing on a physical keyboard. (For this reason, as
74392+ well as the ability for users to override the autocapitalization behavior in some cases or edit
74393+ the text after initial input, the attribute must not be relied on for any sort of input
74394+ validation.)</p>
74395+
74396+ <p>The <code data-x="attr-autocapitalize">autocapitalize</code> attribute can be used on an <span
74397+ data-x="editing host">editing host</span> to control autocapitalization behavior for the hosted
74398+ editable region, on an <code>input</code> or <code>textarea</code> element to control the behavior
74399+ for inputting text into that element, or on a <code>form</code> element to control the default
74400+ behavior for that form's <code>input</code> and <code>textarea</code> elements.</p>
74401+
74402+ <p>The <code data-x="attr-autocapitalize">autocapitalize</code> attribute never causes
74403+ autocapitalization to be enabled for <code>input</code> elements whose <code
74404+ data-x="attr-input-type">type</code> attribute is in one of the <span
74405+ data-x="attr-input-type-url">URL</span>, <span
74406+ data-x="attr-input-type-email">E-mail</span>, or <span
74407+ data-x="attr-input-type-password">Password</span> states.<span w-nodev> (This behavior is included
74408+ in the <span data-x="used autocapitalization hint">used autocapitalization hint</span> algorithm
74409+ below.)</span></p>
74410+
74411+ <p>The autocapitalization processing model is based on selecting among five
74412+ <dfn data-x="autocapitalization hint">autocapitalization hints</dfn>, defined as follows:</p>
74413+
74414+ <dl>
74415+ <dt><dfn data-x="autocap-hint-default">default</dfn></dt>
74416+ <dd><p>The user agent and input method should use make their own determination of whether or not
74417+ to enable autocapitalization.</p></dd>
74418+
74419+ <dt><dfn data-x="autocap-hint-none">none</dfn></dt>
74420+ <dd><p>No autocapitalization should be applied (all letters should default to
74421+ lowercase).</p></dd>
74422+
74423+ <dt><dfn data-x="autocap-hint-sentences">sentences</dfn></dt>
74424+ <dd><p>The first letter of each sentence should default to a capital letter; all other letters
74425+ should default to lowercase.</p></dd>
74426+
74427+ <dt><dfn data-x="autocap-hint-words">words</dfn></dt>
74428+ <dd><p>The first letter of each word should default to a capital letter; all other letters should
74429+ default to lowercase.</p></dd>
74430+
74431+ <dt><dfn data-x="autocap-hint-characters">characters</dfn></dt>
74432+ <dd><p>All letters should default to uppercase.</p></dd>
74433+ </dl>
74434+
74435+ <p>The <dfn><code data-x="attr-autocapitalize">autocapitalize</code></dfn> attribute is an
74436+ <span>enumerated attribute</span> whose states are the possible <span data-x="autocapitalization
74437+ hint">autocapitalization hints</span>. The <span>autocapitalization hint</span> specified by the
74438+ attribute's state combines with other considerations to form the <span>used autocapitalization
74439+ hint</span>, which informs the behavior of the user agent. The keywords for this attribute and
74440+ their state mappings are as follows:</p>
74441+
74442+ <table>
74443+ <thead>
74444+ <tr>
74445+ <th> Keyword
74446+ <th> State
74447+ <tbody>
74448+ <tr>
74449+ <td><dfn><code data-x="attr-autocapitalize-off">off</code></dfn>
74450+ <td rowspan="2"><span data-x="autocap-hint-none">none</span>
74451+ <tr>
74452+ <td><dfn><code data-x="attr-autocapitalize-none">none</code></dfn>
74453+ <tr>
74454+ <td><dfn><code data-x="attr-autocapitalize-on">on</code></dfn>
74455+ <td rowspan="2"><span data-x="autocap-hint-sentences">sentences</span>
74456+ <tr>
74457+ <td><dfn><code data-x="attr-autocapitalize-sentences">sentences</code></dfn>
74458+ <tr>
74459+ <td><dfn><code data-x="attr-autocapitalize-words">words</code></dfn>
74460+ <td><span data-x="autocap-hint-words">words</span>
74461+ <tr>
74462+ <td><dfn><code data-x="attr-autocapitalize-characters">characters</code></dfn>
74463+ <td><span data-x="autocap-hint-characters">characters</span>
74464+ </table>
74465+
74466+ <p>The <i data-x="invalid value default">invalid value default</i> is the <span
74467+ data-x="autocap-hint-sentences">sentences</span> state. The <i data-x="missing value
74468+ default">missing value default</i> is the <span data-x="autocap-hint-default">default</span>
74469+ state.</p>
74470+
74471+ <dl class="domintro">
74472+ <dt><var>element</var> . <code subdfn data-x="dom-autocapitalize">autocapitalize</code> [ = <var>value</var> ]</dt>
74473+
74474+ <dd>
74475+ <p>Returns the current autocapitalization state for the element, or an empty string if it hasn't
74476+ been set. Note that for <code>input</code> and <code>textarea</code> elements that inherit their
74477+ state from a <code>form</code> element, this will return the autocapitalization state of the
74478+ <code>form</code> element, but for an element in an editable region, this will not return the
74479+ autocapitalization state of the editing host (unless this element is, in fact, the <span>editing
74480+ host</span>).</p>
74481+
74482+ <p>Can be set, to set the <code data-x="attr-autocapitalize">autocapitalize</code> content
74483+ attribute (and thereby change the autocapitalization behavior for the element).</p>
74484+ </dd>
74485+ </dl>
74486+
74487+ <div w-nodev>
74488+
74489+ <p>To compute the <dfn>own autocapitalization hint</dfn> of an element <var>element</var>, run the
74490+ following steps:</p>
74491+
74492+ <ol>
74493+ <li><p>If the <code data-x="attr-autocapitalize">autocapitalize</code> content attribute is
74494+ present on <var>element</var>, and its value is not the empty string, return the state of the
74495+ attribute.</p></li>
74496+
74497+ <li><p>If <var>element</var> is an <code>input</code> or <code>textarea</code> element and has a
74498+ non-null <span>form owner</span>, return the <span>own autocapitalization hint</span> of
74499+ <var>element</var>'s <span>form owner</span>.</p></li>
74500+
74501+ <li><p>Return <span data-x="autocap-hint-default">default</span>.</p></li>
74502+ </ol>
74503+
74504+ <p>The <dfn><code data-x="dom-autocapitalize">autocapitalize</code></dfn> IDL attribute, on
74505+ getting, must return the string value corresponding to <span>own autocapitalization hint</span> of
74506+ the element, with the exception that the <span data-x="autocap-hint-default">default</span> state
74507+ maps to the empty string. On setting, it must set the <code
74508+ data-x="attr-autocapitalize">autocapitalize</code> content attribute to the given new value.</p>
74509+
74510+ <hr>
74511+
74512+ <p>User agents that support customizable autocapitalization behavior for a text input method and
74513+ wish to allow web developers to control this functionality should, during text input into an
74514+ element, compute the <dfn>used autocapitalization hint</dfn> for the element. This will be an
74515+ <span>autocapitalization hint</span> that describes the recommended autocapitalization behavior
74516+ for text input into the element.</p>
74517+
74518+ <p>User agents or input methods may choose to ignore or override the <span>used autocapitalization
74519+ hint</span> in certain circumstances.</p>
74520+
74521+ <p>The <span>used autocapitalization hint</span> for an element <var>element</var> is computed
74522+ using the following algorithm:</p>
74523+
74524+ <ol>
74525+ <li><p>If <var>element</var> is an <code>input</code> element whose <code
74526+ data-x="attr-input-type">type</code> attribute is in one of the <span
74527+ data-x="attr-input-type-url">URL</span>, <span data-x="attr-input-type-email">E-mail</span>, or
74528+ <span data-x="attr-input-type-password">Password</span> states, then return <span
74529+ data-x="autocap-hint-default">default</span>.</p></li>
74530+
74531+ <li><p>If <var>element</var> is an <code>input</code> element or a <code>textarea</code> element,
74532+ then return <var>element</var>'s <span>own autocapitalization hint</span>.</p></li>
74533+
74534+ <li><p>If <var>element</var> is an <span>editing host</span> or an <span>editable</span> element,
74535+ then return the <span>own autocapitalization hint</span> of the <span>editing host of</span>
74536+ <var>element</var>.</p></li>
74537+
74538+ <li><p>Assert: this step is never reached, since text input only occurs in elements that meet one
74539+ of the above criteria.</p></li>
74540+ </ol>
74541+
74542+ </div>
74543+
7437474544
7437574545 <h4>Input modalities: the <code data-x="attr-inputmode">inputmode</code> attribute</h4>
7437674546
@@ -117630,6 +117800,16 @@ interface <dfn>External</dfn> {
117630117800 <td> <code data-x="attr-script-async">script</code>
117631117801 <td> Execute script when available, without blocking
117632117802 <td> <span>Boolean attribute</span>
117803+ <tr>
117804+ <th> <code data-x="">autocapitalize</code>
117805+ <td> <span data-x="attr-autocapitalize">HTML elements</span>
117806+ <td> Recommended autocapitalization behavior (for supported input methods)
117807+ <td> "<code data-x="attr-autocapitalize-on">on</code>";
117808+ "<code data-x="attr-autocapitalize-off">off</code>";
117809+ "<code data-x="attr-autocapitalize-none">none</code>";
117810+ "<code data-x="attr-autocapitalize-sentences">sentences</code>";
117811+ "<code data-x="attr-autocapitalize-words">words</code>";
117812+ "<code data-x="attr-autocapitalize-characters">characters</code>"
117633117813 <tr>
117634117814 <th> <code data-x="">autocomplete</code>
117635117815 <td> <code data-x="attr-form-autocomplete">form</code>
@@ -121200,6 +121380,7 @@ INSERT INTERFACES HERE
121200121380 Russell Bicknell,
121201121381 Ruud Steltenpool,
121202121382 Ryan King,
121383+ Ryan Landay,
121203121384 Ryan Sleevi,
121204121385 Ryo Kato,
121205121386 Ryosuke Niwa,
0 commit comments