Bugzilla – Bug 400
Define authoring requirements for <meter> and <progress> in more detail; add v2 note for <credit>.
Last modified: 2016-09-22 22:04:14 CEST
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> ≤ <var title="">value</var> ≤ <var title="">maximum</var></li> + <li><var title="">minimum</var> ≤ <code title="attr-meter-low">low</code> ≤ <var title="">maximum</var> (if <code title="attr-meter-low">low</code> is specified)</li> + <li><var title="">minimum</var> ≤ <code title="attr-meter-high">high</code> ≤ <var title="">maximum</var> (if <code title="attr-meter-high">high</code> is specified)</li> + <li><var title="">minimum</var> ≤ <code title="attr-meter-optimum">optimum</code> ≤ <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> ≤ <code title="attr-meter-value">value</code> ≤ <code title="attr-meter-max">max</code></li> - <li><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></li> - <li><code title="attr-meter-min">min</code> ≤ <code title="attr-meter-optimum">optimum</code> ≤ <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