responsive web design and touch devices

36
Responsive Web Design and touch devices From / John Tsevdos @tsevdos

Upload: john-tsevdos

Post on 27-Dec-2014

618 views

Category:

Technology


0 download

DESCRIPTION

This presentation was given at JoomlaDay 2013 (http://joomladay.gr/) - 15/6/2013.

TRANSCRIPT

Page 1: Responsive Web Design and touch devices

ResponsiveWeb Design and

touch devices

From / John Tsevdos @tsevdos

Page 2: Responsive Web Design and touch devices

agenda

adapt to touch devicesprovide solutionsjavascript touch frameworkstechniques, tips and tools

Page 3: Responsive Web Design and touch devices

responsive web designprinciples

flexible layout/gridmedia queriesflexible media (images, videos, etc.)

Page 4: Responsive Web Design and touch devices

you can get there fromhere

interactionUX

Page 5: Responsive Web Design and touch devices

this is a "touch" world

fingers !== mouse pointerdifferent mediumsdifferent use

Page 6: Responsive Web Design and touch devices

"traditional" web designmight not work

* at least out of the box

navigationcall to action linkslong forms/tables:hover and mouseover events

UI components

Page 7: Responsive Web Design and touch devices

keep calm and :

simplifyfollow the patterns (and the big players)try to avoid functionality that doesn't really work ontouch devices

Page 8: Responsive Web Design and touch devices

navigation

do nothing approach (CSS)select menu (js)toggle menu (js)left/right nav flyout (js)footer only (css)

adapt to touch :

Page 9: Responsive Web Design and touch devices

navigationadapt to touch :

responsive navigation patterns

Page 10: Responsive Web Design and touch devices

navigationif you are too lazy to build your own custom navigation try

the below links/resources

select menu :

toggle menu :

left/right nav flyout :

adapt to touch :

jQuery Responsive Menu Plugin

TinyNav.js

FLEXNAV

TOP DRAWER

jPanelMenu

Page 11: Responsive Web Design and touch devices

call to action links

make larger click areasadd padding

adapt to touch :

Page 12: Responsive Web Design and touch devices

call to action linksadapt to touch :

<!-- Good --><div> <a href="url/path"> <img src="nice/image.jpg" alt="nice image" /> <p>This is a very nice image.</p> </a></div><!-- Boring --><div> <div class="image"> <a href="url/path"> <img src="nice/image.jpg" alt="nice image" /> </a> </div> <p><a href="url/path">This is a very nice image.</a></p> <p><a href="url/path">read more</a></p></div>

Page 13: Responsive Web Design and touch devices

forms

minimize form inputuse the appropriate virtual keyboard

adapt to touch :

Page 14: Responsive Web Design and touch devices

formsadapt to touch :

<!-- Default Keyboard --><input type="text" /> <!-- Numeric Keyboard --><input type="number" /> <!-- Number Keyboard --><input type="tel" /> <!-- URL Keyboard --><input type="url" /> <!-- e-mail Keyboard --><input type="email" />

<!-- Pattern Keyboard --><input pattern="[0-9]*" type="text" />

Page 15: Responsive Web Design and touch devices

tables

try to avoid themoverflow:scroll

adapt to touch :

Page 16: Responsive Web Design and touch devices

tables

native scroll inside elements ( )

adapt to touch :

source

overflow: scroll;-webkit-overflow-scrolling: touch; /* native like scroll */

Page 17: Responsive Web Design and touch devices

tables

(Zurb.com) (jQuery Mobile)

(bootstrap plugin)

adapt to touch :

responsive tablesreflow table moderesponsive tables

Page 18: Responsive Web Design and touch devices

:hover and mouseoverevents

try to avoid themdon't use them for displaying/perfoming criticalinforation/tasks (for example tooltips and dropdownmenus)provide alternatives

adapt to touch :

Page 19: Responsive Web Design and touch devices

:hover and mouseoverevents

no silver bullet for thesetry to use similar touch events

adapt to touch :

Page 20: Responsive Web Design and touch devices

UI components

(like modals, image sliders, carousels, tabs, accordions etc.)

do they enhance the experience or they just makethings worst?are they really working on touch devices?do they respond to touch events?

adapt to touch :

Page 21: Responsive Web Design and touch devices

use a javascript touchlibrary

lean touch librariesfull touch libraries

Page 22: Responsive Web Design and touch devices

lean touch libraries fetures

small footprinteasier to useno UI components, just the touch eventsexcellent solutions for small/middle projects

Page 23: Responsive Web Design and touch devices

lean libraries

(modular, works like jQuery)

Hammer.jsQUO.js

Page 24: Responsive Web Design and touch devices

full touch libraries fetures

large footprintmore complete solutions (provide UI components andwidgets)excellent solution for biggers projects/apps

Page 26: Responsive Web Design and touch devices

best practice

start small, but if you really need something morecomplete, don't hesitate to use it!always try to load only what you really need/use

Page 27: Responsive Web Design and touch devices

when in doubt, check howthe "big" players do it

BootstrapFoundationPure

Page 29: Responsive Web Design and touch devices

touch devices can do more

call or text

<a href="tel:+306948123456">+306948123456</a><a href="sms:+306948123456">+306948123456</a>

Page 30: Responsive Web Design and touch devices

touch devices can do more

capture images, video or sound using HTML forms

<input type="file" accept="image;capture=camera" /><input type="file" accept="video;capture=camcorder" /><input type="file" accept="audio;capture=microphone" />

Page 31: Responsive Web Design and touch devices

be a pioneer

reward modern browser usersuse HTML5 (elements, attributes etc.)use CSS3 (gradients, shadows/text shadows, rgba,transitions, animations, fonts, etc.)SVG

add a feature detection and adaptation strategy ()modernizr

Page 33: Responsive Web Design and touch devices

congratulations!

make it touch-friendlyenrich the UX on tablets/smartphones

Page 34: Responsive Web Design and touch devices

thank you

Page 35: Responsive Web Design and touch devices

questions ?