IMPLEMENTATION REQUIREMENTS The HTMLElement interface has one new DOM attribute: attribute boolean spellcheck; On getting, the "spellcheck" DOM attribute returns a value as determined by the following algorithm. * If the element has a "spellcheck" content attribute with the ASCII case-insensitive value "true", then the DOM attribute must return true. * Otherwise, if the element has a "spellcheck" content attribute with the ASCII case-insensitive value "false", then the DOM attribute must return false. * Otherwise, it must return the UA default value for that element. If the UA default for that element is to inherit from its parent element, then it must return the same as its parent's "spellcheck" DOM attribute. Note: The "spellcheck" DOM attribute is not affected by user preferences, and therefore might not reflect the actual spellchecking state. The the DOM attribute is set, the element's "spellcheck" content attribute must be set to the literal value "true" if the attribute is being set to the "true" value, and "false" otherwise. To determine if a word, sentence, or other piece of text is to have spelling and/or grammar checking enabled, the UA must use the following algorithm: 1. If the user has disabled the checking for this text, or if the text is readonly, or if the text is disabled, then the checking is disabled. 2. Otherwise, if the user has forced the checking for this text to always be enabled, then the checking is enabled. 3. Otherwise, if the element with which the text is associated has a "spellcheck" content attribute, then: if that attribute has the ASCII case-insensitive value "true", then checking is enabled; otherwise, if that attribute has the ASCII case-insensitive "false", then checking is disabled; otherwise, move on to the next step. 4. Otherwise, if the element with which the text is associated has an ancestor element with a "spellcheck" attribute set to one of the ASCII case-insensitive values "true" or "false", then, if the nearest such ancestor has its attribute set to the ASCII case-insensitive value "true", then checking is enabled; otherwise, if the nearest such ancestor has its attribute set to the ASCII case-insensitive value "false", then checking is disabled; otherwise, move on to the next step. 5. The UA default for this element must be used. The UA default can vary based on heuristics, e.g. whether the element is enabled or not. For text that is part of text or CDATA nodes, the element with which the text is associated is the element that is the immediate parent of the start of the word, sentence, or other piece of text. For text in attributes, it is the element with which the attribute is associated. For text in text fields, it is the relevant input or textarea element. Examples: The element with id "a" in the following example would be the one used to determine if the word "Hello" is spell-checked. It this example, it would not be.
Hello!
The element "b" in the following example would have spell checking enabled (not disabled, because of the leading " " character, and not the UA default, because the grandparent explicitly enables it).

If the checking is enabled for a word/sentence/text, the UA should indicate spelling and/or grammar errors in that text. UAs should take into account the other semantics given in the document when suggesting spelling and grammar corrections. UAs should use the language of the element to determine what spelling and grammar rules to use. (Language information can come from the "lang" and "xml:lang" attributes, Content-Language HTTP headers, or other sources. q.v.) UAs should use input element attributes such as pattern to ensure that the resulting value is valid. If spellchecking is disabled, the UA should not indicate spelling or grammar errors for that text. AUTHOR REQUIREMENTS Elements may have a new attribute specified, "spellcheck". If specified, it must have either the value "true" or the value "false" (ASCII case-INsensitive). The "true" value indicates that spellchecking is to be enabled, the "false" value indicates that spellchecking is to be disabled. The attribute is inherited. By default, the UA and user preferences decide if spelling checking is enabled. There is also a "spellcheck" DOM attribute on all elements that can be used to quickly set the value of the content attribute dynamically, or to check the default value for an element. Authors should set the document's language information, to enable user agents to accurately determine which dictionary to use when checking the spelling or grammar of user input.