HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2119

File a bug

SVNBugCommentTime (UTC)
2119Rename the 'irrelevant' attribute to 'hidden'.2008-08-28 11:16
Index: source
===================================================================
--- source	(revision 2118)
+++ source	(revision 2119)
@@ -5621,7 +5621,7 @@
   readonly attribute <span>DOMStringMap</span> <span title="dom-dataset">dataset</span>;
 
   // <span>user interaction</span>
-           attribute boolean <span title="dom-irrelevant">irrelevant</span>;
+           attribute boolean <span title="dom-hidden">hidden</span>;
   void <span title="dom-click">click</span>();
   void <span title="dom-scrollIntoView">scrollIntoView</span>();
   void <span title="dom-scrollIntoView">scrollIntoView</span>(in boolean top);
@@ -5703,7 +5703,7 @@
    <dd><code title="attr-dir">dir</code></dd>
    <dd><code title="attr-draggable">draggable</code></dd>
    <dd><code title="attr-id">id</code></dd>
-   <dd><code title="attr-irrelevant">irrelevant</code></dd>
+   <dd><code title="attr-hidden">hidden</code></dd>
    <dd><code title="attr-lang">lang</code></dd>
    <dd><code title="attr-ref">ref</code></dd>
    <dd><code title="attr-registrationmark">registrationmark</code></dd>
@@ -15192,7 +15192,7 @@
          + 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">
@@ -26887,7 +26887,6 @@
    <dd><code title="attr-command-type">type</code></dd>
    <dd><code title="attr-command-label">label</code></dd>
    <dd><code title="attr-command-icon">icon</code></dd>
-   <dd><code title="attr-command-hidden">hidden</code></dd>
    <dd><code title="attr-command-disabled">disabled</code></dd>
    <dd><code title="attr-command-checked">checked</code></dd>
    <dd><code title="attr-command-radiogroup">radiogroup</code></dd>
@@ -26899,7 +26898,6 @@
            attribute DOMString <span title="dom-command-type">type</span>;
            attribute DOMString <span title="dom-command-label">label</span>;
            attribute DOMString <span title="dom-command-icon">icon</span>;
-           attribute boolean <span title="dom-command-hidden">hidden</span>;
            attribute boolean <span title="dom-command-disabled">disabled</span>;
            attribute boolean <span title="dom-command-checked">checked</span>;
            attribute DOMString <span title="dom-command-radiogroup">radiogroup</span>;
@@ -26938,25 +26936,21 @@
   attribute is specified, the attribute's value must contain a
   <span>valid URL</span>.</p>
 
-  <p>The <dfn title="attr-command-hidden"><code>hidden</code></dfn>
-  attribute is a <span>boolean attribute</span> that, if present,
-  indicates that the command is not relevant and is to be hidden.</p>
-
   <p>The <dfn
   title="attr-command-disabled"><code>disabled</code></dfn> attribute
   is a <span>boolean attribute</span> that, if present, indicates that
   the command is not available in the current state.</p>
 
-  <p class="note">The distinction between <span
-  title="command-facet-DisabledState">Disabled State</span> and <span
-  title="command-facet-HiddenState">Hidden State</span> 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>
+  <p class="note">The distinction between <code
+  title="attr-command-disabled">disabled</code> and <code
+  title="attr-hidden">hidden</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>
 
   <p>The <dfn title="attr-command-checked"><code>checked</code></dfn>
   attribute is a <span>boolean attribute</span> that, if present,
@@ -26992,7 +26986,6 @@
   <p>The <dfn title="dom-command-type"><code>type</code></dfn>, <dfn
   title="dom-command-label"><code>label</code></dfn>, <dfn
   title="dom-command-icon"><code>icon</code></dfn>, <dfn
-  title="dom-command-hidden"><code>hidden</code></dfn>, <dfn
   title="dom-command-disabled"><code>disabled</code></dfn>, <dfn
   title="dom-command-checked"><code>checked</code></dfn>, <dfn
   title="dom-command-radiogroup"><code>radiogroup</code></dfn>, and  <dfn
@@ -27440,7 +27433,9 @@
 
    <dt>An element that <span title="concept-command">defines a command</span></dt>
 
-   <dd>Append the command to the menu. If the element is a
+   <dd>Append the command to the menu, respecting its <span
+   title="concept-facet">facets</span><!-- XXX be explicit about what
+   this means for each facet -->. If the element is a
    <code>command</code> element with a <code
    title="attr-command-default">default</code> attribute, mark the
    command as being a default command.</dd> <!-- XXX if there's an
@@ -27610,7 +27605,7 @@
   disabled state.</p>
 
   <p id="facets">Commands are defined to have the following
-  <em>facets</em>:</p>
+  <dfn title="concept-facet">facets</dfn>:</p>
 
   <dl>
 
@@ -27652,11 +27647,7 @@
 
    <dt><dfn title="command-facet-DisabledState">Disabled State</dfn></dt>
 
-   <dd>Whether the command can be triggered or not. If the <span
-   title="command-facet-HiddenState">Hidden State</span> is true
-   (hidden) then the <span
-   title="command-facet-DisabledState">Disabled State</span> will be
-   true (disabled) regardless.</dd>
+   <dd>Whether the command is relevant and can be triggered or not.</dd>
 
    <dt><dfn title="command-facet-CheckedState">Checked State</dfn></dt>
 
@@ -27760,8 +27751,8 @@
   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">hidden</code> DOM attribute on
-  <code>command</code> elements.</p>
+  title="dom-hidden">hidden</code> DOM attribute on the
+  <code>HTMLElement</code> interface.</p>
 
   <p>The <dfn
   title="dom-command-ro-disabled"><code>disabled</code></dfn>
@@ -27814,7 +27805,8 @@
   title="button-command">button</code>, <code
   title="input-command">input</code>, <code
   title="option-command">option</code>, <code
-  title="command-element">command</code>.</p>
+  title="command-element">command</code>, <code
+  title="bb-command">command</code>.</p>
 
 
   <h5><dfn title="a-command">Using the <code>a</code> element to define a command</dfn></h5>
@@ -27850,10 +27842,14 @@
   command.</p>
 
   <p>The <span title="command-facet-HiddenState">Hidden State</span>
-  and <span title="command-facet-DisabledState">Disabled State</span>
-  facets of the command are always false. (The command is always
-  enabled.)</p>
+  of the command is true (hidden) if the element has a <code
+  title="attr-hidden">hidden</code> attribute, and false
+  otherwise.</p>
 
+  <p>The <span title="command-facet-DisabledState">Disabled
+  State</span> facet of the command is always false. (The command is
+  always enabled.)</p>
+
   <p>The <span title="command-facet-CheckedState">Checked State</span>
   of the command is always false. (The command is never checked.)</p>
 
@@ -27937,7 +27933,9 @@
   command.</p>
 
   <p>The <span title="command-facet-HiddenState">Hidden State</span>
-  of the command is always false. (The command is never hidden.)</p>
+  of the command is true (hidden) if the element has a <code
+  title="attr-hidden">hidden</code> attribute, and false
+  otherwise.</p>
 
   <p>The <span title="command-facet-DisabledState">Disabled
   State</span> of the command mirrors the disabled state of the
@@ -27995,7 +27993,9 @@
   command.</p>
 
   <p>The <span title="command-facet-HiddenState">Hidden State</span>
-  of the command is always false. (The command is never hidden.)</p>
+  of the command is true (hidden) if the element has a <code
+  title="attr-hidden">hidden</code> attribute, and false
+  otherwise.</p>
 
   <p>The <span title="command-facet-DisabledState">Disabled
   State</span> of the command is true (disabled) if the element has a
@@ -28058,14 +28058,13 @@
 
   <p>The <span title="command-facet-HiddenState">Hidden State</span>
   of the command is true (hidden) if the element has a <code
-  title="attr-command-hidden">hidden</code> attribute, and false
+  title="attr-hidden">hidden</code> attribute, and false
   otherwise.</p>
 
   <p>The <span title="command-facet-DisabledState">Disabled
-  State</span> of the command is true (disabled) if the element has
-  either a <code title="attr-command-disabled">disabled</code>
-  attribute or a <code title="attr-command-hidden">hidden</code>
-  attribute (or both), and false otherwise.</p>
+  State</span> of the command is true (disabled) if the element has a
+  <code title="attr-command-disabled">disabled</code> attribute, and
+  false otherwise.</p>
 
   <p>The <span title="command-facet-CheckedState">Checked State</span>
   of the command is true (checked) if the element has a <code
@@ -28116,9 +28115,11 @@
   title="attr-bb-type">type</code> attribute's state.</p>
 
   <p>The <span title="command-facet-HiddenState">Hidden State</span>
-  facet of the command is true if the <code>bb</code> element's <code
-  title="attr-bb-type">type</code> attribute's state is not <i
-  title="attr-bb-type-null-state">null</i>.</p>
+  facet of the command is true (hidden) if the <code>bb</code>
+  element's <code title="attr-bb-type">type</code> attribute's state
+  is <i title="attr-bb-type-null-state">null</i> or if the element has
+  a <code title="attr-hidden">hidden</code> attribute, and false
+  otherwise.</p>
 
   <p>The <span title="command-facet-DisabledState">Disabled
   State</span> facet of the command is true if the <code>bb</code>
@@ -37512,15 +37513,14 @@
 
 
 
-  <h3>The <dfn title="attr-irrelevant"><code>irrelevant</code></dfn> attribute</h3>
+  <h3>The <dfn title="attr-hidden"><code>hidden</code></dfn> attribute</h3>
 
-  <p>All elements may have the <code
-  title="attr-irrelevant">irrelevant</code> content attribute
-  set. The <code title="attr-irrelevant">irrelevant</code> attribute
-  is a <span>boolean attribute</span>. When specified on an element,
-  it indicates that the element is not yet, or is no longer,
+  <p>All elements may have the <code title="attr-hidden">hidden</code>
+  content attribute set. The <code title="attr-hidden">hidden</code>
+  attribute is a <span>boolean attribute</span>. 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">irrelevant</code> attribute specified.</p>
+  title="attr-hidden">hidden</code> attribute specified.</p>
 
   <div class="example">
 
@@ -37537,34 +37537,36 @@
    &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-hidden">hidden</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">hidden</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>
 
-  <p>The <code title="attr-irrelevant">irrelevant</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">irrelevant</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>
-
   <p>Elements in a section hidden by the <code
-  title="attr-irrelevant">irrelevant</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
+  title="attr-hidden">hidden</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>
 
-  <p>The <dfn title="dom-irrelevant"><code>irrelevant</code></dfn> DOM
+  <!-- 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 title="dom-hidden"><code>hidden</code></dfn> DOM
   attribute must <span>reflect</span> the content attribute of the
   same name.</p>
 

|