spellcheck Tri-State Inherit Default
Resolves spellcheck attribute and IDL flag using caller-supplied true, false or inherit default behavior and parent flag. Missing/invalid attributes use the default behavior, which need not inherit. This does not override user preferences or decide which text is checkable.
Description
Spell checking depends on an explicit attribute or the element’s default behavior.
Spell checking depends on an explicit attribute or the element’s default behavior. A default may be fixed true, fixed false or inherited, so omission does not always mean inheritance.1
The tool returns attributeState, spellcheck. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.
When to use spellcheck Tri-State Inherit Default
Use this for the following task: Resolves spellcheck attribute and IDL flag using caller-supplied true, false or inherit default behavior and parent flag. Missing/invalid attributes use the default behavior, which need not inherit. This does not override user preferences or decide which text is checkable. Provide the requested local fields extracted from the relevant element or attribute.
How to use spellcheck Tri-State Inherit Default and understand its results
- Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
- Enter present, value, defaultBehavior, parentSpellcheck according to the field table, then run the tool.
- Read attributeState, spellcheck. Check the effective state, recognized-token flags or generated markup against the rules below.
- Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| present | Present | boolean | Required |
| value | Value | string; maximum text length 100000 | Required |
| defaultBehavior | Default Behavior | string; choices "true", "false", "inherit" | Required |
| parentSpellcheck | Parent Spellcheck | boolean | Required |
Supply presence, value, defaultBehavior and parentSpellcheck. Resolve explicit true/false first; otherwise use the parent only when the supplied default is inherit.
empty/true → true; false → false; omitted/invalid → supplied default behavior The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| attributeState | Attribute State | string |
| spellcheck | Spellcheck | boolean |
{
"input": {
"present": false,
"value": "",
"defaultBehavior": "false",
"parentSpellcheck": true
},
"output": {
"attributeState": "default",
"spellcheck": false
}
} Limitations and assumptions
The present flag distinguishes an absent attribute from a present empty value. Keyword matching folds ASCII uppercase without trimming. User preferences and whether the element’s text is checkable remain outside this flag calculation.
The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.
Alternative or Complementary methods
Choose translate Attribute Inheritance when you need its operation: Resolves translate yes/no and inherited translation mode. Empty means yes, invalid and omitted values inherit; supply true as the parent mode for a root element without an ancestor. Choose contenteditable Inheritance Behavior for the complementary operation: Resolves contenteditable attribute state and whether ordinary element contents are editable using a caller-supplied inherited editable flag. Empty means true and invalid/omitted values inherit. DesignMode, rich-formatting inheritance and unrelated inertness are separate.
Background reference: HTML Standard: spellcheck Tri-State Inherit Default.
References
Similar or alternative tools
- translate Attribute Inheritance
Resolves translate yes/no and inherited translation mode. Empty means yes, invalid and omitted values inherit; supply true as the parent mode for a root element without an ancestor.
- contenteditable Inheritance Behavior
Resolves contenteditable attribute state and whether ordinary element contents are editable using a caller-supplied inherited editable flag. Empty means true and invalid/omitted values inherit. DesignMode, rich-formatting inheritance and unrelated inertness are separate.