Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML autocorrect attribute #35692

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hamishwillee
Copy link
Collaborator

The global autocorrect attribute is now part of the standard. This documents it.

Note, in draft because I haven't been able to "see" and autocorrection behaviour in testing. Creating this PR allows me to create something that "may" allow that.

Related docs work in #35593

@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs size/m [PR only] 51-500 LoC changed labels Sep 2, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

@hamishwillee
Copy link
Collaborator Author

A little bit of safari 18 debug:

  • Password, email, url all return true or false for the value of the autocorrect - not match spec on or off.

  • Password does not autocorrect, but email and url do (try autocorrectt )

  • passwordElement.autocorrect=false; works, but "on" and "off" do not.

  • <input id="userPassword" type="text" autocorrect="off" /> - this turns it off - everything else is on. But the API returns true/false values. i.e. on and off are the values to set in the attribute value.

  • Form elements get autocorrect enabled by default - you can read it. Always on unless explicitly set to off in HTML or false via API.

    • nested elements obey this as per spec (modulo using true/false not on/off)
  • Div elements get autocorrect and it is on by default, but it is not inherited.

  • contenteditable is same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants