Skip to content
Permalink
Browse files

Editorial: always state invalid value default

Previously there was a rule that it fell back to the missing value
default. This implicit behavior could be confusing, so instead we now
state both for every enumerated attribute.

Closes #173.
  • Loading branch information...
GloverDonovan authored and domenic committed Mar 5, 2018
1 parent 4823cf5 commit 7e941ae96b264d4743ea0afac00c3b3209ab0cde
Showing with 43 additions and 26 deletions.
  1. +43 −26 source
69 source
<p>When the attribute is specified, if its value is an <span>ASCII case-insensitive</span> match
for one of the given keywords then that keyword's state is the state that the attribute
represents. If the attribute value matches none of the given keywords, but the attribute has an
<i data-x="invalid value default">invalid value default</i>, then the attribute represents that state. Otherwise, if the
attribute value matches none of the keywords but there is a <i data-x="missing value default">missing value default</i> state
defined, then <em>that</em> is the state represented by the attribute. Otherwise, there is no
default, and invalid values mean that there is no state represented.</p>
<i data-x="invalid value default">invalid value default</i>, then the attribute represents that
state. Otherwise, there is no default, and invalid values mean that there is no state
represented.</p>

<p>When the attribute is <em>not</em> specified, if there is a <i data-x="missing value default">missing value default</i> state
defined, then that is the state represented by the (missing) attribute. Otherwise, the absence of
<p>The attribute's keywords are the empty string, <code data-x="">yes</code>, and <code
data-x="">no</code>. The empty string and the <code data-x="">yes</code> keyword map to the
<i>yes</i> state. The <code data-x="">no</code> keyword maps to the <i>no</i> state. In addition,
there is a third state, the <i>inherit</i> state, which is the <i data-x="missing value default">missing value default</i> (and
the <i data-x="invalid value default">invalid value default</i>).</p>
there is a third state, the <i>inherit</i> state, which is the <i
data-x="missing value default">missing value default</i> and the <i
data-x="invalid value default">invalid value default</i>.</p>

<p>Each element (even non-HTML elements) has a <dfn>translation mode</dfn>, which is in either the
<span>translate-enabled</span> state or the <span>no-translate</span> state. If an <span

<p>The empty string is also a valid keyword, and maps to the <span
data-x="attr-media-preload-auto-state">Automatic</span> state. The attribute's <i data-x="missing
value default">missing value default</i> is user-agent defined, though the <span
value default">missing value default</i> and <i data-x="invalid value default">invalid value
default</i> are user-agent defined, though the <span
data-x="attr-media-preload-metadata-state">Metadata</span> state is suggested as a compromise
between reducing server load and providing an optimal user experience.</p>

<td w-nodev>Non-conforming
</table>

<p>The attribute may be omitted. The <i data-x="missing value default">missing value default</i> is the <span
<p>The attribute may be omitted. The <i data-x="missing value default">missing value default</i>
and <i data-x="invalid value default">invalid value default</i> are the <span
data-x="attr-area-shape-rect">rectangle</span> state.</p>

<p>The <dfn><code data-x="attr-area-coords">coords</code></dfn> attribute must, if specified,

</dl>

<p>The <code data-x="attr-th-scope">scope</code> attribute's <i data-x="missing value default">missing value default</i> is the
<i>auto</i> state.</p>
<p>The <code data-x="attr-th-scope">scope</code> attribute's <i data-x="missing value
default">missing value default</i> and <i data-x="invalid value default">invalid value default</i>
are the <i>auto</i> state.</p>

<p>The <code>th</code> element may have an <dfn><code data-x="attr-th-abbr">abbr</code></dfn>
content attribute specified. Its value must be an alternative label for the header cell, to be
data-x="attr-form-autocomplete-on-state">on</dfn> state, and the <dfn><code
data-x="attr-form-autocomplete-off">off</code></dfn> keyword maps to the <dfn
data-x="attr-form-autocomplete-off-state">off</dfn> state. The attribute may also be omitted. The
<i data-x="missing value default">missing value default</i> is the <span
<i data-x="missing value default">missing value default</i> and the <i
data-x="invalid value default">invalid value default</i> are the <span
data-x="attr-form-autocomplete-on-state">on</span> state. The <span
data-x="attr-form-autocomplete-off-state">off</span> state indicates that by default, form
controls in the form will have their <span>autofill field name</span> set to "<code
<td> A button
</table>

<p>The <i data-x="missing value default">missing value default</i> is the <span data-x="attr-input-type-text">Text</span>
state.</p>
<p>The <i data-x="missing value default">missing value default</i> and the <i
data-x="invalid value default">invalid value default</i> are the <span
data-x="attr-input-type-text">Text</span> state.</p>

<p>Which of the
<code data-x="attr-input-accept">accept</code>,
<td>Does nothing.
</table>

<p>The <i data-x="missing value default">missing value default</i> is the <span data-x="attr-button-type-submit-state">Submit
Button</span> state.</p>
<p>The <i data-x="missing value default">missing value default</i> and <i
data-x="invalid value default">invalid value default</i> are the <span
data-x="attr-button-type-submit-state">Submit Button</span> state.</p>

<p>If the <code data-x="attr-button-type">type</code> attribute is in the <span
data-x="attr-button-type-submit-state">Submit Button</span> state, the element is specifically a
<p>The <dfn><code data-x="attr-textarea-wrap">wrap</code></dfn> attribute is an <span>enumerated
attribute</span> with two keywords and states: the <dfn><code data-x="attr-textarea-wrap-soft">soft</code></dfn> keyword which maps to the <span
data-x="attr-textarea-wrap-soft-state">Soft</span> state, and the <dfn><code data-x="attr-textarea-wrap-hard">hard</code></dfn> keyword which maps to the <span
data-x="attr-textarea-wrap-hard-state">Hard</span> state. The <i data-x="missing value default">missing value default</i> is the
<span data-x="attr-textarea-wrap-soft-state">Soft</span> state.</p>
data-x="attr-textarea-wrap-hard-state">Hard</span> state. The <i data-x="missing value
default">missing value default</i> and <i data-x="invalid value default">invalid value default</i>
are the <span data-x="attr-textarea-wrap-soft-state">Soft</span> state.</p>

<p>The <dfn data-x="attr-textarea-wrap-soft-state">Soft</dfn> state indicates that the text in the
<code>textarea</code> is not to be wrapped when it is submitted (though it can still be wrapped in
<p>The <i data-x="invalid value default">invalid value default</i> for these attributes is the <span
data-x="attr-fs-method-GET">GET</span> state. The <i data-x="missing value default">missing value default</i> for the <code
data-x="attr-fs-method">method</code> attribute is also the <span
data-x="attr-fs-method-GET">GET</span> state. (There is no <i data-x="missing value default">missing value default</i> for the
data-x="attr-fs-method-GET">GET</span> state. (There is no <i
data-x="missing value default">missing value default</i> or <i
data-x="invalid value default">invalid value default</i> for the
<code data-x="attr-fs-formmethod">formmethod</code> attribute.)</p>

<p>The <dfn data-x="concept-fs-method">method</dfn> of an element is one of those states. If the
<p>The <i data-x="invalid value default">invalid value default</i> for these attributes is the <code
data-x="attr-fs-enctype-urlencoded">application/x-www-form-urlencoded</code> state. The <i data-x="missing value default">missing value default</i> for the <code data-x="attr-fs-enctype">enctype</code> attribute is also the <code
data-x="attr-fs-enctype-urlencoded">application/x-www-form-urlencoded</code> state. (There is no
<i data-x="missing value default">missing value default</i> for the <code data-x="attr-fs-formenctype">formenctype</code>
attribute.)</p>
<i data-x="missing value default">missing value default</i> or <i
data-x="invalid value default">invalid value default</i> for the <code
data-x="attr-fs-formenctype">formenctype</code> attribute.)</p>

<p>The <dfn data-x="concept-fs-enctype">enctype</dfn> of an element is one of those three states.
If the element is a <span data-x="concept-submit-button">submit button</span> and has a <code
<span>enumerated attribute</span> whose keywords are the empty string, <code data-x="">true</code>,
and <code data-x="">false</code>. The empty string and the <code data-x="">true</code> keyword map
to the <i>true</i> state. The <code data-x="">false</code> keyword maps to the <i>false</i> state.
In addition, there is a third state, the <i>inherit</i> state, which is the <i data-x="missing value default">missing value default</i> (and the <i data-x="invalid value default">invalid value default</i>).</p>
In addition, there is a third state, the <i>inherit</i> state, which is the <i
data-x="missing value default">missing value default</i> and the <i
data-x="invalid value default">invalid value default</i>.</p>

<p>The <i>true</i> state indicates that the element is editable. The <i>inherit</i> state
indicates that the element is editable if its parent is. The <i>false</i> state indicates that the
attribute</span> whose keywords are the empty string, <code data-x="">true</code> and <code
data-x="">false</code>. The empty string and the <code data-x="">true</code> keyword map to the
<i>true</i> state. The <code data-x="">false</code> keyword maps to the <i>false</i> state. In
addition, there is a third state, the <i>default</i> state, which is the <i data-x="missing value default">missing value default</i> (and the <i data-x="invalid value default">invalid value default</i>).</p>
addition, there is a third state, the <i>default</i> state, which is the <i
data-x="missing value default">missing value default</i> and the <i
data-x="invalid value default">invalid value default</i>.</p>

<p class="note">The <i>true</i> state indicates that the element is to have its spelling and
grammar checked. The <i>default</i> state indicates that the element is to act according to a
<span>enumerated attribute</span>. It has three states. The first state is <i>true</i> and it has
the keyword <code data-x="">true</code>. The second state is <i>false</i> and it has the keyword
<code data-x="">false</code>. The third state is <i>auto</i>; it has no keywords but it is the
<i data-x="missing value default">missing value default</i>.</p>
<i data-x="missing value default">missing value default</i> and the <i
data-x="invalid value default">invalid value default</i>.</p>

<p>The <i>true</i> state means the element is draggable; the <i>false</i> state means that it is
not. The <i>auto</i> state uses the default behavior of the user agent.</p>
<td><dfn data-x="attr-marquee-behavior-alternate">alternate</dfn>
</table>

<p>The <i data-x="missing value default">missing value default</i> is the <span
<p>The <i data-x="missing value default">missing value default</i> and <i
data-x="invalid value default">invalid value default</i> are the <span
data-x="attr-marquee-behavior-scroll">scroll</span> state.</p>

<hr>
<td><dfn data-x="attr-marquee-direction-down">down</dfn>
</table>

<p>The <i data-x="missing value default">missing value default</i> is the <span data-x="attr-marquee-direction-left">left</span>
state.</p>
<p>The <i data-x="missing value default">missing value default</i> and <i
data-x="invalid value default">invalid value default</i> are the <span
data-x="attr-marquee-direction-left">left</span> state.</p>

<hr>

0 comments on commit 7e941ae

Please sign in to comment.
You can’t perform that action at this time.