Implement autocorrect attribute
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox134 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
References
(Blocks 2 open bugs)
Details
(Keywords: dev-doc-complete)
Attachments
(6 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
From https://phabricator.services.mozilla.com/D118945
It would be nice to get that HTML autocorrect PR landed before we ship, but I don't see a problem enabling it on Nightly/early Beta. And we should send an intent to ship. Hope that helps!
WHATWG issue: https://github.com/whatwg/html/issues/3595
WHATWG PR: https://github.com/whatwg/html/pull/5841
Assignee | ||
Comment 3•4 months ago
|
||
Simon, do you know current status of https://github.com/whatwg/html/pull/5841? I would like to support 'autocorrect' attribute for MacOS's "text replacement" feature. I don't know whether I have to wait until its PR is merged.
Comment 4•4 months ago
|
||
It seems to me it's ready to land (checkboxes are checked, spec PR and wpt PR are reviewed), modulo open discussion threads. I've pinged domenic and annevk in https://whatwg.org/chat
Comment 5•4 months ago
|
||
FWIW, the pr is on WHAT WG meeting agenda, so I guess it might get landed quite soon.
Comment 6•4 months ago
|
||
makoto, do you think you could take a look at the pr and see if it looks ok to you, and report any issues in the pr?
Assignee | ||
Comment 7•4 months ago
|
||
I will look it this week.
Comment 8•4 months ago
|
||
Thanks. Looks like the pr was updated
https://github.com/whatwg/html/pull/5841
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Updated•3 months ago
|
Updated•3 months ago
|
Assignee | ||
Comment 10•3 months ago
|
||
Implement https://html.spec.whatwg.org/#autocorrection for HTML parser.
Assignee | ||
Comment 11•3 months ago
|
||
Assignee | ||
Comment 12•3 months ago
|
||
Add autocorrect flag to InputContext
to handle this by widget.
Since autocorrect is on-by-default, mAutocorrect
is true by constructor.
But, I would like off-by-default in Chrome. Since Chrome UI may not want to
enable autocorrect by default such as bug 1881783.
Assignee | ||
Comment 13•3 months ago
|
||
If autocorrect is turned on (this is default), we turn on text replacement.
And, autocorrect attribute is on-by-default, and it is different for
spellcheck, so I would like to remove ui.autocorrectDefault
preference.
Assignee | ||
Comment 14•3 months ago
|
||
Assignee | ||
Comment 15•3 months ago
|
||
Comment 16•1 month ago
|
||
Comment 17•1 month ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/312b21ee0a22
https://hg.mozilla.org/mozilla-central/rev/4eadad314e19
https://hg.mozilla.org/mozilla-central/rev/ddef034c455e
https://hg.mozilla.org/mozilla-central/rev/ab6098fafbbd
https://hg.mozilla.org/mozilla-central/rev/cdf733bf2fb2
https://hg.mozilla.org/mozilla-central/rev/b98daff2809a
Comment 18•1 month ago
|
||
Comment 19•16 days ago
|
||
FF134 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/36919
I just tried this on the FF134 nightly build - checking dom.forms.autocorrect
is indeed enabled. The MDN autocorrect
example code shows when the property is defined but does not appear to autocorrect (i.e. if I enter "carot" in the vegetable box I expect it to correct).
Note that this code does work on Safari, which while not fully compliant with the spec should work in the same way for attribute being set like this.
- Is the implementation complete? If not, what is missing
- Is there anything else special I have to do to get this to work?
Assignee | ||
Comment 20•16 days ago
|
||
(In reply to Hamish Willee from comment #19)
FF134 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/36919
I just tried this on the FF134 nightly build - checking
dom.forms.autocorrect
is indeed enabled. The MDNautocorrect
example code shows when the property is defined but does not appear to autocorrect (i.e. if I enter "carot" in the vegetable box I expect it to correct).
Note that this code does work on Safari, which while not fully compliant with the spec should work in the same way for attribute being set like this.
- Is the implementation complete? If not, what is missing
Although I don't know who write this sample, this autocorrect
doesn't fix a word automatically. If using Firefox/macOS, you have to register the word in text substitution (see https://support.apple.com/en-vn/guide/mac-help/mh35735/mac). If Fenix, it depends on virtual keyboard implementation (Gecko only gives a hint to keyboard.)
Comment 21•16 days ago
|
||
I wrote that sample - it worked on Safari on macOS on browserstack. Thanks for the answer though. It indicates something I may not have captured sufficiently in the docs - that this enables autocorrection using native methods - and those methods may have other requirements.
Comment 22•15 days ago
|
||
Note, though, I'm still a bit unconvinced of this in Windows desktop. If I enable autocorrection and incorrect-text on the device (Settings > Devices> Typing) and try the sample then the word carot
is highlighted as an error - i.e. the system knows this is incorrect. However it is not autocorrected on the input where autocorrection is enabled.
Updated•15 days ago
|
Assignee | ||
Comment 23•15 days ago
•
|
||
(In reply to Hamish Willee from comment #22)
Note, though, I'm still a bit unconvinced of this in Windows desktop. If I enable autocorrection and incorrect-text on the device (Settings > Devices> Typing) and try the sample then the word
carot
is highlighted as an error - i.e. the system knows this is incorrect. However it is not autocorrected on the input where autocorrection is enabled.
There is no API to provide a hint whether autocorrect or not on Windows. Each software keyboard type seems to have the register value whether showing autocorrect widget.
Description
•