Navigation Menu

Skip to content

Commit

Permalink
[] (0) Rename the 'irrelevant' attribute to 'hidden'.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2119 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 28, 2008
1 parent cb9ef9f commit 4497a12
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 155 deletions.
180 changes: 91 additions & 89 deletions index
Expand Up @@ -1623,8 +1623,8 @@
<li><a href="#editing-intro"><span class=secno>6.1
</span>Introduction</a>

<li><a href="#the-irrelevant"><span class=secno>6.2 </span>The
<code>irrelevant</code> attribute</a>
<li><a href="#the-hidden"><span class=secno>6.2 </span>The
<code>hidden</code> attribute</a>

<li><a href="#activation"><span class=secno>6.3 </span>Activation</a>

Expand Down Expand Up @@ -7728,7 +7728,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
readonly attribute <a href="#domstringmap0">DOMStringMap</a> <a href="#dataset" title=dom-dataset>dataset</a>;

// <a href="#user-interaction">user interaction</a>
attribute boolean <a href="#irrelevant0" title=dom-irrelevant>irrelevant</a>;
attribute boolean <a href="#hidden2" title=dom-hidden>hidden</a>;
void <a href="#click1" title=dom-click>click</a>();
void <a href="#scrollintoview" title=dom-scrollIntoView>scrollIntoView</a>();
void <a href="#scrollintoview" title=dom-scrollIntoView>scrollIntoView</a>(in boolean top);
Expand Down Expand Up @@ -7817,8 +7817,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..

<dd><code title=attr-id><a href="#id">id</a></code>

<dd><code title=attr-irrelevant><a
href="#irrelevant">irrelevant</a></code>
<dd><code title=attr-hidden><a href="#hidden1">hidden</a></code>

<dd><code title=attr-lang><a href="#lang">lang</a></code>

Expand Down Expand Up @@ -17604,7 +17603,7 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
+ PARAM/null
+ the params, in source order
(WebKit does something different still)
- the HIDDEN attribute
- the HIDDEN attribute (might be moot now)
-->

<dl class=element>
Expand Down Expand Up @@ -29597,8 +29596,6 @@ XXX selection ranges -->

<dd><code title=attr-command-icon><a href="#icon">icon</a></code>

<dd><code title=attr-command-hidden><a href="#hidden">hidden</a></code>

<dd><code title=attr-command-disabled><a
href="#disabled4">disabled</a></code>

Expand All @@ -29623,7 +29620,6 @@ XXX selection ranges -->
attribute DOMString <a href="#type14" title=dom-command-type>type</a>;
attribute DOMString <a href="#label0" title=dom-command-label>label</a>;
attribute DOMString <a href="#icon0" title=dom-command-icon>icon</a>;
attribute boolean <a href="#hidden0" title=dom-command-hidden>hidden</a>;
attribute boolean <a href="#disabled5" title=dom-command-disabled>disabled</a>;
attribute boolean <a href="#checked1" title=dom-command-checked>checked</a>;
attribute DOMString <a href="#radiogroup0" title=dom-command-radiogroup>radiogroup</a>;
Expand Down Expand Up @@ -29661,25 +29657,20 @@ XXX selection ranges -->
specified, the attribute's value must contain a <a href="#valid8">valid
URL</a>.

<p>The <dfn id=hidden title=attr-command-hidden><code>hidden</code></dfn>
attribute is a <a href="#boolean0">boolean attribute</a> that, if present,
indicates that the command is not relevant and is to be hidden.

<p>The <dfn id=disabled4
title=attr-command-disabled><code>disabled</code></dfn> attribute is a <a
href="#boolean0">boolean attribute</a> that, if present, indicates that
the command is not available in the current state.

<p class=note>The distinction between <a href="#disabled7"
title=command-facet-DisabledState>Disabled State</a> and <a
href="#hidden1" title=command-facet-HiddenState>Hidden State</a> is
subtle. A command should be Disabled if, in the same context, it could be
enabled if only certain aspects of the situation were changed. A command
should be marked as Hidden if, in that situation, the command will never
be enabled. For example, in the context menu for a water faucet, the
command "open" might be Disabled if the faucet is already open, but the
command "eat" would be marked Hidden since the faucet could never be
eaten.
<p class=note>The distinction between <code title=attr-command-disabled><a
href="#disabled4">disabled</a></code> and <code title=attr-hidden><a
href="#hidden1">hidden</a></code> is subtle. A command should be disabled
if, in the same context, it could be enabled if only certain aspects of
the situation were changed. A command should be marked as hidden if, in
that situation, the command will never be enabled. For example, in the
context menu for a water faucet, the command "open" might be disabled if
the faucet is already open, but the command "eat" would be marked hidden
since the faucet could never be eaten.

<p>The <dfn id=checked0
title=attr-command-checked><code>checked</code></dfn> attribute is a <a
Expand Down Expand Up @@ -29713,8 +29704,7 @@ XXX selection ranges -->

<p>The <dfn id=type14 title=dom-command-type><code>type</code></dfn>, <dfn
id=label0 title=dom-command-label><code>label</code></dfn>, <dfn id=icon0
title=dom-command-icon><code>icon</code></dfn>, <dfn id=hidden0
title=dom-command-hidden><code>hidden</code></dfn>, <dfn id=disabled5
title=dom-command-icon><code>icon</code></dfn>, <dfn id=disabled5
title=dom-command-disabled><code>disabled</code></dfn>, <dfn id=checked1
title=dom-command-checked><code>checked</code></dfn>, <dfn id=radiogroup0
title=dom-command-radiogroup><code>radiogroup</code></dfn>, and <dfn
Expand Down Expand Up @@ -30195,10 +30185,13 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
<dt>An element that <a href="#command1" title=concept-command>defines a
command</a>

<dd>Append the command to the menu. If the element is a <code><a
href="#command0">command</a></code> element with a <code
title=attr-command-default><a href="#default2">default</a></code>
attribute, mark the command as being a default command.</dd>
<dd>Append the command to the menu, respecting its <a href="#facets0"
title=concept-facet>facets</a><!-- XXX be explicit about what
this means for each facet -->.
If the element is a <code><a href="#command0">command</a></code> element
with a <code title=attr-command-default><a
href="#default2">default</a></code> attribute, mark the command as being
a default command.</dd>
<!-- XXX if there's an
Icon URL for the command, it should be <span
title="fetch">fetched</span>, and then that image should be
Expand Down Expand Up @@ -30362,7 +30355,8 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
allowing many access points to a single feature to share aspects such as
the disabled state.

<p id=facets>Commands are defined to have the following <em>facets</em>:
<p id=facets>Commands are defined to have the following <dfn id=facets0
title=concept-facet>facets</dfn>:

<dl>
<dt><dfn id=type19 title=command-facet-Type>Type</dfn>
Expand Down Expand Up @@ -30396,18 +30390,15 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
<!--
changing base URLs might change the icon -->

<dt><dfn id=hidden1 title=command-facet-HiddenState>Hidden State</dfn>
<dt><dfn id=hidden title=command-facet-HiddenState>Hidden State</dfn>

<dd>Whether the command is hidden or not (basically, whether it should be
shown in menus).

<dt><dfn id=disabled7 title=command-facet-DisabledState>Disabled
State</dfn>

<dd>Whether the command can be triggered or not. If the <a href="#hidden1"
title=command-facet-HiddenState>Hidden State</a> is true (hidden) then
the <a href="#disabled7" title=command-facet-DisabledState>Disabled
State</a> will be true (disabled) regardless.
<dd>Whether the command is relevant and can be triggered or not.

<dt><dfn id=checked2 title=command-facet-CheckedState>Checked State</dfn>

Expand Down Expand Up @@ -30445,7 +30436,7 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
readonly attribute DOMString <a href="#label4" title=dom-command-ro-label>label</a>;
readonly attribute DOMString <a href="#title7" title=dom-command-ro-title>title</a>;
readonly attribute DOMString <a href="#icon2" title=dom-command-ro-icon>icon</a>;
readonly attribute boolean <a href="#hidden2" title=dom-command-ro-hidden>hidden</a>;
readonly attribute boolean <a href="#hidden0" title=dom-command-ro-hidden>hidden</a>;
readonly attribute boolean <a href="#disabled8" title=dom-command-ro-disabled>disabled</a>;
readonly attribute boolean <a href="#checked3" title=dom-command-ro-checked>checked</a>;
void <a href="#click0" title=dom-command-ro-click>click</a>();
Expand Down Expand Up @@ -30505,22 +30496,22 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
href="#icon0">icon</a></code> DOM attribute on <code><a
href="#command0">command</a></code> elements.

<p>The <dfn id=hidden2
<p>The <dfn id=hidden0
title=dom-command-ro-hidden><code>hidden</code></dfn> attribute must
return true if the command's <a href="#hidden1"
return true if the command's <a href="#hidden"
title=command-facet-HiddenState>Hidden State</a> is that the command is
hidden, and false if it is that the command is not hidden. If the element
does not define a command, the attribute must return false. This attribute
will be shadowed by the <code title=dom-command-hidden><a
href="#hidden0">hidden</a></code> DOM attribute on <code><a
href="#command0">command</a></code> elements.
will be shadowed by the <code title=dom-hidden><a
href="#hidden2">hidden</a></code> DOM attribute on the <code><a
href="#htmlelement">HTMLElement</a></code> interface.

<p>The <dfn id=disabled8
title=dom-command-ro-disabled><code>disabled</code></dfn> attribute must
return true if the command's <a href="#disabled7"
title=command-facet-DisabledState>Disabled State</a> is that the command
is disabled, and false if the command is not disabled. This attribute is
not affected by the command's <a href="#hidden1"
not affected by the command's <a href="#hidden"
title=command-facet-HiddenState>Hidden State</a>. If the element does not
define a command, the attribute must return false. This attribute will be
shadowed by the <code title="">disabled</code> attribute on
Expand Down Expand Up @@ -30564,7 +30555,8 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
href="#using6">button</a></code>, <code title=input-command><a
href="#using7">input</a></code>, <code title=option-command><a
href="#using8">option</a></code>, <code title=command-element><a
href="#command3">command</a></code>.
href="#command3">command</a></code>, <code title=bb-command><a
href="#using9">command</a></code>.

<h5 id=using><span class=secno>4.11.6.1. </span><dfn id=using5
title=a-command>Using the <code>a</code> element to define a command</dfn></h5>
Expand Down Expand Up @@ -30599,9 +30591,13 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
Otherwise, there is no <a href="#icon1" title=command-facet-Icon>Icon</a>
for the command.

<p>The <a href="#hidden1" title=command-facet-HiddenState>Hidden State</a>
and <a href="#disabled7" title=command-facet-DisabledState>Disabled
State</a> facets of the command are always false. (The command is always
<p>The <a href="#hidden" title=command-facet-HiddenState>Hidden State</a>
of the command is true (hidden) if the element has a <code
title=attr-hidden><a href="#hidden1">hidden</a></code> attribute, and
false otherwise.

<p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
State</a> facet of the command is always false. (The command is always
enabled.)

<p>The <a href="#checked2" title=command-facet-CheckedState>Checked
Expand All @@ -30622,7 +30618,7 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
title=command-facet-ID>ID</a>, <a href="#label3"
title=command-facet-Label>Label</a>, <a href="#hint"
title=command-facet-Hint>Hint</a>, <a href="#icon1"
title=command-facet-Icon>Icon</a>, <a href="#hidden1"
title=command-facet-Icon>Icon</a>, <a href="#hidden"
title=command-facet-HiddenState>Hidden State</a>, <a href="#checked2"
title=command-facet-CheckedState>Checked State</a>, and <a href="#action"
title=command-facet-Action>Action</a> facets of the command are determined
Expand Down Expand Up @@ -30687,8 +30683,10 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
<p>There is no <a href="#icon1" title=command-facet-Icon>Icon</a> for the
command.

<p>The <a href="#hidden1" title=command-facet-HiddenState>Hidden State</a>
of the command is always false. (The command is never hidden.)
<p>The <a href="#hidden" title=command-facet-HiddenState>Hidden State</a>
of the command is true (hidden) if the element has a <code
title=attr-hidden><a href="#hidden1">hidden</a></code> attribute, and
false otherwise.

<p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
State</a> of the command mirrors the disabled state of the control.
Expand Down Expand Up @@ -30745,8 +30743,10 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
<p>There is no <a href="#icon1" title=command-facet-Icon>Icon</a> for the
command.

<p>The <a href="#hidden1" title=command-facet-HiddenState>Hidden State</a>
of the command is always false. (The command is never hidden.)
<p>The <a href="#hidden" title=command-facet-HiddenState>Hidden State</a>
of the command is true (hidden) if the element has a <code
title=attr-hidden><a href="#hidden1">hidden</a></code> attribute, and
false otherwise.

<p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
State</a> of the command is true (disabled) if the element has a <code
Expand Down Expand Up @@ -30806,16 +30806,15 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
Otherwise, there is no <a href="#icon1" title=command-facet-Icon>Icon</a>
for the command.

<p>The <a href="#hidden1" title=command-facet-HiddenState>Hidden State</a>
<p>The <a href="#hidden" title=command-facet-HiddenState>Hidden State</a>
of the command is true (hidden) if the element has a <code
title=attr-command-hidden><a href="#hidden">hidden</a></code> attribute,
and false otherwise.
title=attr-hidden><a href="#hidden1">hidden</a></code> attribute, and
false otherwise.

<p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
State</a> of the command is true (disabled) if the element has either a
<code title=attr-command-disabled><a href="#disabled4">disabled</a></code>
attribute or a <code title=attr-command-hidden><a
href="#hidden">hidden</a></code> attribute (or both), and false otherwise.
State</a> of the command is true (disabled) if the element has a <code
title=attr-command-disabled><a href="#disabled4">disabled</a></code>
attribute, and false otherwise.

<p>The <a href="#checked2" title=command-facet-CheckedState>Checked
State</a> of the command is true (checked) if the element has a <code
Expand Down Expand Up @@ -30871,11 +30870,13 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
href="#bb">bb</a></code> element's <code title=attr-bb-type><a
href="#type15">type</a></code> attribute's state.

<p>The <a href="#hidden1" title=command-facet-HiddenState>Hidden State</a>
facet of the command is true if the <code><a href="#bb">bb</a></code>
element's <code title=attr-bb-type><a href="#type15">type</a></code>
attribute's state is not <i title=attr-bb-type-null-state><a
href="#null">null</a></i>.
<p>The <a href="#hidden" title=command-facet-HiddenState>Hidden State</a>
facet of the command is true (hidden) if the <code><a
href="#bb">bb</a></code> element's <code title=attr-bb-type><a
href="#type15">type</a></code> attribute's state is <i
title=attr-bb-type-null-state><a href="#null">null</a></i> or if the
element has a <code title=attr-hidden><a href="#hidden1">hidden</a></code>
attribute, and false otherwise.

<p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
State</a> facet of the command is true if the <code><a
Expand Down Expand Up @@ -40143,17 +40144,16 @@ at the first element with the given ID must be treated as if it was cloned and r
<p class=big-issue>Would be nice to explain how these features work
together.

<h3 id=the-irrelevant><span class=secno>6.2 </span>The <dfn id=irrelevant
title=attr-irrelevant><code>irrelevant</code></dfn> attribute</h3>
<h3 id=the-hidden><span class=secno>6.2 </span>The <dfn id=hidden1
title=attr-hidden><code>hidden</code></dfn> attribute</h3>

<p>All elements may have the <code title=attr-irrelevant><a
href="#irrelevant">irrelevant</a></code> content attribute set. The <code
title=attr-irrelevant><a href="#irrelevant">irrelevant</a></code>
attribute is a <a href="#boolean0">boolean attribute</a>. When specified
on an element, it indicates that the element is not yet, or is no longer,
relevant. User agents should not render elements that have the <code
title=attr-irrelevant><a href="#irrelevant">irrelevant</a></code>
attribute specified.
<p>All elements may have the <code title=attr-hidden><a
href="#hidden1">hidden</a></code> content attribute set. The <code
title=attr-hidden><a href="#hidden1">hidden</a></code> attribute is a <a
href="#boolean0">boolean attribute</a>. When specified on an element, it
indicates that the element is not yet, or is no longer, relevant. User
agents should not render elements that have the <code title=attr-hidden><a
href="#hidden1">hidden</a></code> attribute specified.

<div class=example>
<p>In the following skeletal example, the attribute is used to hide the
Expand All @@ -40169,33 +40169,35 @@ at the first element with the given ID must be treated as if it was cloned and r
&lt;script>
function login() {
// switch screens
document.getElementById('login').irrelevant = true;
document.getElementById('game').irrelevant = false;
document.getElementById('login').hidden = true;
document.getElementById('game').hidden = false;
}
&lt;/script>
&lt;/section>
&lt;section id="game" irrelevant>
&lt;section id="game" hidden>
...
&lt;/section></pre>
</div>

<p>The <code title=attr-irrelevant><a
href="#irrelevant">irrelevant</a></code> attribute must not be used to
hide content that could legitimately be shown in another presentation. For
example, it is incorrect to use <code title=attr-irrelevant><a
href="#irrelevant">irrelevant</a></code> to hide panels in a tabbed
dialog, because the tabbed interface is merely a kind of overflow
<p>The <code title=attr-hidden><a href="#hidden1">hidden</a></code>
attribute must not be used to hide content that could legitimately be
shown in another presentation. For example, it is incorrect to use <code
title=attr-hidden><a href="#hidden1">hidden</a></code> to hide panels in a
tabbed dialog, because the tabbed interface is merely a kind of overflow
presentation &mdash; showing all the form controls in one big page with a
scrollbar would be equivalent, and no less correct.

<p>Elements in a section hidden by the <code title=attr-irrelevant><a
href="#irrelevant">irrelevant</a></code> attribute are still active, e.g.
scripts and form controls in such sections still render execute and submit
respectively. Only their presentation to the user changes.
<p>Elements in a section hidden by the <code title=attr-hidden><a
href="#hidden1">hidden</a></code> attribute are still active, e.g. scripts
and form controls in such sections still render execute and submit
respectively. Only their presentation to the user changes.</p>
<!-- XXX might be worth disabling user interaction event submission
in hidden areas? e.g. make onmousemove and onclick and form controls
not respond to input? -->

<p>The <dfn id=irrelevant0
title=dom-irrelevant><code>irrelevant</code></dfn> DOM attribute must <a
href="#reflect">reflect</a> the content attribute of the same name.
<p>The <dfn id=hidden2 title=dom-hidden><code>hidden</code></dfn> DOM
attribute must <a href="#reflect">reflect</a> the content attribute of the
same name.

<h3 id=activation><span class=secno>6.3 </span>Activation</h3>

Expand Down

0 comments on commit 4497a12

Please sign in to comment.