Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dirname apply to hidden/tel/url/email inputs #9490

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -46237,11 +46237,11 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {

<tr>
<th> <code data-x="attr-fe-dirname">dirname</code>
<td class="no"> &middot; <!-- Hidden -->
<td class="yes"> Yes <!-- Hidden -->
<td class="yes"> Yes <!-- Text -->
<!-- <td class="yes"> Yes Search -->
<td class="no"> &middot; <!-- URL, Telephone -->
<td class="no"> &middot; <!-- Email -->
<td class="yes"> Yes <!-- URL, Telephone -->
<td class="yes"> Yes <!-- Email -->
<td class="no"> &middot; <!-- Password -->
<td class="no"> &middot; <!-- Date -->
<!-- <td class="no"> &middot; Month -->
Expand Down Expand Up @@ -47542,8 +47542,9 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
<div class="bookkeeping">

<p>The
<code data-x="attr-fe-autocomplete">autocomplete</code>
content attribute <span data-x="concept-input-apply">applies</span> to this element.</p>
<code data-x="attr-fe-autocomplete">autocomplete</code> and
<code data-x="attr-fe-dirname">dirname</code>
content attributes <span data-x="concept-input-apply">apply</span> to this element.</p>

<p>The
<code data-x="dom-input-value">value</code>
Expand All @@ -47555,7 +47556,6 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
<code data-x="attr-input-accept">accept</code>,
<code data-x="attr-input-alt">alt</code>,
<code data-x="attr-input-checked">checked</code>,
<code data-x="attr-fe-dirname">dirname</code>,
<code data-x="attr-fs-formaction">formaction</code>,
<code data-x="attr-fs-formenctype">formenctype</code>,
<code data-x="attr-fs-formmethod">formmethod</code>,
Expand Down Expand Up @@ -47772,6 +47772,7 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
<p>The following common <code>input</code> element content
attributes, IDL attributes, and methods <span data-x="concept-input-apply">apply</span> to the element:
<code data-x="attr-fe-autocomplete">autocomplete</code>,
<code data-x="attr-fe-dirname">dirname</code>,
<code data-x="attr-input-list">list</code>,
<code data-x="attr-input-maxlength">maxlength</code>,
<code data-x="attr-input-minlength">minlength</code>,
Expand Down Expand Up @@ -47800,7 +47801,6 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
<code data-x="attr-input-accept">accept</code>,
<code data-x="attr-input-alt">alt</code>,
<code data-x="attr-input-checked">checked</code>,
<code data-x="attr-fe-dirname">dirname</code>,
<code data-x="attr-fs-formaction">formaction</code>,
<code data-x="attr-fs-formenctype">formenctype</code>,
<code data-x="attr-fs-formmethod">formmethod</code>,
Expand Down Expand Up @@ -47877,6 +47877,7 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
<p>The following common <code>input</code> element content
attributes, IDL attributes, and methods <span data-x="concept-input-apply">apply</span> to the element:
<code data-x="attr-fe-autocomplete">autocomplete</code>,
<code data-x="attr-fe-dirname">dirname</code>,
<code data-x="attr-input-list">list</code>,
<code data-x="attr-input-maxlength">maxlength</code>,
<code data-x="attr-input-minlength">minlength</code>,
Expand Down Expand Up @@ -47905,7 +47906,6 @@ interface <dfn interface>HTMLInputElement</dfn> : <span>HTMLElement</span> {
<code data-x="attr-input-accept">accept</code>,
<code data-x="attr-input-alt">alt</code>,
<code data-x="attr-input-checked">checked</code>,
<code data-x="attr-fe-dirname">dirname</code>,
<code data-x="attr-fs-formaction">formaction</code>,
<code data-x="attr-fs-formenctype">formenctype</code>,
<code data-x="attr-fs-formmethod">formmethod</code>,
Expand Down Expand Up @@ -48144,6 +48144,7 @@ ldh-str = &lt; as defined in <a href="https://www.rfc-editor.org/rfc/rfc10
<p>The following common <code>input</code> element content
attributes, IDL attributes, and methods <span data-x="concept-input-apply">apply</span> to the element:
<code data-x="attr-fe-autocomplete">autocomplete</code>,
<code data-x="attr-fe-dirname">dirname</code>,
<code data-x="attr-input-list">list</code>,
<code data-x="attr-input-maxlength">maxlength</code>,
<code data-x="attr-input-minlength">minlength</code>,
Expand Down Expand Up @@ -48176,7 +48177,6 @@ ldh-str = &lt; as defined in <a href="https://www.rfc-editor.org/rfc/rfc10
<code data-x="attr-input-accept">accept</code>,
<code data-x="attr-input-alt">alt</code>,
<code data-x="attr-input-checked">checked</code>,
<code data-x="attr-fe-dirname">dirname</code>,
<code data-x="attr-fs-formaction">formaction</code>,
<code data-x="attr-fs-formenctype">formenctype</code>,
<code data-x="attr-fs-formmethod">formmethod</code>,
Expand Down Expand Up @@ -55336,11 +55336,10 @@ form.method === input; // => true</code></pre>

<h5>Submitting element directionality: the <code data-x="attr-fe-dirname">dirname</code> attribute</h5>

<p>The <dfn element-attr for="button,fieldset,input,object,output,select,textarea"><code
data-x="attr-fe-dirname">dirname</code></dfn> attribute on a form control element enables the
submission of <span>the directionality</span> of the element, and gives the name of the control
that contains this value during <span>form submission</span>. If such an attribute is specified,
its value must not be the empty string.</p>
<p>The <dfn element-attr for="input,textarea"><code data-x="attr-fe-dirname">dirname</code></dfn>
attribute on a form control element enables the submission of <span>the directionality</span> of
the element, and gives the name of the control that contains this value during <span>form
submission</span>. If such an attribute is specified, its value must not be the empty string.</p>

<div class="example">

Expand Down Expand Up @@ -59313,8 +59312,11 @@ fur
<p>If the element has a <code data-x="attr-fe-dirname">dirname</code> attribute, that
attribute's value is not the empty string, and the element is either a <code>textarea</code>
element or an <code>input</code> element whose <code data-x="attr-input-type">type</code>
attribute is in the <span data-x="attr-input-type-text">Text</span> or <span
data-x="attr-input-type-search">Search</span> state, then:</p>
attribute is in the <span data-x="attr-input-type-hidden">Hidden</span>,
<span data-x="attr-input-type-text">Text</span>, <span
data-x="attr-input-type-search">Search</span>, <span
data-x="attr-input-type-tel">Telephone</span>, <span data-x="attr-input-type-url">URL</span>,
or <span data-x="attr-input-type-email">Email</span> state, then:</p>

<ol>
<li><p>Let <var>dirname</var> be the value of the element's <code
Expand Down Expand Up @@ -99784,9 +99786,11 @@ location.href = '#foo';</code></pre>

<p class="note">This can even include updating the <code data-x="attr-dir">dir</code> attribute
of <code>textarea</code> elements or <code>input</code> elements whose <code
data-x="attr-input-type">type</code> attribute is in either the <span
data-x="attr-input-type-text">Text</span> state or the <span
data-x="attr-input-type-search">Search</span> state, if the persisted state includes the
data-x="attr-input-type">type</code> attribute is in the <span
data-x="attr-input-type-text">Text</span>, <span data-x="attr-input-type-search">Search</span>,
<span data-x="attr-input-type-url">URL</span>, <span
data-x="attr-input-type-tel">Telephone</span>, or <span
data-x="attr-input-type-email">Email</span> state, if the persisted state includes the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the order of the states here match the order you used above? (That order matches the table of contents order.)

directionality of user input in such controls.</p>

<p class="note">Restoring the value of form controls as part of this process does not fire any
Expand Down