NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 400 - Define authoring requirements for <meter> and <progress> in more detail; add v2 note for <credit>.
Define authoring requirements for <meter> and <progress> in more detail; add ...
Status: NEW
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Nobody
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-04 16:50 CET by Henri Sivonen
Modified: 2016-09-22 22:04 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2009-01-04 16:50:22 CET
Index: source
===================================================================
--- source	(revision 2483)
+++ source	(revision 2484)
@@ -13468,7 +13468,7 @@
   title="attr-progress-value">value</code> attribute, if present, must
   have a value equal to or greater than zero, and less than or equal
   to the value of the <code title="attr-progress-max">max</code>
-  attribute, if present.</p>
+  attribute, if present, or 1, otherwise.</p>
 
   <p class="note">The <code>progress</code> element is the wrong
   element to use for something that is just a gauge, as opposed to
@@ -13655,29 +13655,116 @@
   as two numbers (the higher number represents the maximum, the other
   number the current value, and the minimum is assumed to be zero), or
   as a percentage or similar (using one of the characters such as
-  "%"), or as a fraction.</p>
+  "%"), or as a fraction. However, it is also possible to use the
+  attributes to specify these values.</p>
+
+  <p>One of the following conditions, along with all the requirements
+  that are listed with that condition, must be met:</p>
+
+  <dl>
+
+   <dt>There are exactly two numbers in the contents of the element,
+   and the <code title="attr-meter-value">value</code>, <code
+   title="attr-meter-min">min</code>, and <code
+   title="attr-meter-max">max</code> attributes are all omitted</dt>
+
+   <dd>
+
+    <p>If specified, the <code title="attr-meter-low">low</code>,
+    <code title="attr-meter-high">high</code>, and <code
+    title="attr-meter-optimum">optimum</code> attributes must have
+    values greater than or equal to zero and less than or equal to the
+    bigger of the two numbers in the contents of the element.</p>
+
+    <p>If both the <code title="attr-meter-low">low</code> and <code
+    title="attr-meter-high">high</code> attributes are specified, then
+    the <code title="attr-meter-low">low</code> attribute's value must
+    be less than or equal to the value of the <code
+    title="attr-meter-high">high</code> attribute.</p>
+
+   </dd>
+
+   <dt>There is exactly one number followed by zero or more
+   <span>White_Space</span> characters and a <span>valid denominator
+   punctuation character</span> in the contents of the element, and
+   the <code title="attr-meter-value">value</code>, <code
+   title="attr-meter-min">min</code>, and <code
+   title="attr-meter-max">max</code> attributes are all omitted</dt>
+
+   <dd>
+
+    <p>If specified, the <code title="attr-meter-low">low</code>,
+    <code title="attr-meter-high">high</code>, and <code
+    title="attr-meter-optimum">optimum</code> attributes must have
+    values greater than or equal to zero and less than or equal to the
+    <span title="values associated with denominator punctuation
+    characters">value associated with the denominator punctuation
+    character</span>.</p>
+
+    <p>If both the <code title="attr-meter-low">low</code> and <code
+    title="attr-meter-high">high</code> attributes are specified, then
+    the <code title="attr-meter-low">low</code> attribute's value must
+    be less than or equal to the value of the <code
+    title="attr-meter-high">high</code> attribute.</p>
+
+   </dd>
+
+   <dt>There is exactly one number in the contents of the element, and
+   the <code title="attr-meter-value">value</code> attribute is
+   omitted</dt>
+
+   <dt>There are no numbers in the contents of the element, and the
+   <code title="attr-meter-value">value</code> attribute is
+   specified.</dt>
+
+   <dd>
+
+    <p>If the <code title="attr-meter-min">min</code> attribute
+    attribute is specified, then the <var title="">minimum</var> is
+    that attribue's value; otherwise, it is 0.</p>
+
+    <p>If the <code title="attr-meter-max">max</code> attribute
+    attribute is specified, then the <var title="">maximum</var> is
+    that attribue's value; otherwise, it is 1.</p>
+
+    <p>If there is exactly one number in the contents of the element,
+    then <var title="">value</var> is that number; otherwise, <var
+    title="">value</var> is the value of the <code
+    title="attr-meter-value">value</code> attribute.</p>
+
+    <p>The following inequalities must hold, as applicable:</p>
+
+    <ul class="brief">
+     <li><var title="">minimum</var> &le; <var title="">value</var> &le; <var title="">maximum</var></li>
+     <li><var title="">minimum</var> &le; <code title="attr-meter-low">low</code> &le; <var title="">maximum</var> (if <code title="attr-meter-low">low</code> is specified)</li>
+     <li><var title="">minimum</var> &le; <code title="attr-meter-high">high</code> &le; <var title="">maximum</var> (if <code title="attr-meter-high">high</code> is specified)</li>
+     <li><var title="">minimum</var> &le; <code title="attr-meter-optimum">optimum</code> &le; <var title="">maximum</var> (if <code title="attr-meter-optimum">optimum</code> is specified)</li>
+    </ul>
+
+    <p>If both the <code title="attr-meter-low">low</code> and <code
+    title="attr-meter-high">high</code> attributes are specified, then
+    the <code title="attr-meter-low">low</code> attribute's value must
+    be less than or equal to the value of the <code
+    title="attr-meter-high">high</code> attribute.</p>
+
+   </dd>
+
+  </dl>
+
+  <p>For the purposes of these requirements, a number is a sequence of
+  characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
+  (9), optionally including with a single U+002E FULL STOP character
+  (.), and separated from other numbers by at least one character that
+  isn't any of those; interpreted as a base ten number.</p>
 
   <p>The <code title="attr-meter-value">value</code>, <code
   title="attr-meter-min">min</code>, <code
   title="attr-meter-low">low</code>, <code
   title="attr-meter-high">high</code>, <code
   title="attr-meter-max">max</code>, and <code
-  title="attr-meter-optimum">optimum</code> attributes are all
-  optional. When present, they must have values that are <span
-  title="valid floating point number">valid floating point
-  numbers</span>, and their values must satisfy the following
-  inequalities:</p>
-
-  <ul class="brief">
-   <li><code title="attr-meter-min">min</code> &le; <code title="attr-meter-value">value</code> &le; <code title="attr-meter-max">max</code></li>
-   <li><code title="attr-meter-min">min</code> &le; <code title="attr-meter-low">low</code> &le; <code title="attr-meter-high">high</code> &le; <code title="attr-meter-max">max</code></li>
-   <li><code title="attr-meter-min">min</code> &le; <code title="attr-meter-optimum">optimum</code> &le; <code title="attr-meter-max">max</code></li>
-  </ul>
-
-  <p>All <code>meter</code> elements must have a value specified
-  somehow, either using the <code
-  title="attr-meter-value">value</code> attribute or by including a
-  number in the contents of the element.</p>
+  title="attr-meter-optimum">optimum</code> attributes, when present,
+  must have values that are <span title="valid floating point
+  number">valid floating point numbers</span>.</p>
 
   <p class="note">If no minimum or maximum is specified, then the
   range is assumed to be 0..1, and the value thus has to be within
@@ -14964,6 +15051,8 @@
    <dd>Uses <code>HTMLElement</code>.</dd>
   </dl>
 
+  <!-- v2: Add a <credit> element for photo credits -->
+
   <p>The <code>figure</code> element represents some <span>flow
   content</span>, optionally with a caption, which can be moved away
   from the main flow of the document without affecting the document's