Skip to content

Commit

Permalink
Fix form inheritance behavior for autocapitalize
Browse files Browse the repository at this point in the history
This creates a new category of form elements, autocapitalize-inheriting
elements, which are a subset of form-associated elements. This new set
is used to determine autocapitalization inheritance behavior, instead
of only using input and textarea as was previously specified.

This behavior matches WebKit and upcoming changes to Blink.
  • Loading branch information
rlanday authored and domenic committed Jan 24, 2018
1 parent 5b40420 commit b7c21b1
Showing 1 changed file with 43 additions and 10 deletions.
53 changes: 43 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -42745,6 +42745,25 @@ interface <dfn>HTMLTableCellElement</dfn> : <span>HTMLElement</span> {

</dd>

<dt><dfn data-x="category-autocapitalize">Autocapitalize-inheriting elements</dfn></dt>

<dd>

<p>Denotes elements that inherit the <code data-x="attr-autocapitalize">autocapitalize</code>
attribute from their <span>form owner</span>.</p>

<!-- when updating this also update the category index -->
<ul class="brief category-list">
<li><code>button</code></li>
<li><code>fieldset</code></li>
<li><code>input</code></li>
<li><code>output</code></li>
<li><code>select</code></li>
<li><code>textarea</code></li>
</ul>

</dd>

</dl>

<p>Some elements, not all of them <span data-x="form-associated element">form-associated</span>,
Expand Down Expand Up @@ -43380,8 +43399,8 @@ interface <dfn>HTMLLabelElement</dfn> : <span>HTMLElement</span> {
<dd><span>Flow content</span>.</dd>
<dd><span>Phrasing content</span>.</dd>
<dd>If the <code data-x="attr-input-type">type</code> attribute is <em>not</em> in the <span data-x="attr-input-type-hidden">Hidden</span> state: <span>Interactive content</span>.</dd>
<dd>If the <code data-x="attr-input-type">type</code> attribute is <em>not</em> in the <span data-x="attr-input-type-hidden">Hidden</span> state: <span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, <span data-x="category-submit">submittable</span>, and <span data-x="category-reset">resettable</span> <span>form-associated element</span>.</dd>
<dd>If the <code data-x="attr-input-type">type</code> attribute is in the <span data-x="attr-input-type-hidden">Hidden</span> state: <span data-x="category-listed">Listed</span>, <span data-x="category-submit">submittable</span>, and <span data-x="category-reset">resettable</span> <span>form-associated element</span>.</dd>
<dd>If the <code data-x="attr-input-type">type</code> attribute is <em>not</em> in the <span data-x="attr-input-type-hidden">Hidden</span> state: <span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, <span data-x="category-submit">submittable</span>, <span data-x="category-reset">resettable</span>, and <span data-x="category-autocapitalize">autocapitalize-inheriting</span> <span>form-associated element</span>.</dd>
<dd>If the <code data-x="attr-input-type">type</code> attribute is in the <span data-x="attr-input-type-hidden">Hidden</span> state: <span data-x="category-listed">Listed</span>, <span data-x="category-submit">submittable</span>, <span data-x="category-reset">resettable</span>, and <span data-x="category-autocapitalize">autocapitalize-inheriting</span> <span>form-associated element</span>.</dd>
<dd>If the <code data-x="attr-input-type">type</code> attribute is <em>not</em> in the <span data-x="attr-input-type-hidden">Hidden</span> state: <span>Palpable content</span>.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>Where <span>phrasing content</span> is expected.</dd>
Expand Down Expand Up @@ -49547,7 +49566,7 @@ You cannot submit this form when the field is incorrect.</samp></pre>
<dd><span>Flow content</span>.</dd>
<dd><span>Phrasing content</span>.</dd>
<dd><span>Interactive content</span>.</dd>
<dd><span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, and <span data-x="category-submit">submittable</span> <span>form-associated element</span>.</dd>
<dd><span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, <span data-x="category-submit">submittable</span>, and <span data-x="category-autocapitalize">autocapitalize-inheriting</span> <span>form-associated element</span>.</dd>
<dd><span>Palpable content</span>.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>Where <span>phrasing content</span> is expected.</dd>
Expand Down Expand Up @@ -49744,7 +49763,7 @@ interface <dfn>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
<dd><span>Flow content</span>.</dd>
<dd><span>Phrasing content</span>.</dd>
<dd><span>Interactive content</span>.</dd>
<dd><span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, <span data-x="category-submit">submittable</span>, and <span data-x="category-reset">resettable</span> <span>form-associated element</span>.</dd>
<dd><span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, <span data-x="category-submit">submittable</span>, <span data-x="category-reset">resettable</span>, and <span data-x="category-autocapitalize">autocapitalize-inheriting</span> <span>form-associated element</span>.</dd>
<dd><span>Palpable content</span>.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>Where <span>phrasing content</span> is expected.</dd>
Expand Down Expand Up @@ -50756,7 +50775,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<dd><span>Flow content</span>.</dd>
<dd><span>Phrasing content</span>.</dd>
<dd><span>Interactive content</span>.</dd>
<dd><span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, <span data-x="category-submit">submittable</span>, and <span data-x="category-reset">resettable</span> <span>form-associated element</span>.</dd>
<dd><span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, <span data-x="category-submit">submittable</span>, <span data-x="category-reset">resettable</span>, and <span data-x="category-autocapitalize">autocapitalize-inheriting</span> <span>form-associated element</span>.</dd>
<dd><span>Palpable content</span>.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>Where <span>phrasing content</span> is expected.</dd>
Expand Down Expand Up @@ -51262,7 +51281,7 @@ Daddy">&lt;/textarea></pre>
<dt><span data-x="concept-element-categories">Categories</span>:</dt>
<dd><span>Flow content</span>.</dd>
<dd><span>Phrasing content</span>.</dd>
<dd><span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, and <span data-x="category-reset">resettable</span> <span>form-associated element</span>.</dd>
<dd><span data-x="category-listed">Listed</span>, <span data-x="category-label">labelable</span>, <span data-x="category-reset">resettable</span>, and <span data-x="category-autocapitalize">autocapitalize-inheriting</span> <span>form-associated element</span>.</dd>
<dd><span>Palpable content</span>.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>Where <span>phrasing content</span> is expected.</dd>
Expand Down Expand Up @@ -52009,7 +52028,7 @@ out of 233&#x2009;257&#x2009;824 bytes available&lt;/meter>&lt;/p></pre>
<dt><span data-x="concept-element-categories">Categories</span>:</dt>
<dd><span>Flow content</span>.</dd>
<dd><span>Sectioning root</span>.</dd>
<dd><span data-x="category-listed">Listed</span> <span>form-associated element</span>.</dd>
<dd><span data-x="category-listed">Listed</span> and <span data-x="category-autocapitalize">autocapitalize-inheriting</span> <span>form-associated element</span>.</dd>
<dd><span>Palpable content</span>.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>Where <span>flow content</span> is expected.</dd>
Expand Down Expand Up @@ -74362,7 +74381,8 @@ body { display:none }
data-x="editing host">editing host</span> to control autocapitalization behavior for the hosted
editable region, on an <code>input</code> or <code>textarea</code> element to control the behavior
for inputting text into that element, or on a <code>form</code> element to control the default
behavior for that form's <code>input</code> and <code>textarea</code> elements.</p>
behavior for all <span data-x="category-autocapitalize">autocapitalize-inheriting elements</span>
associated with the <code>form</code> element.

<p>The <code data-x="attr-autocapitalize">autocapitalize</code> attribute never causes
autocapitalization to be enabled for <code>input</code> elements whose <code
Expand Down Expand Up @@ -74459,8 +74479,9 @@ body { display:none }
present on <var>element</var>, and its value is not the empty string, return the state of the
attribute.</p></li>

<li><p>If <var>element</var> is an <code>input</code> or <code>textarea</code> element and has a
non-null <span>form owner</span>, return the <span>own autocapitalization hint</span> of
<li><p>If <var>element</var> is an <span
data-x="category-autocapitalize">autocapitalize-inheriting element</span> and has a non-null
<span>form owner</span>, return the <span>own autocapitalization hint</span> of
<var>element</var>'s <span>form owner</span>.</p></li>

<li><p>Return <span data-x="autocap-hint-default">default</span>.</p></li>
Expand Down Expand Up @@ -117558,6 +117579,18 @@ interface <dfn>External</dfn> {
<td>
&mdash;

<tr>
<td> <span data-x="category-autocapitalize">Autocapitalize-inheriting elements</span>
<td>
<code>button</code>;
<code>fieldset</code>;
<code>input</code>;
<code>output</code>;
<code>select</code>;
<code>textarea</code>
<td>
&mdash;

<tr>
<td> <span data-x="category-label">Labelable elements</span>
<td>
Expand Down

0 comments on commit b7c21b1

Please sign in to comment.