demo · v152
Cross-Browser Matrix
The autocorrect attribute is finally interoperable. Here's the support matrix across engines plus a live probe that separates IDL reflection from the browser events produced while you edit text.
Interop ship. Safari has had this since iOS 5. Firefox shipped it in 127 (June 2024). Chrome 152 closes the gap. The two-letter difference: Safari uses
autocorrect="on" | "off" exactly; Chrome 152 implements the standardised HTMLElement IDL autocorrect boolean accessor as well.
support matrix
| engine | attribute | idl getter/setter | inherits | since |
|---|---|---|---|---|
| Safari (WebKit) | yes | string | yes | iOS 5 (2011) |
| Firefox (Gecko) | yes | boolean | yes | 127 (Jun 2024) |
| Chrome (Blink) | yes | boolean | yes | 151 (May 2026) |
| Edge (Blink) | yes | boolean | yes | 151 |
live probe in this browser
Type "teh quick brwon fox" into each field, then accept or reject any OS suggestion if one appears. The log records the beforeinput/input events this browser exposes; OS autocorrection itself is still a platform observation, not the same thing as IDL support.
code
// Read the IDL property the spec exposes.
const ok = "autocorrect" in HTMLElement.prototype;
// The attribute reflects as a boolean ("on" → true, "off" → false).
const inputOff = document.querySelector("#pOff");
console.log(inputOff.autocorrect); // false (autocorrect=off)
inputOff.autocorrect = true; // sets attribute back to "on"
// The behaviour probe is separate: real edits surface through beforeinput/input.
inputOff.addEventListener("beforeinput", event => {
console.log(event.inputType, inputOff.value); // value before the edit lands
});
inputOff.addEventListener("input", event => {
console.log(event.inputType, inputOff.value); // value after the edit lands
});
// Inheritance: set on the form, override on a field.
<form autocorrect="off">
<input name="username"> <!-- inherits off -->
<input name="display-name" autocorrect="on"> <!-- explicit on -->
</form>