Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Specify autocapitalize #208

Closed
travisleithead opened this issue Apr 15, 2016 · 24 comments · Fixed by #1072
Closed

Specify autocapitalize #208

travisleithead opened this issue Apr 15, 2016 · 24 comments · Fixed by #1072

Comments

@travisleithead
Copy link
Member

Filing as an issue because this is implemented in WebKit, so has some degree of interop already.

This issue was transferred from the Bugzilla bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=12409 (which has links to other related bugs/conversations about this issue).

See Mounir's proposal here: https://github.com/mounirlamouri/html-autocapitalize/blob/master/proposal.md

We should figure this out for v.5.1.

@chaals
Copy link
Collaborator

chaals commented Apr 25, 2016

This looks like it is still waiting for more implementation, although that seems likely to happen.

So the question is whether it should be HTML 5.1 or later. Leaving it without a milestone for now.

@travisleithead
Copy link
Member Author

See also Issue #269

@chaals chaals added this to the After HTML 5.1 milestone May 10, 2016
@chaals chaals modified the milestones: HTML 5.2 WD 7, For HTML 5.2 Mar 6, 2017
@chaals
Copy link
Collaborator

chaals commented Mar 6, 2017

Where is this up to in implementation?

@cvrebert
Copy link
Member

cvrebert commented Mar 6, 2017

Implemented in Chrome: https://www.chromestatus.com/feature/4529989986811904

@edent
Copy link
Member

edent commented Nov 8, 2017

Tested autocapitalize on Android today. Works in:

  • Opera (Blink)
  • Opera Mini (?)
  • Dolphin browser (Webkit)
  • Samsung Browser (Blink)
  • Microsoft Edge (updated: Blink)
  • WeChat (?)

Doesn't work in Firefox (regular or nightly). Nor in UC Browser.

Is that interoperable enough to add into the spec?

@stevefaulkner
Copy link
Contributor

stevefaulkner commented Nov 8, 2017 via email

@travisleithead
Copy link
Member Author

travisleithead commented Nov 8, 2017 via email

edent added a commit that referenced this issue Nov 8, 2017
Regarding Issue #208
@chaals
Copy link
Collaborator

chaals commented Nov 8, 2017

@edent :

Tested autocapitalize on Android today

Did you test in cyrillic/greek? What other scripts have capitalization?

@LJWatson
Copy link
Collaborator

LJWatson commented Nov 9, 2017

@chaals "Did you test in cyrillic/greek? What other scripts have capitalization?"

Wouldn't that be a platform implementation matter, rather than a spec matter?

@asmusf
Copy link

asmusf commented Nov 9, 2017

Don't really understand the use case. For using virtual keyboards, I can think of more "assistive" autocapitalization behaviors than those given here, but they would then benefit from being language-aware (e.g. "I" in English). Then there are scripts like Georgian and Cherokee where there are parallel forms that are close to, or actual case variants, but with important differences, some of them due to the history of developing / using / encoding the script.

@edent
Copy link
Member

edent commented Nov 9, 2017

@asmusf while I can't speak for the originator of the spec, it's useful in fields like "postcode" to have all the characters capitalised. Same for car registration plate. "Full Name" would also generally use the words style capitalisation.

Three points

  1. This is only a hint. If your name is Vincent van Gogh, you should be able to change the capitalisation.
  2. This doesn't replace server side validation - but in that way it is no different from type="email" or type="tel".
  3. Whether it is useful isn't the question. It is already being used by several browsers.

@chaals
Copy link
Collaborator

chaals commented Nov 9, 2017

Originally noted by @agcolom in #1072, raising here.

I think there should be a "none" value listed, that it should represent the default state if either the attribute is not present, or the value is not recognised by the user agent.

@chaals chaals modified the milestones: HTML5.3 FPWD, HTML5.3 WD1 Nov 24, 2017
@chaals
Copy link
Collaborator

chaals commented Nov 24, 2017

Changing milestone, this seems unlikely to get in on time because it's tricky, and I don't have a good testing setup :(

@chaals
Copy link
Collaborator

chaals commented Nov 25, 2017

See also Apple's documentation - they made up the feature as far as I can see.

@chaals
Copy link
Collaborator

chaals commented Nov 25, 2017

Apple defaults to "sentences" for inputs in the text state. But for better compat, it seems reasonable to default to none.

For passwords it is usually critical to do so. (Not always. I have several real-world passwords where the system forces uppercasing and applies a mechanism equivalent to autocapitalize="characters")

@aphillips
Copy link

@chaals Having a system apply uppercasing is different from having the user-agent do it. Among other things, there are annoying corner cases in case folding.

sentences autocapitalization is pretty common in mobile keyboards. It's usually the default state and is activated by typing period-space.

words could prove troublesome for some users (@edent "this is only a hint" means a lot of backspace-fix for the end user in corner cases. it's not really a "hint" if implementations implement it properly).

none is usually wanted for unformatted text, like passwords. Recall that there is a difference between post-input processing and the end user typing prose.

@chaals
Copy link
Collaborator

chaals commented Nov 26, 2017

@aphillips re sentences as a default in mobile: yep. I assume that is related to the implementations which have it as a default for certain states of input and for textarea. I'm also wary of issues like matching conventions for capitalising words within sentences - language adjectives in English, nouns in German, ...).

As noted already in linked docs, none is important for stuff like passwords and URLs. I'm not sure what the use case is for words. I can see it in some languages/scripts for fields like name, which is how my own phones sometimes behave.

Thanks for the link to charmod, that should go into the text we add, along with pointers to Unicode and a potted but hopefully helpful and not harmful summary of the key points.

One reason for pushing this off the near milestone is that it is complicated. I would be grateful if i18n took this on as a tracking issue, but will wait for you to re-tag it (or tell me to do so). And it seems to behave differently for typed characters and pasted text. And we still need tests and results to understand what really happens (and whether the 'needs implementations' label should go back - I am personally reluctant to put this in except as "at risk" if it doesn't work across scripts and languages.

@chaals
Copy link
Collaborator

chaals commented Nov 26, 2017

I wrote

For passwords it is usually critical to do so. (Not always. I have several real-world passwords where the system forces uppercasing and applies a mechanism equivalent to autocapitalize="characters")

At the moment these seem to be done within the application. One goal is that if passwords require uppercase, a field can reliably use this attribute. But we are not close to that now :(

@chaals
Copy link
Collaborator

chaals commented Nov 26, 2017

Should autocapitalize apply to the date state (and if so does anyone implement it)? I have it (provisionally) not applying in #1072 and wondering if anyone would be upset by that.

@r12a
Copy link

r12a commented Nov 27, 2017

Did you test in cyrillic/greek? What other scripts have capitalization?

See http://rishida.net/blog/201512.html#20161106

Note that Cherokee may require autocapitalize="characters" to be the default for the time being, because of current font support, but that may change over time.

The Georgian default should presumably be autocapitalize="none", but i'm not sure whether Georgian keyboards on mobile devices currently offer case alternatives. It's presumably occasionally useful that they do, though rare.

Btw, i wonder whether anyone reading this knows whether Germans punctiliously apply the normal noun-capitalisation rules when typing on mobile devices?

@asmusf
Copy link

asmusf commented Nov 27, 2017

@r12a To your last question: Some don't and others object to that, forcefully. Many report such texts "hard/impossible to read". You can find that kind of meta-conversation preserved in forum discussions; my conclusion would be that going all lowercase is not seen as generally acceptable, even if it's known that input was done on a mobile device.

@aphillips
Copy link

@r12a @asmusf I'd argue that it's irrelevant. autocapitalize isn't about language specific things such as what the autocorrect in the keyboard does. It's about influencing the input mechanism to provide application specific capitalization. For free text, this is normally sentence support. For a few fields that want to be SHOUTED, it's characters. I suppose occasionally the hint will be none (to disable sentence or whatever the default is). But it really shouldn't be language/input method specific IMO. That's up to the specific keyboard or input method--or to the user.

@r12a
Copy link

r12a commented Nov 28, 2017

@aphillips i'm not so worried about German here, because i'm guessing that a word value for autocapitalize wouldn't be appropriate as the default.

However, i don't want to lose sight of the idea that normal support that is sentence-based may be unhelpful (and this whole thing is about being helpful) for Cherokee and Georgian, for which more helpful default settings appear likely to be character and none, respectively. I guess the question is whether it's down to content authors to set the defaults in those cases, or whether applications should be expected to change the default settings based on the current language.

LJWatson pushed a commit that referenced this issue Nov 29, 2017
* Adding Autocapitalize

Regarding Issue #208

* Autocapitalize updates

Still not quite ready to merge

* ABNF for autocapitalize

* Wrap at 80

* Added "non" option

* start getting speccy

Add (pro-forma) default (may change), describe what User Agents should
do, ...

* Also for textarea

* whitespace, add to input element def'n

* adding to textarea, bookkeeping sections, IDL

Also remove proposed "" value - let the defaults deal with it.

* table of attrs applicable to input types

* Prose for textarea

* remove bogus files

* cleaning

ome editorial tweaks, missing things added.

* update status

match reality...

* attributes added to some elements

don't forget this bit

* Thanks where they are due

(Probably more are due than this, but thanking some of the giants on
whose shoulders we stand is better than thanking none)
@chaals
Copy link
Collaborator

chaals commented Nov 29, 2017

We added this to the spec. Please raise specific issues against the text that is there now... (or will be when we fix the build script that seems to be playing up).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants