Modern browsers take huge strides to enable multi-touch browsing. They also include many new HTML5 enabled capabilities that speed up the web and provide a more interactive experience. Internet Explorer has made huge strides in these areas. As web application designers \developers, we need to understand these capabilities and build our applications to take advantage of them. This session will define these new capabilities and provide some tips and tricks on how to use them effectively in your web applications.
Lessons learned:
*The new multi-touch enabled capabilities of modern browsers
*The new HTML5\CSS3 capabilities of modern browsers
*Tips and Tricks for using these capabilities
Genislab builds better products and faster go-to-market with Lean project man...
Tips for building fast multi touch enabled web sites
1. 450 Lincoln Street
Suite 101
Denver, CO 80203
719.359.9692
www.aspenware.com
Building Fast Multi-Touch
Enabled Web Sites
Ben Hoelting
@benhnet
2. Ben
Hoelting
In truth, he’s just a big kid. He loves designing systems
that solve real world problems. There is nothing more
satisfying than seeing something you helped develop
being used by the end users. Ben is also involved in the
technology community and runs the South Colorado .NET
user group. He also enjoys speaking at tech groups and
events around the country. Ben Hoelting
@benhnet
b.hoelting@aspenware.com
3. Agenda:
Browser Support For Touch
Do’s and Don’ts of Touch Websites
Touch Demos
Wrap-up
For sample code please go to
https://github.com/BenHNet/MultiTouchP
ublic
7. Independent Composition &
Manipulation
Process input as fast as
possible
On a separate thread
Using the fastest methods
available on current hardware
Compose Graphics as fast as
possible
On a separate thread
Using the fastest methods
available on current hardware
Thus even with
while (true) {}
Animations execute, videos play, application screens transition, pages pan and
zoom
9. Touch Support
Deliver a fast and fluid touch-first experience along with smooth animations
on a wide range of form factors including those built on ARM and SOC
architectures
– Position and Zoom manipulation
– The “right” positioning of fixed elements
– Soft Keyboard Integration (impact on panning, edit, etc)
– Events (is a click a click?)
– Developer queues for panning and zooming for performance
– Zoom and Pan content in a sub-scroller
– Innovations such as back/forward navigation
12. Quick Steps to a Touch-Friendly
Site
For 2 decades, the Web has
been built with mouse and
keyboard in mind.
Here’s a checklist to ensure your
site is accessible to users of any
input device.
13. With mouse, users can target
links easily because the mouse
cursor changes from an arrow to
a pointer hand while over the
link:
DO: provide CSS :hover styles for
links
With touch, users need feedback
when they touch the screen to
know that they successfully
targeted the link:
Did I hit
the link?
14. DON’T: hide content behind hover
With a mouse, users can point at
something to hover it
independently of clicking it to
activate it.
For most touch devices, hover
and active are the same thing.
Consider tap-based menus, or
scrubbing menus.
15. DO: identify input type using HTML5
Forms
IE10 introduces support for
HTML5 input types including,
but not limited to:
<input type="email">
<input type="tel">
<input type="url">
Specify the format of the input
and IE10 will give your users the
right touch keyboard for the job.
IE10 touch-optimizes all of the
supported HTML5 input
elements.
16. DO: feature detect, DON’T: browser
detect
Detect support for the IE10 touch APIs:
if(navigator.msPointerEnabled)
//Supports pointer input
Detect hardware support for touch:
if(navigator.msMaxTouchPoints>1)
//Supports multi-touch
17. DO: provide ample room for your
finger
Avg. 11mm
7mm
7mm
2mm padding
Ideal Min Target
18. DO: use the Windows 8 “touch
language”
Press & Hold to Learn Tap for Primary ActionPinch to Stretch/Zoom Turn to Rotate
tooltips (@title)
contextmenu event
gesture events
Direct Manipulation
zooming
gesture events
gesture events
click event
gesture events
InteractionTools
20. DO: take advantage of enhanced
pinning and tile notifications
Your site can now define the tile(s) to use when your site is pinned to the start screen.
Use buildmypinnedsite.com to create a tile for all sizes and setup notifications.
21. Good Touch
Sites Demo
http://windows.microsoft.com/en-us/internet-explorer/browser-
ie#touchweb=touchvidtab1
http://www.msn.com
23. Deep Dive into the IE Touch APIs
Pointer,
Gesture
Events
CSS Custom Panning, Zooming,
and Swipes
Direct Manipulation Pan/Zoom, HTML5 Controls,
Touch Targeting
24. By default, pan, zoom, and double-tap “win” over DOM events.
When IE takes over a touch contact for pan/zoom/double-tap, the page is signaled
with an MSPointerCancel event.
So, if you need move events, drag and drop, tapping fast, pinching, etc. then
configure IE for just the touch actions you do want:
-ms-touch-action: none | manipulation | double-tap-zoom
|
auto | inherit;
Configuring Touch Default Actions
(Or, “how to get events to fire when dragging your finger”)
29. Pointer events help make your site have no
compromises because they’re hardware agnostic.
Raw Input MSPointer Events
Pointer
Mouse
Pen
Touch
Events Event Properties
MSPointerDown
MSPointerMove
MSPointerUp
MSPointerOver
MSPointerOut
MSPointerCancel
Everything you have for
mouse, plus:
pointerType
pressure
rotation
tiltX
tiltY
width
height
Capture individual contacts to elements:
elm.msSetPointerCapture(pointerId);
elm.msReleasePointerCapture(pointerId);
38. Wrap Up
Fast Touch Support Touch Ready Sites
Modern browsers
are re-imagined to
support touch. IE is
input device agnostic
and provides APIs for
using touch events.
Well written apps
can make the web
even faster
Touch Standards
For the past two
decades web sites
have been designed
for mouse input.
Touch is a paradigm
shift for web design.
Touch API standards
are not defined.
Requires extra work
to support all
browsers. 3rd party
touch JS libraries
provide some cross-
browser support.
40. 450 Lincoln Street
Suite 101
Denver, CO 80203
719.359.9692
www.aspenware.com
Building Fast Multi-Touch
Enabled Web Sites
Ben Hoelting
@benhnet
Editor's Notes
This is the simplest and real explanation of the modern independent composition that was designed for Windows8. The model is different enough in that the composition engine doesn’t do any rendering whatsoever, and only copies and moves bitmaps around. That means that IE is responsible for handing of opaque or transparent bitmaps of various layers of pages that can be simple (1 layer) or super complex (layers generated by intersecting graphics, sub-scrollers, videos with controls, etc).
It is the 3rd input deviceTalk to functional considerations and decisions, and how they sometimes collide with user expectations as wellas even standards. (e.g. button light up, link navigation, double-tap)Innovations : zoom in subscroller, back/forward gestures
Finger’s contact geometry is used to redirect the coordinate of your touch to the actionable element your finger overlaps.
DEMO: http://www.bing.com/ homepage hot spots
DEMO: http://ie.microsoft.com/testdrive/Browser/TouchFirstControls/Default.htmlTouch First Controls
Discussion: ways to adapt your site for touch usersA hardware agnostic site (e.g., a “no-compromises” UX)Only give the touchified site for users where touch is possible (but please, give us your full featured site b/c we can handle it)Change the site depending on the input being used (e.g. Bing homepage)Don’t use UA string or other browser sniffing.Metro style != touch users, touch hardware detection doesUsers with touch hardware may still use a mouse.
For more info: http://bit.ly/win8touchguidanceTouch targeting goes a long way to help users confidently tap common elements like links, button elements, and input boxes. However, the best thing you can do to accommodate the size of a finger is to provide larger hit targets.
Demo: fixing a site that depends on mouse movement (e.g. Cuttherope.ie, HTML5 Angry Birds)