HTML isn’t done Nicole Sullivan PM for Google Chrome @stubbornella
Greg Whitworth PM for Microsoft Edge @gregwhitworth
Slide 3
Slide 4
Edge & Chrome form control collaboration 1. Accessibility, Touch, & Visual Refresh 2. Stylability 3. Extending functionality 4. New components!
Buh-bye 1990s gradients!
Slide 5
Visual Refresh & Accessibility upgrade A starting point for deeper changes!
Slide 6
The <progress> element was already fairly modern
Slide 7
The <meter> before & after
Slide 8
You are going to want to check these out. Enable the Web Platform Controls update UI flag. about://flags
Slide 9
The <range> also needed some love.
Slide 10
<checkbox> and <radio> are the workhorses of the web
Slide 11
Date
Slide 12
Time
Slide 13
Using inclusive design from the start
Slide 14
Color picker & keyboard navigation
Slide 15
High contrast mode on Windows
Slide 16
@media (forced-colors: active)
Slide 17
forced-color-adjust: auto | none
Slide 18
36 a11y commits to improve form controls 🎉
Slide 19
Edge & Chrome form control collaboration 1. Accessibility, Touch, & Visual Refresh 2. Stylability 3. Extending functionality 4. New components!
Slide 20
We want to build things web developers will use Currently form elements are not used as much as they could be. We wanted to understand why?
Slide 21
“Right now it is often easier to build form components from scratch…than it is to modify the style of the form controls themselves” – Web Developer
Slide 22
Why not just create form elements from scratch? • Duplication of effort • Effort it takes to build your own • Cross browser compat - even if you make it perfect on one browser, it’ll be weird on another. • Accessibility often suffers
Slide 23
Why not just create form elements from scratch? • Duplication of effort • Effort it takes to build your own • Cross browser compat - even if you make it perfect on one browser, it’ll be weird on another. • Accessibility often suffers
Slide 24
Why not just create form elements from scratch? • Duplication of effort • Effort it takes to build your own • Cross browser compat - even if you make it perfect on one browser, it’ll be weird on another. • Accessibility often suffers
Slide 25
We wanted to understand why form elements are recreated?
Slide 26
Top 10 form controls re-created by web developers
Slide 27
Why do web developers recreate form controls?
Slide 28
We heard you. This is why we’ll focus on stylabilty next select checkbox radio
Slide 29
Edge & Chrome form control collaboration 1. Accessibility, Touch, & Visual Refresh 2. Stylability 3. Extending functionality 4. New components!
Slide 30
Normalized values are painful for frameworks. We got a bunch of codepens from the React DOM team
3. != 3
Slide 31
Which form elements give you the most frustration?
Slide 32
You kinda hate the select element
Slide 33
And the date picker
Slide 34
And file
Slide 35
And the checkbox and radio elements
Slide 36
What really gets your goat about select?
Styling
Behavior & Extensibility
Content Adjustments
Slide 37
Next generation <select>
Slide 38
Edge & Chrome form control collaboration 1. Accessibility, Touch, & Visual Refresh 2. Stylability 3. Extending functionality 4. New components!
Slide 39
Most requested native controls: <virtual-list> & <toggle-switch>
Slide 40
Virtual scrollers The most requested new component
Slide 41
Pete Hunt reminds us to build a virtual list… every year… since 2015
Slide 42
Virtual Scrolling Primitive: Display Locking Available in Origin Trial ● Batched rendering updates ● Find-in-page works ● Better a11y
Slide 43
Virtual Scrolling Primitive: Display Locking Available in Origin Trial • Batched rendering updates • Find-in-page works • Better a11y
Slide 44
Toggle Switch Allows developers to semantically express the off/on state.
Slide 45
Toggle Switch Updating Chromium’s default controls • We started with a ton of research into how other design systems handle toggle behavior. • We coded a prototype. Please try it! • And we used it to drive out new low level APIs and better a11y.
Slide 46
Three low level APIs & improvements • Form-associated custom elements • Custom element a11y • Focusable custom elements
Slide 47
Edge & Chrome form control collaboration 1. Accessibility, Touch, & Visual Refresh 2. Stylability 3. Extending functionality 4. New components!
Is this worth it? Is improving the controls & components story worth the investment?
• • • •
Appearance Frequency of bringing/building your own Effort it takes to build your own Cross browser
Slide 63
New components. Huzzah!
🎁 Proprietary + Confidential
Slide 64
Current
Radio
Checkbox
Meter
Range
Upcoming
Slide 65
TRY OUT display-lock and std-switch CTA
Slide 66
We want your help
Slide 67
Proprietary + Confidential
Fast Slow
Slide 68
While building virtual scrolling we realized we had a missing platform primitive: Display locking Folks couldn’t use find in page with regular virtual scrollers because the content isn’t really in the DOM.
Slide 69
Off-screen content can be locked - Locked DOM can be manipulated by JavaScript and the browser knows it doesn’t have to render it this frame. - More content in the DOM means user agent features like find in page can work.
Slide 70
Off-screen content can be locked • Motivate Locked DOM can be manipulated by JavaScript and the browser knows it doesn’t have to render it this frame. • More content in the DOM means user agent features like find in page can work.
Slide 71
Toggle Switch Updating Chromium’s default controls
• We started with a ton of research into how other design systems handle toggle behavior. • We coded a prototype. Please try it! • And we used it to drive out new low level APIs and better a11y.
Slide 72
Three low level APIs • Form-associated custom elements • Custom element a11y • Focusable custom elements
Slide 73
Custom element a11y • Motivate adding this API
Slide 74
Custom element a11y • Motivate adding this API
Slide 75
Focusable custom elements • Motivate adding this API