Skip to content
Permalink
Browse files

[] (0) Rename the 'irrelevant' attribute to 'hidden'.

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 4497a1261ac581347cc6ead1aec12e5b600ed7b1
Showing with 159 additions and 155 deletions.
  1. +91 −89 index
  2. +68 −66 source
180 index
@@ -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>

@@ -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);
@@ -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>

+ 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>

<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>

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>;
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

<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
<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
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>
<!--
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>

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>();
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
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>
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
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
<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.
<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
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
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
<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
&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>

0 comments on commit 4497a12

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