Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/editing/editing-0/spelling-and-grammar-checking/spellcheck-enumerated-ascii-case-insensitive.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="assert" content="@spellcheck values are ASCII case-insensitive">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<!--
While <div> and <span> aren’t defined as “checkable for the purposes of this
feature”, this has no effect on the attribute’s state.
We wrap the <span> elements under test with <div> elements so the checking
enabled algorithm stops at step 4 (ancestor content attribute), before steps
relying on user-agent-defined behavior (see [#concept-spellcheck-default]).
-->
<div spellcheck="true"><span spellcheck="false"></span></div>
<div spellcheck="true"><span spellcheck="FaLsE"></span></div>
<div spellcheck="true"><span spellcheck="falſe"></span></div>
<script>
const span = document.querySelectorAll("span");
test(() => {
assert_equals(span[0].spellcheck, false, "lowercase valid");
assert_equals(span[1].spellcheck, false, "mixed case valid");
assert_equals(span[2].spellcheck, true, "non-ASCII invalid");
}, "keyword false");
</script>