Intent to implement and ship autocapitalize compatibility improvements on Android

46 views
Skip to first unread message

Ryan Landay

unread,
Nov 10, 2017, 3:03:48 PM11/10/17
to blink-dev

Contact emails

rla...@chromium.org, chan...@chromium.org



Explainer

https://docs.google.com/document/d/1pBwWacGm8GsPHCJDbJ3PZ2l1ywz_dACO3sMh5hUmD7E/edit?usp=sharing


Summary

Improve compatibility with Safari’s implementation of autocapitalize by:

  • Supporting autocapitalize attribute on any contenteditable element

  • Allow specifying the autocapitalize attribute on a <form> element to have it apply to all child form fields

  • Removing support for the autocapitalize attribute on some <input> types where it's not useful to improve compatibility with Safari (and simplify the proposed behavior in the case of <form> inheritance).


Motivation

Safari recently added support for autocapitalize on contenteditable elements and we’re starting to receive feedback from developers that our implementation doesn’t match.


Risks

Interoperability and Compatibility

Low. This change improves Chrome for Android’s compatibility with iOS Safari (as well as iOS Chrome and other WebKit-based browsers).

Edge: No signals

Firefox: No signals

Safari: Shipped

Web developers: No known examples of negative opinion about the autocapitalize attribute in general. The Safari and Chrome teams have both received feedback that not generally supporting it in any editable element seems like a bug.


Ergonomics

> Are there any other platform APIs this feature will frequently be used in tandem with?

There are related attributes for controlling autocomplete and autocorrect.


> Could the default usage of this API make it hard for Chrome to maintain good performance (i.e. synchronous return, must run on a certain thread, guaranteed return timing)?


No.


Activation

> Will it be challenging for developers to take advantage of this feature immediately, as-is?


No.


> Would this feature benefit from having polyfills, significant documentation and outreach, and/or libraries built on top of it to make it easier to use?

The feature may benefit from having an official spec written. Right now it’s a non-standard Apple extension that we also decided to implement, but it’s not officially standardized. Apple has some brief documentation, but it doesn't fully match their implementation (see notes in the linked explainer doc).

Debuggability

I’m not aware of any specific support that needs to be added to better support debuggability.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No. This feature is primarily useful on mobile browsers since they use on-screen keyboards for entering text. As such, it’s only currently implemented in Chrome for Android and Android WebView. It may be a nice future addition to Chrome OS (where touch screen input is also common), and perhaps Windows as well, but that would be tangential to the changes I’m planning to make in the Blink side.


Is this feature fully tested by web-platform-tests?

No. There is currently no official spec for the feature.


Link to entry on the feature dashboard

https://www.chromestatus.com/feature/4974738740871168


Requesting approval to ship?

Yes.


Dave Tapuska

unread,
Nov 10, 2017, 10:42:05 PM11/10/17
to Ryan Landay, blink-dev
I think it is great we are aligning this on contenteditable and with webkits implementation. I do think we need to formalize this in a pull request against the whatwg html spec. 

This shouldn't be a surprise for anyone as we discussed these attributes at the w3c editing meeting this week. 

Ryan are you able to do that?

Dave

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACTDmNEEyf-P8-uf7da%2B4nFyWPb%2BtbiXy_ypL5GiZRZLagyXjQ%40mail.gmail.com.

Yoav Weiss

unread,
Nov 11, 2017, 6:37:53 AM11/11/17
to Dave Tapuska, Ryan Landay, blink-dev
+1 to spec PR. I'd also love to see it accompanied by web-platform-tests.

Could you clarify if the autocapitalize attribute is not supported at all in Firefox and Edge, or it is supported in an incompatible way, and the "no signals" indication refers to making similar compatibility changes?

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHXv1wkxwgM%2B3Q4sWhF3kpEX9hR0hLNQ6gFpsKXnJ0BZjGvv1A%40mail.gmail.com.

Rick Byers

unread,
Nov 11, 2017, 11:36:22 AM11/11/17
to Yoav Weiss, Dave Tapuska, Ryan Landay, blink-dev, Domenic Denicola
Thank you for improving interop with Safari!

I agree with Dave and Yoav that in order to not further increase the platform debt here, we need to get this behavior captured in the spec and (where practical) web-platform-tests before we ship. This shouldn't be contentious. If you don't have experience getting changes into the HTML spec I'm sure Dave and/or Domenic can help (also see go/web-standards for more guidance internally).

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Ryan Landay

unread,
Nov 13, 2017, 2:08:34 PM11/13/17
to Rick Byers, Yoav Weiss, Dave Tapuska, blink-dev, Domenic Denicola
Thank you all for your feedback.

Yoav: to the best of my knowledge, neither Firefox nor Edge supports the autocapitalize attribute at all (at least, using their own rendering engines; Edge doesn't use its own engine on iOS or Android, and Windows Mobile is discontinued, so there's no need for it to implement the feature; Firefox uses its own engine on Android so it would probably make sense for them to implement it there).

Dave, I did not attend the W3C editing meeting so there might be some context I'm lacking, but I will follow up with you on getting this into the HTML spec.

Ryan Landay

unread,
Jan 11, 2018, 2:39:59 AM1/11/18
to Rick Byers, Yoav Weiss, Dave Tapuska, blink-dev, Domenic Denicola
Following up here: Domenic and I got the autocapitalize attribute into the HTML spec:


Any further feedback? Are we ready to move ahead with implementing (https://chromium-review.googlesource.com/c/chromium/src/+/830415) and shipping?

Yoav Weiss

unread,
Jan 11, 2018, 3:33:31 AM1/11/18
to Ryan Landay, Rick Byers, Dave Tapuska, blink-dev, Domenic Denicola
LGTM1

Great to see you added WPT tests in your CL. Have you ran them on iOS to make sure your implementation is compatible with it? If not, can you do that before landing?

Personally, I was a bit surprised by the behavior of the attribute's getter, but if that's what's already shipped in iOS, :shrug:

On Thu, Jan 11, 2018 at 8:39 AM Ryan Landay <rla...@chromium.org> wrote:
Following up here: Domenic and I got the autocapitalize attribute into the HTML spec:


Any further feedback? Are we ready to move ahead with implementing (https://chromium-review.googlesource.com/c/chromium/src/+/830415) and shipping?

On Mon, Nov 13, 2017 at 11:08 AM, Ryan Landay <rla...@chromium.org> wrote:
Thank you all for your feedback.

Yoav: to the best of my knowledge, neither Firefox nor Edge supports the autocapitalize attribute at all (at least, using their own rendering engines; Edge doesn't use its own engine on iOS or Android, and Windows Mobile is discontinued, so there's no need for it to implement the feature;

 
 
; Firefox uses its own engine on Android so it would probably make sense for them to implement it there).

Would be great to reach out to both Edge and Firefox teams to try and get their opinions on this. Reading further down I saw you opened issues on them, which is a good first step.
  
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Ryan Landay

unread,
Jan 11, 2018, 4:38:18 AM1/11/18
to Yoav Weiss, Rick Byers, Dave Tapuska, blink-dev, Domenic Denicola
I have not been able to find instructions for running WPT tests on iOS (at least, not from my local repo with the new test added; I’m aware of http://w3c-test.org/tools/runner/index.html).  Do you or anyone else know how I can do this?

Yoav Weiss

unread,
Jan 11, 2018, 4:46:03 AM1/11/18
to Ryan Landay, Rick Byers, Dave Tapuska, blink-dev, Domenic Denicola
What you want to do is most probably:
* Follow the instructions on its README, and run a local WPT server by running `./wpt serve`
* Copy your tests over to that directory
* Point an iOS device at that testing server to run your tests

If you have any further questions, feel free to ping me (potentially off-list) and I'm happy to help if I can. Alternatively, #testing on the W3C IRC (irc.w3.org:6665) is a good place to ask WPT related questions.

Ryan Landay

unread,
Jan 11, 2018, 9:48:47 PM1/11/18
to Yoav Weiss, Rick Byers, Dave Tapuska, blink-dev, Domenic Denicola
I’m happy to report that the test does indeed pass on iOS 11.2.2 Safari. The trick I needed to run it was to set bind_hostname to false in the config.json file so I could access the test server over the network.

Yoav Weiss

unread,
Jan 12, 2018, 4:41:40 PM1/12/18
to Ryan Landay, Rick Byers, Dave Tapuska, blink-dev, Domenic Denicola
Thanks for running those tests, and great to hear they pass! :)

Rick Byers

unread,
Jan 12, 2018, 4:53:06 PM1/12/18
to Yoav Weiss, Ryan Landay, Dave Tapuska, blink-dev, Domenic Denicola, Ali Juma
[cc ajuma who is very interested in the state of WPT on iOS - hopefully we'll get iOS into the WPT dashboard eventually]

I always love to see more tests passing in common between Safari iOS and Chrome android.  Thanks again!

LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Philip Jägenstedt

unread,
Jan 16, 2018, 8:43:08 AM1/16/18
to Rick Byers, Yoav Weiss, Ryan Landay, Dave Tapuska, blink-dev, Domenic Denicola, Ali Juma
More interop, yay! More shared tests, yay! LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
Reply all
Reply to author
Forward
0 new messages