How does the html5 spellcheck attribute work?
Asked Answered
W

3

5

How does the html5 spellcheck attribute work?

I am seeing this page with Chrome 17, which is supposed to support spellcheck on <textarea>, (but not on <input type='text'>), but when I type in some non-words in the textarea given in that page, I see no change.

Wynne answered 22/2, 2012 at 7:1 Comment(0)
T
1

The spellcheck attribute is still poorly (if at all) implemented in browsers. For example, when I visit the page you mention in Chrome 18 and type misspelled words into the box “This text area should be checked for mispelled words.” the browser marks “words” as misspelled. Double clicking on some other word makes it indicated as misspelled, too. The explanation is that I had Spanish set as the spellchecking language. Note: This language can be changed by right-clicking on the input are and selecting the spellcheck settings, but the change does not take effect before the page is reloaded.

So check out those settings in your browser. Note that there’s a checkbox there that controls whether spellchecking is in use at all.

Tavern answered 22/2, 2012 at 8:23 Comment(2)
I did right clicking, and spell checking had been off. I activated it, and now it works.Wynne
spellcheck seems to break Javascript in iOS simulator, even though it causes no problem in Safari or Safari Mobile.Nettie
K
6

See this working example applied to a text area. That is working in safari, chrome and firefox for me. If not, please provide information about what OS you use. Browser support is currently limited, as you can see below.

table of support

Kenishakenison answered 22/2, 2012 at 7:37 Comment(1)
@jacktheripper, do you have an up to date list or link to this feature?Watercool
M
2

Support has improved over time. This is an updated table:

enter image description here

Few things to consider:

  • Default value depends on the element and browser. Generally, contenteditable and <textarea> behave as if it were set to “true”, and <input> behave as if it were set to false.
  • Spellcheck does not impact validation.
  • Android provides autosuggest, but doesn’t support spellcheck.

More info: MDN article, Wuffo article, Latest comparison table

Mcwilliams answered 1/7, 2018 at 11:56 Comment(0)
T
1

The spellcheck attribute is still poorly (if at all) implemented in browsers. For example, when I visit the page you mention in Chrome 18 and type misspelled words into the box “This text area should be checked for mispelled words.” the browser marks “words” as misspelled. Double clicking on some other word makes it indicated as misspelled, too. The explanation is that I had Spanish set as the spellchecking language. Note: This language can be changed by right-clicking on the input are and selecting the spellcheck settings, but the change does not take effect before the page is reloaded.

So check out those settings in your browser. Note that there’s a checkbox there that controls whether spellchecking is in use at all.

Tavern answered 22/2, 2012 at 8:23 Comment(2)
I did right clicking, and spell checking had been off. I activated it, and now it works.Wynne
spellcheck seems to break Javascript in iOS simulator, even though it causes no problem in Safari or Safari Mobile.Nettie

© 2022 - 2024 — McMap. All rights reserved.