HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2801spellcheck='' attribute2009-02-12 10:36
@@ -7054,20 +7054,21 @@ interface <dfn>HTMLDocument</dfn> {
   void <span title="dom-click">click</span>();
   void <span title="dom-scrollIntoView">scrollIntoView</span>();
   void <span title="dom-scrollIntoView">scrollIntoView</span>(in boolean top);
            attribute long <span title="dom-tabindex">tabIndex</span>;
   void <span title="dom-focus">focus</span>();
   void <span title="dom-blur">blur</span>();
            attribute boolean <span title="dom-draggable">draggable</span>;
            attribute DOMString <span title="dom-contentEditable">contentEditable</span>;
   readonly attribute boolean <span title="dom-isContentEditable">isContentEditable</span>;
            attribute <span>HTMLMenuElement</span> <span title="dom-contextMenu">contextMenu</span>;
+           attribute boolean <span title="dom-spellcheck">spellcheck</span>;
 
   // <span>styling</span>
   readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-style">style</span>;
 
   // <span>event handler DOM attributes</span>
            attribute <span>Function</span> <span title="handler-onabort">onabort</span>;
            attribute <span>Function</span> <span title="handler-onblur">onblur</span>;
            attribute <span>Function</span> <span title="handler-onchange">onchange</span>;
            attribute <span>Function</span> <span title="handler-onclick">onclick</span>;
            attribute <span>Function</span> <span title="handler-oncontextmenu">oncontextmenu</span>;
@@ -7114,20 +7115,21 @@ interface <dfn>HTMLDocument</dfn> {
    <dt>Global attributes:</dt>
    <dd><code title="attr-class">class</code></dd>
    <dd><code title="attr-contenteditable">contenteditable</code></dd>
    <dd><code title="attr-contextmenu">contextmenu</code></dd>
    <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-hidden">hidden</code></dd>
    <dd><code title="attr-lang">lang</code></dd>
    <dd><code title="attr-style">style</code></dd>
+   <dd><code title="attr-spellcheck">spellcheck</code></dd>
    <dd><code title="attr-tabindex">tabindex</code></dd>
    <dd><code title="attr-title">title</code></dd>
   </dl>
 
   <p>In addition, unless otherwise specified, the following
   <span>event handler content attributes</span> may be specified on
   any <span title="HTML elements">HTML element</span>:</p>
 
   <dl class="element">
    <dt>Event handler content attributes:</dt>
@@ -35551,21 +35553,21 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
 
     <p>The default data provider must return 1 for the column count,
     the empty string for the column's caption, and must not add any
     classes to the column's classes.</p>
 
     <p>For the rows, assume the existence of a node filter view of the
     descendants of the first element child of the
     <code>datagrid</code> element (the <code>select</code> or
     <code>datalist</code> element), that skips all nodes other than
     <code>optgroup</code> and <code>option</code> elements, as well as
-    any descendents of any <code>option</code> elements.</p>
+    any descendants of any <code>option</code> elements.</p>
 
     <p>Given a path <var title="">row</var>, the corresponding element
     is the one obtained by drilling into the view, taking the child
     given by the path each time.</p>
 
     <div class="example">
 
      <p>Given the following XML markup:</p>
 
      <pre>&lt;datagrid>
@@ -35848,21 +35850,21 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
 
   <dl>
 
    <dt>Cyclable cells</dt>
 
    <dd>
 
     <p>If the first element child of a cell's element is a
     <code>select</code> element that has a no <code
     title="attr-select-multiple">multiple</code> attribute and has at
-    least one <code>option</code> element descendent, then the cell
+    least one <code>option</code> element descendant, then the cell
     acts as a cyclable cell.</p>
 
     <p>The "current" <code>option</code> element is the selected
     <code>option</code> element, or the first <code>option</code>
     element if none is selected.</p>
 
     <p>The <code title="dom-provider-getCellData">getCellData()</code>
     method must return the <code>textContent</code> of the current
     <code>option</code> element (the <code
     title="attr-option-label">label</code> attribute is <span
@@ -35874,23 +35876,23 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
     must add the <code
     title="datagrid-cell-class-cyclable">cyclable</code> class and
     then all the classes of the current <code>option</code>
     element.</p>
 
     <p>The <code title="dom-provider-cycleCell">cycleCell()</code>
     method must change the selection of the <code>select</code>
     element such that the next <code>option</code> element after the
     current <code>option</code> element is the only one that is
     selected (in <span>tree order</span>). If the current <code>option</code>
-    element is the last <code>option</code> element descendent of the
+    element is the last <code>option</code> element descendant of the
     <code>select</code>, then the first <code>option</code> element
-    descendent must be selected instead.</p>
+    descendant must be selected instead.</p>
 
     <p>The <code
     title="dom-provider-setCellCheckedState">setCellCheckedState()</code>
     and <code title="dom-provider-editCell">editCell()</code> methods
     must do nothing.</p>
 
    </dd>
 
    <dt>Progress bar cells</dt>
 
@@ -38508,22 +38510,24 @@ explain that only direct children of the <menu> matter
    <dd>
 
     <p>The <code title="selector-read-write">:read-write</code>
     pseudo-class must match the following elements:</p>
 
     <ul>
 
      <li><code>input</code> elements to which the <code
      title="attr-input-readonly">readonly</code> attribute applies,
      but that are not <i title="concept-input-immutable">immutable</i>
-     (i.e. that do not have the attribute specified and that are not
-     <span title="concept-fe-disabled">disabled</span>)</li>
+     (i.e. that do not have the <code
+     title="attr-input-readonly">readonly</code> attribute specified
+     and that are not <span
+     title="concept-fe-disabled">disabled</span>)</li>
 
      <li><code>textarea</code> elements that do not have a <code
      title="attr-textarea-readonly">readonly</code> attribute, and
      that are not <span
      title="concept-fe-disabled">disabled</span></li>
 
      <li>any element that is <span>editable</span></li>
 
     </ul>
 
@@ -49394,20 +49398,219 @@ at the first element with the given ID must be treated as if it was cloned and r
   title="dom-document-designMode">designMode</code> disabled.</p>
 
 <!-- XXX does designMode disable scripting or not?
   <p>Enabling <code title="dom-document-designMode">designMode</code>
   <a href="#designModeScriptBlocked">causes scripts in general to be
   disabled</a> and the document to become editable.</p>
 -->
 
 
 
+  <h3>Spelling and grammar checking</h3>
+
+  <p>User agents can support the checking of spelling and grammar of
+  editable text, either in form controls (such as the value of
+  <code>textarea</code> elements), or in elements in an <span>editing
+  host</span> (using <code
+  title="attr-contenteditable">contenteditable</code>).</p>
+
+  <p>For each element, user agents must establish a <dfn
+  title="concept-spellcheck-default">default behavior</dfn>, either
+  through defaults or through preferences expressed by the user. There
+  are three possible default behaviors for each element:</p>
+
+  <dl>
+
+   <dt><dfn title="concept-spellcheck-default-true">true-by-default</dfn>
+
+   <dd>The element will be checked for spelling and grammar if its
+   contents are editable.
+
+   <dt><dfn title="concept-spellcheck-default-false">false-by-default</dfn>
+
+   <dd>The element will never be checked for spelling and grammar.
+
+   <dt><dfn title="concept-spellcheck-default-inherit">inherit-by-default</dfn>
+
+   <dd>The element's default behavior is the same asits parent
+   element's. Elements that have no parent element cannot have this as
+   their default behavior.
+
+  </dl>
+
+  <hr>
+
+  <p>The <dfn title="attr-spellcheck"><code>spellcheck</code></dfn>
+  attribute is an <span>enumerated attribute</span> whose keywords are
+  <code title="">true</code> and <code
+  title="">false</code>. The <code
+  title="">true</code> keyword map to the <i>true</i> state. The <code
+  title="">false</code> keyword maps to the <i>false</i> state. In
+  addition, there is a third state, the <i>inherit</i> state, which is
+  the <i>missing value default</i> (and the <i>invalid value
+  default</i>).</p>
+
+  <hr>
+
+  <p>The <dfn title="dom-spellcheck"><code>spellcheck</code></dfn> DOM
+  attribute, on getting, must return true if the element's <code
+  title="attr-spellcheck">spellcheck</code> content attribute is in
+  the <i>true</i> state, or if the element's <code
+  title="attr-spellcheck">spellcheck</code> content attribute is in
+  the <i>inherit</i> state and the element's <span
+  title="concept-spellcheck-default">default behavior</span> is <span
+  title="concept-spellcheck-default-true">true-by-default</span>, or
+  if the element's <code title="attr-spellcheck">spellcheck</code>
+  content attribute is in the <i>inherit</i> state and the element's
+  <span title="concept-spellcheck-default">default behavior</span> is
+  <span
+  title="concept-spellcheck-default-inherit">inherit-by-default</span>
+  and the element's parent element's <code
+  title="dom-spellcheck">spellcheck</code> DOM attribute would return
+  true; otherwise, if none of those conditions applies, then the
+  attribute must instead return false.</p>
+
+  <p class="note">The <code title="dom-spellcheck">spellcheck</code>
+  DOM attribute is not affected by user preferences that override the
+  <code title="attr-spellcheck">spellcheck</code> content attribute,
+  and therefore might not reflect the actual spellchecking state.</p>
+
+  <p>On setting, if the new value is true, then the element's <code
+  title="attr-spellcheck">spellcheck</code> content attribute must be
+  set to the literal string "<code title="">true</code>", otherwise it
+  must be set to the literal string "<code title="">false</code>".
+
+  <hr>
+
+  <p>User agents must only consider the following pieces of text as
+  checkable for the purposes of this feature:</p>
+
+  <ul>
+
+   <li>The value of <code>input</code> elements to which the <code
+   title="attr-input-readonly">readonly</code> attribute applies, but
+   that are not <i title="concept-input-immutable">immutable</i>
+   (i.e. that do not have the <code
+   title="attr-input-readonly">readonly</code> attribute specified and
+   that are not <span
+   title="concept-fe-disabled">disabled</span>).</li>
+
+   <li>The value of <code>textarea</code> elements that do not have a
+   <code title="attr-textarea-readonly">readonly</code> attribute and
+   that are not <span
+   title="concept-fe-disabled">disabled</span>.</li>
+
+   <li>Text in <span title="text node">text nodes</span> that are
+   children of <span>editable</span> elements.</li>
+
+   <li>Text in attributes of <span>editable</span> elements.</li>
+
+  </ul>
+
+  <p>For text that is part of a <span>text node</span>, the element
+  with which the text is associated is the element that is the
+  immediate parent of the first character of the word, sentence, or
+  other piece of text. For text in attributes, it is the attribute's
+  element. For the values of <code>input</code> and
+  <code>textarea</code> elements, it is the element itself.</p>
+
+  <p>To determine if a word, sentence, or other piece of text in an
+  applicable element (as defined above) is to have spelling- and/or
+  grammar-checking enabled, the UA must use the following
+  algorithm:</p>
+
+  <ol>
+
+   <!-- user override -->
+
+   <li>If the user has disabled the checking for this text, then the
+   checking is disabled.</li>
+
+   <li>Otherwise, if the user has forced the checking for this text to
+   always be enabled, then the checking is enabled.</li>
+
+   <!-- content attribute: on, off -->
+
+   <li>Otherwise, if the element with which the text is associated has
+   a <code title="attr-spellcheck">spellcheck</code> content
+   attribute, then: if that attribute is in the <i>true</i> state,
+   then checking is enabled; otherwise, if that attribute is in the
+   <i>false</i> state, then checking is disabled.</li>
+
+   <!-- inherit, if there is one to inherit from -->
+
+   <li>Otherwise, if there is an ancestor element with a <code
+   title="attr-spellcheck">spellcheck</code> content attribute that is
+   not in the <i>inherit</i> state, then: if the nearest such
+   ancestor's <code title="attr-spellcheck">spellcheck</code> content
+   attribute is in the <i>true</i> state, then checking is enabled;
+   otherwise, checking is disabled.</li>
+
+   <!-- default -->
+
+   <li>Otherwise, if the element's <span
+   title="concept-spellcheck-default">default behavior</span> is <span
+   title="concept-spellcheck-default-true">true-by-default</span>,
+   then checking is enabled.</li>
+
+   <li>Otherwise, if the element's <span
+   title="concept-spellcheck-default">default behavior</span> is <span
+   title="concept-spellcheck-default-false">false-by-default</span>,
+   then checking is disabled.</li>
+
+   <!-- default inheritance -->
+
+   <li>Otherwise, if the element's parent element has <em>its</em>
+   checking enabled, then checking is enabled.</li>
+
+   <li>Otherwise, checking is disabled.</li>
+
+  </ol>
+
+  <p>If the checking is enabled for a word/sentence/text, the user
+  agent should indicate spelling and/or grammar errors in that
+  text. User agents should take into account the other semantics given
+  in the document when suggesting spelling and grammar
+  corrections. User agents may use the language of the element to
+  determine what spelling and grammar rules to use, or may use the
+  user's preferred language settings. UAs should use
+  <code>input</code> element attributes such as <code
+  title="attr-input-pattern">pattern</code> to ensure that the
+  resulting value is valid, where possible.</p>
+
+  <p>If checking is disabled, the user agent should not indicate
+  spelling or grammar errors for that text.</p>
+
+  <div class="example">
+
+   <p>The element with ID "a" in the following example would be the
+   one used to determine if the word "Hello" is checked for spelling
+   errors. In this example, it would not be.</p>
+
+   <pre>&lt;div contenteditable="true">
+ &lt;span spellcheck="false" id="a">Hell&lt;/span>&lt;em>o!&lt;/em>
+&lt;/div></pre>
+
+   <p>The element with ID "b" in the following example would have
+   checking enabled (the leading space character in the attribute's
+   value on the <code>input</code> element causes the attribute to be
+   ignored, so the ancestor's value is used instead, regardless of the
+   default).</p>
+
+   <pre>&lt;p spellcheck="true">
+ &lt;label>Name: &lt;input spellcheck=" false" id="b">&lt;/label>
+&lt;/p></pre>
+
+   </div>
+
+
+
   <h3 id="dnd"><dfn>Drag and drop</dfn></h3>
 
 <!--XXX
 
 http://msdn.microsoft.com/workshop/author/datatransfer/overview.asp
 http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/clipboarddata.asp
 
 > To implement this with simple interface I've proposed, events should be
 > handled either by existing elements (like list items that compare their size
 > and position of dragged element to decide whether element should be dropped
@@ -62259,54 +62462,54 @@ tfoot[valign=baseline], tr[valign=baseline], td[valign=baseline], th[valign=base
   vertial-align: baseline;
 }</pre>
 
   <p>The <code>center</code> element, the <code>caption</code> element
   unless specified otherwise below, and the <code>div</code> element
   when its <code title="attr-div-align">align</code> attribute's value
   is an <span>ASCII case-insensitive</span> match for the string
   "<code title="">center</code>", are expected to center text within
   themselves, as if they had their 'text-align' property set to
   'center' in a <span title="presentational hints">presentational
-  hint</span>, and to <span>align descendents</span> to the center.</p>
+  hint</span>, and to <span>align descendants</span> to the center.</p>
 
   <p>The <code>div</code>, <code>caption</code>, <code>thead</code>,
   <code>tbody</code>, <code>tfoot</code>, <code>tr</code>,
   <code>td</code>, and <code>th</code> elements, when they have an
   <code title="attr-align">align</code> attribute whose value is an
   <span>ASCII case-insensitive</span> match for the string "<code
   title="">left</code>", are expected to left-align text within
   themselves, as if they had their 'text-align' property set to 'left'
   in a <span title="presentational hints">presentational hint</span>,
-  and to <span>align descendents</span> to the left.</p>
+  and to <span>align descendants</span> to the left.</p>
 
   <p>The <code>div</code>, <code>caption</code>, <code>thead</code>,
   <code>tbody</code>, <code>tfoot</code>, <code>tr</code>,
   <code>td</code>, and <code>th</code> elements, when they have an
   <code title="attr-align">align</code> attribute whose value is an
   <span>ASCII case-insensitive</span> match for the string "<code
   title="">right</code>", are expected to right-align text within
   themselves, as if they had their 'text-align' property set to
   'right' in a <span title="presentational hints">presentational
-  hint</span>, and to <span>align descendents</span> to the right.</p>
+  hint</span>, and to <span>align descendants</span> to the right.</p>
 
   <p>The <code>div</code>, <code>caption</code>, <code>thead</code>,
   <code>tbody</code>, <code>tfoot</code>, <code>tr</code>,
   <code>td</code>, and <code>th</code> elements, when they have an
   <code title="attr-align">align</code> attribute whose value is an
   <span>ASCII case-insensitive</span> match for the string "<code
   title="">justify</code>", are expected to full-justify text within
   themselves, as if they had their 'text-align' property set to
   'justify' in a <span title="presentational hints">presentational
-  hint</span>, and to <span>align descendents</span> to the left.</p>
+  hint</span>, and to <span>align descendants</span> to the left.</p>
 
-  <p>When a user agent is to <dfn>align descendents</dfn> of a node,
-  the user agent is expected to align only those descendents that have
+  <p>When a user agent is to <dfn>align descendants</dfn> of a node,
+  the user agent is expected to align only those descendants that have
   both their 'margin-left' and 'margin-right' properties computing to
   a value other than 'auto', that are over-constrained and that have
   one of those two margins with a used value forced to a greater
   value, and that do not themselves have an applicable <code
   title="attr-align">align</code> attribute.</p>
 
 
   <h4>Fonts and colors</h4>
 
   <pre class="css">@namespace url(http://www.w3.org/1999/xhtml);

|