Skip to content

[draft] Spell check custom dictionary#12590

Draft
bkardell wants to merge 5 commits into
whatwg:mainfrom
bkardell:spell-check-custom-dictionary
Draft

[draft] Spell check custom dictionary#12590
bkardell wants to merge 5 commits into
whatwg:mainfrom
bkardell:spell-check-custom-dictionary

Conversation

@bkardell

@bkardell bkardell commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Add initial draft for supporting spell check custom dictionary (currently stage 1)

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


/index.html ( diff )
/interaction.html ( diff )
/nav-history-apis.html ( diff )

bkardell and others added 4 commits April 15, 2026 15:54
Introduces a per-document custom spelling exemption list that allows
pages (in a SecureContext) to add or remove words from the UA's spell
checker so those words are not flagged as misspelled.

- Defines the `concept-custom-spelling-exemptions` ordered set on each Document
- Adds the `SpellCheckCustomDictionary` interface with `addWords()` and `removeWords()`
- Exposes `window.spellCheckDictionary` [SecureContext, SameObject]
- Specifies that UAs without spell checking support must not expose the attribute,
  preserving `if (window.spellCheckDictionary)` as a reliable feature-detection pattern

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces a per-document custom spelling exemption list that allows
pages (in a SecureContext) to add or remove words from the UA's spell
checker so those words are not flagged as misspelled.

- Defines the `concept-custom-spelling-exemptions` ordered set on each Document
- Adds the `SpellCheckCustomDictionary` interface with `addWords()` and `removeWords()`
- Exposes `window.spellCheckDictionary` as `[SecureContext, SameObject]` on Window
- Matching is case-sensitive, since the primary use cases are proper nouns,
  brand names, and acronyms where casing is part of the word's identity
- Specifies that UAs without spell checking support must not expose the attribute,
  preserving `if (window.spellCheckDictionary)` as a reliable feature-detection pattern

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bkardell
bkardell marked this pull request as draft June 17, 2026 09:07
@annevk annevk added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. needs tests Moving the issue forward requires someone to write tests stage: 1 Incubation a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. labels Jun 17, 2026
@annevk

annevk commented Jun 17, 2026

Copy link
Copy Markdown
Member

cc @whatwg/i18n @whatwg/a11y

@ziransun

Copy link
Copy Markdown

Chromium implementation bug: https://issues.chromium.org/issues/428005649

@patrickhlauke

Copy link
Copy Markdown
Member

cc @whatwg/i18n @whatwg/a11y

on first reading, I don't have any accessibility concerns with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y-tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response. addition/proposal New features or enhancements i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. needs implementer interest Moving the issue forward requires implementers to express interest needs tests Moving the issue forward requires someone to write tests stage: 1 Incubation

Development

Successfully merging this pull request may close these issues.

4 participants