Designing Across Devices with Progressive Enhancement

A presentation at UIE Virtual Seminar in November 2013 in by Aaron Gustafson

Slide 1

Slide 1

DESIGNING ACROSS DEVICES with Progressive Enhancement Aaron Gustafson @aarongustafson slideshare.net/AaronGustafson

Slide 2

Slide 2

© Brad Frost

Slide 3

Slide 3

“ Just four years ago the majority of our visitors saw our website in Internet Explorer on a Windows computer on a minimum 1,024 pixel wide screen. Times have really changed. Jason Samuels IT Manager, National Council on Family Relations Source

Slide 4

Slide 4

“ Windows users used to comprise 93.5% of our web visits. Now that percentage is 72.4%. Visitors using a Mac have more than tripled.

Slide 5

Slide 5

“ The percentage visiting from a mobile device or tablet … was just 0.1% in 2008. It has since grown exponentially, 200-400% per year, to 6.2% today.

Slide 6

Slide 6

“ Four years ago 75.5% of our web visitors used Internet Explorer. That number has fallen to 37%. Firefox now comprises 25.5%, Safari 19.5%, and Chrome 15.3%.

Slide 7

Slide 7

“ In the second quarter of 2008 we detected 71 different screen resolutions among our visitors. In the first quarter of 2012 we detected 830

Slide 8

Slide 8

© Brad Frost

Slide 9

Slide 9

6.8 Billion 2011 2012 2010 2011 2010 2009 2009 2012 http://mobithinking.com/mobile-marketing-tools/latest-mobile-stats/a#subscribers

Slide 10

Slide 10

“ Smartphone sales accounted for nearly 85% of all mobile phone sales in the US in Q1 2013. http://www.chetansharma.com/usmarketupdateq12013.htm

Slide 11

Slide 11

“ Smartphones have reached 50% penetration in the US… http://www.chetansharma.com/usmarketupdateq12013.htm

Slide 12

Slide 12

“ …but that’s concentrated in 30% of households http://www.chetansharma.com/usmarketupdateq12013.htm

Slide 13

Slide 13

Slide 14

Slide 14

Slide 15

Slide 15

Slide 16

Slide 16

© Brad Frost

Slide 17

Slide 17

© Brad Frost

Slide 18

Slide 18

RWD To the Rescue!

Slide 19

Slide 19

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT What is RWD? ๏ Fluid grids ๏ Flexible media ๏ Media queries 19

Slide 20

Slide 20

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Fluid Grids 6.5% 6.5% 6.5% 6.5% 32% 6.5% 6.5% 6.5% 6.5% 6.5% 6.5% 32% 32% 32% 66% 48% 48% 100% 6.5% 6.5%

Slide 21

Slide 21

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Flexible Media img { max-width: 100%; height: auto; }

Slide 22

Slide 22

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Media Queries @media screen and (min-width:450px) { /* Styles for screen media when browser is 450px wide or larger */ }

Slide 23

Slide 23

Slide 24

Slide 24

Slide 25

Slide 25

Slide 26

Slide 26

Slide 27

Slide 27

Slide 28

Slide 28

Slide 29

Slide 29

Slide 30

Slide 30

Slide 31

Slide 31

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT But That’s the Easy Stuff ๏ Content strategy ๏ Page weight ๏ JavaScript support ๏ Interaction methods ๏ Network latency & performance ๏ Hardware performance ๏ Screen resolution ๏ Sensor availability ๏ etc. 31

Slide 32

Slide 32

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT What’s in a name? ๏ Responsive Web Design ๏ Adaptive Web Design ๏ Progressive Enhancement ๏ Aggressive Enhancement ๏ Responsible Web Design 33

Slide 33

Slide 33

© Brad Frost

Slide 34

Slide 34

We don’t know

Slide 35

Slide 35

Even when we think we know, we’re probably wrong

Slide 36

Slide 36

So how do we cope?

Slide 37

Slide 37

Content

Slide 38

Slide 38

Slide 39

Slide 39

I like an escalator because an escalator can never break, it can only become stairs. — Mitch Hedberg

Slide 40

Slide 40

Slide 41

Slide 41

Graceful Degradation

Slide 42

Slide 42

Modern Browsers Older Browsers

Slide 43

Slide 43

Modern Browsers Older Browsers

Slide 44

Slide 44

Slide 45

Slide 45

User Experience BASIC ADVANCED Browser Capabilities

Slide 46

Slide 46

User Experience BASIC ADVANCED Browser Capabilities Content

Slide 47

Slide 47

User Experience BASIC Semantics Browser Capabilities Content ADVANCED

Slide 48

Slide 48

User Experience Design BASIC Semantics Browser Capabilities Content ADVANCED

Slide 49

Slide 49

User Experience Interactivity Design BASIC Semantics Browser Capabilities Content ADVANCED

Slide 50

Slide 50

User Experience Accessibility Interactivity Design BASIC Semantics Browser Capabilities Content ADVANCED

Slide 51

Slide 51

User Experience BASIC ARIA ↖ JavaScript {} CSS <> Browser Capabilities HTML ¶ Text & HTTP ADVANCED

Slide 52

Slide 52

HTML

Slide 53

Slide 53

HTML5 HTML Microformats HTML4

Slide 54

Slide 54

MCMLXXVII (that’s 1977)

Slide 55

Slide 55

Slide 56

Slide 56

Slide 57

Slide 57

Slide 58

Slide 58

HTML CSS

Slide 59

Slide 59

fault tolerance n. a system’s ability to continue to operate when it encounters and unexpected error.

Slide 60

Slide 60

Slide 61

Slide 61

Slide 62

Slide 62

Slide 63

Slide 63

Browsers ignore what they don’t understand

Slide 64

Slide 64

User Experience BASIC ADVANCED Browser Capabilities Content

Slide 65

Slide 65

Content is why we build websites

Slide 66

Slide 66

Users must have access to key content tasks &

Slide 67

Slide 67

Make sure markup, styles scripts don’t obscure it. &

Slide 68

Slide 68

User Experience BASIC Semantics Browser Capabilities Content ADVANCED

Slide 69

Slide 69

Slide 70

Slide 70

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Semantics 101 <p>HTML5 introduces several <em>really</em> useful elements and a ton of new APIs.</p> <p>Please fill out the form below. <strong>Note: all fields are required.</strong></p> <p>I like to work with markup languages because <strong>they are simple and easy to read</strong>. They also have that certain <i lang=”fr” title=”I don&#8217;t know what”>je ne sais quoi</i>.</p>

Slide 71

Slide 71

Slide 72

Slide 72

Slide 73

Slide 73

Slide 74

Slide 74

Slide 75

Slide 75

Slide 76

Slide 76

Slide 77

Slide 77

User Experience Design BASIC Semantics Browser Capabilities Content ADVANCED

Slide 78

Slide 78

Slide 79

Slide 79

Slide 80

Slide 80

Slide 81

Slide 81

Slide 82

Slide 82

Slide 83

Slide 83

:-) Responsive Web Design Mobile First

Slide 84

Slide 84

User Experience Interactivity Design BASIC Semantics Browser Capabilities Content ADVANCED

Slide 85

Slide 85

Slide 86

Slide 86

Slide 87

Slide 87

But it’s not only about no JavaScript

Slide 88

Slide 88

๏Bugs ๏Browser Add-ons ๏Overzealous Firewalls ๏Underpowered devices ๏Page is still loading

Slide 89

Slide 89

User Experience Interactivity Design BASIC Semantics Browser Capabilities Content ADVANCED

Slide 90

Slide 90

User Experience Accessibility Interactivity Design BASIC Semantics Browser Capabilities Content ADVANCED

Slide 91

Slide 91

“special needs”

Slide 92

Slide 92

“special needs” can be CONTEXTUAL

Slide 93

Slide 93

Slide 94

Slide 94

Slide 95

Slide 95

User Experience BASIC ARIA ↖ JavaScript {} CSS <> Browser Capabilities HTML ¶ Text & HTTP ADVANCED

Slide 96

Slide 96

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Lightboxes

Slide 97

Slide 97

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 98

Slide 98

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 99

Slide 99

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 100

Slide 100

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 101

Slide 101

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 102

Slide 102

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 103

Slide 103

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 104

Slide 104

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 105

Slide 105

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No lightbox Yes No Verify browser width condition LIVE Yes Lightbox Create link Make image clickable

Slide 106

Slide 106

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT No need to link <figure id=”fig-1”> <img src=”/path/small.png” data-enlarged=”/path/large.png” alt=”“> <figcaption> <h6>Retreats 4 Geeks</h6> <p>We built this site for our intimate retreat series.</p> </figcaption> </figure>

Slide 107

Slide 107

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Make the connection <figure id=”fig-1”> <img src=”/path/small.png” data-enlarged=”/path/large.png” alt=”” class=”enlargable”> <p class=”enlarge”><a href=”#enlarge”>Click to Enlarge</a></p> <figcaption> <h6>Retreats 4 Geeks</h6> <p>We built this site for our intimate retreat series.</p> </figcaption> </figure>

Slide 108

Slide 108

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Lightboxes

Slide 109

Slide 109

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Thumbnails

Slide 110

Slide 110

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Thumbnails

Slide 111

Slide 111

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 112

Slide 112

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 113

Slide 113

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 114

Slide 114

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 115

Slide 115

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 116

Slide 116

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 117

Slide 117

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 118

Slide 118

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 119

Slide 119

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 120

Slide 120

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 121

Slide 121

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition Yes Image Adjust markup Add custom CSS

Slide 122

Slide 122

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT There is no image… <p class=”entry-image” data-image-src=”/i/sample.jpg”></p>

Slide 123

Slide 123

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Until there is <p class=”entry-image” data-image-src=”/i/sample.jpg”></p>

<p class=”entry-image” data-image-src=”/i/sample.jpg” data-has-image=”true”> <img alt=”” src=”/i/sample.jpg” alt=””/> </p>

Slide 124

Slide 124

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT CSS at rest [data-image-src] { display: none; }

Slide 125

Slide 125

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT CSS at play [data-image-src][data-image-loaded] { display: block; }

Slide 126

Slide 126

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT JS Watcher window.watchResize = function(callback) { var resizing; function done() { clearTimeout( resizing ); resizing = null; callback(); } window.onresize = function(){ if ( resizing ) { clearTimeout( resizing ); resizing = null; } resizing = setTimeout( done, 50 ); }; callback(); };

Slide 127

Slide 127

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT JS Watcher var browser_width = 0; window.watchResize(function(){ browser_width = window.innerWidth || document.body.offsetWidth; });

Slide 128

Slide 128

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT JS Watcher window.watchResize(function(){ var threshold = 400, image = document.createElement(‘img’), paragraphs = document.getElementsByTagName(‘p’), i = paragraphs.length, p, loaded, src, img; if ( browser_width >= threshold ) { image.setAttribute(‘alt’,”); while ( i— ) { p = paragraphs[i]; src = p.getAttribute(‘data-image-src’); loaded = p.getAttribute(‘data-image-loaded’); if ( src != null && loaded == null ) { img = image.cloneNode(true); img.setAttribute(‘src’,src); p.appendChild( img ); p.setAttribute(‘data-image-loaded’,”); } } image = paragraphs = p = img = null; } });

Slide 129

Slide 129

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No No image Yes No Verify browser width condition LIVE Yes Image Adjust markup Add custom CSS

Slide 130

Slide 130

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Smart CSS [data-image-src][data-image-loaded] { display: block; }

Slide 131

Slide 131

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Smart CSS [data-image-src][data-image-loaded] { display: block; } @media only screen and (min-width:400px) { [data-img-src][data-image-loaded] { display: block; } }

Slide 132

Slide 132

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Thumbnails

Slide 133

Slide 133

http://is.gd/lazyloading_demo

Slide 134

Slide 134

http://is.gd/lazyloading_demo

Slide 135

Slide 135

http://is.gd/lazyloading_demo

Slide 136

Slide 136

http://is.gd/lazyloading_demo

Slide 137

Slide 137

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT NO!!!! #reviews { display: none; } @media only screen and (min-width:50em) { #reviews { display: block; } }

Slide 138

Slide 138

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 139

Slide 139

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 140

Slide 140

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 141

Slide 141

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 142

Slide 142

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 143

Slide 143

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 144

Slide 144

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 145

Slide 145

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 146

Slide 146

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 147

Slide 147

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 148

Slide 148

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Links Yes No Verify browser width condition LIVE Hold for user action Click Yes Reviews Lazy Load the reviews

Slide 149

Slide 149

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Lazy Loading <section class=”aux reviews” id=”reviews”> <header id=”tab-reviews”> <a href=”reviews.html” class=”disabled”>…</a> </header> </section>

Slide 150

Slide 150

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Lazy Loading <section class=”aux reviews loaded” id=”reviews”> <header id=”tab-reviews”> <a href=”reviews.html” class=”disabled open”>…</a> </header> <div role=”tabpanel”> <div id=”p-reviews” aria-labeledby=”tab-reviews”> <ol class=”reviews-list”> <li> <img src=”images/avatar.png” alt=”Commenter Name”> <div class=”review-meta”> <h3>Awesome shirt!</h3> <a href=”#”><time datetime=”2010-01-20” pubdate=”“>11/12/2011</time></a> By Bruce Bosco </div> <div class=”review-content”> <p>This shirt looks awesome and is really comfortable to wear. It did shrink quite a lot when washed, but that could have just been how I ran it. All in all, it’s my favourite shirt, and I love wearing it.</p> </div> </li> <!— … —> </ol> </div> </div> </section>

Slide 151

Slide 151

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Tabbed Interface

Slide 152

Slide 152

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Traditional approach <h1>Pumpkin Pie</h1> <div class=”container”> <ul class=”tabs”> <li><a href=”#”>Overview</a></li> <li><a href=”#”>Ingredients</a></li> <li><a href=”#”>Directions</a></li> <li><a href=”#”>Nutrition</a></li> </ul> <div class=”section”> <h2>Overview</h2> <img src=”pie.jpg” alt=”“> <p>Whether you’re hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!— … —> </div> <!— … —> </div>

Slide 153

Slide 153

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Cleaner approach <h1>Pumpkin Pie</h1> <div class=”tabbed-interface”> <h2>Overview</h2> <img src=”pie.jpg” alt=”” /> <p>Whether you’re hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!— … —> <h2>Ingredients</h2> <ul> <li>1 (9<abbr title=”inch”>in</abbr>) unbaked deep dish pie crust</li> <li> cup white sugar</li> <!— … —> </ul> <h2>Directions</h2> <!— … —> </div>

Slide 154

Slide 154

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Cleaner approach <h1>Pumpkin Pie</h1> <div class=”tabbed-interface”> <h2>Overview</h2> <img src=”pie.jpg” alt=”” /> <p>Whether you’re hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!— … —> <h2>Ingredients</h2> <ul> <li>1 (9<abbr title=”inch”>in</abbr>) unbaked deep dish pie crust</li> <li> cup white sugar</li> <!— … —> </ul> <h2>Directions</h2> <!— … —> </div>

Slide 155

Slide 155

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT No JS, basic CSS

Slide 156

Slide 156

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Linear Yes Tabs Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Slide 157

Slide 157

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Linear Yes Tabs Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Slide 158

Slide 158

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Linear Yes Tabs Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Slide 159

Slide 159

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Linear Yes Tabs Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Slide 160

Slide 160

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Linear Yes Tabs Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Slide 161

Slide 161

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Linear Yes Tabs Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Slide 162

Slide 162

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Linear Yes Tabs Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Slide 163

Slide 163

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Linear HTML <h1>Pumpkin Pie</h1> <div class=”tabbed-interface”> <h2>Overview</h2> <img src=”pie.jpg” alt=”” /> <p>Whether you’re hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!— … —> <h2>Ingredients</h2> <ul> <li>1 (9<abbr title=”inch”>in</abbr>) unbaked deep dish pie crust</li> <li> cup white sugar</li> <!— … —> </ul> <h2>Directions</h2> <!— … —> </div>

Slide 164

Slide 164

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Tabbed <h1>Pumpkin Pie</h1> <div class=”tabbed-interface TabInterface-enabled”> <ul class=”tabs”> <li><a href=”#folder-1”>Overview</a></li> <li><a href=”#folder-2”>Ingredients</a></li> <li><a href=”#folder-3”>Directions</a></li> <li><a href=”#folder-4”>Nutrition</a></li> </ul> <section id=”folder-1”> <h2>Overview</h2> <img src=”pie.jpg” alt=”“> <p>Whether you’re hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!— … —> </section> <!— … —> </div>

Slide 165

Slide 165

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Tabbed <h1>Pumpkin Pie</h1> <div class=”tabbed-interface TabInterface-enabled”> <ul class=”tabs”> <li><a href=”#folder-1”>Overview</a></li> <li><a href=”#folder-2”>Ingredients</a></li> <li><a href=”#folder-3”>Directions</a></li> <li><a href=”#folder-4”>Nutrition</a></li> </ul> <section id=”folder-1”> <h2>Overview</h2> <img src=”pie.jpg” alt=”“> <p>Whether you’re hosting a festive party or a casual get-together with friends, our Pumpkin Pie will make entertaining easy!</p> <!— … —> </section> <!— … —> </div>

Slide 166

Slide 166

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT UI Construction Flow Load JS? No Linear Yes No Accordion Verify space for tabs LIVE Yes Build accordion Tabs Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Slide 167

Slide 167

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT No UI Construction Flow Load Insert details & summary JS? Yes Native Yes

<?>

Verify space for tabs LIVE Linear Yes Support details & summary? No Accordion Build accordion Tabs

Slide 168

Slide 168

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Adding ARIA role=”tablist” 144

Slide 169

Slide 169

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Adding ARIA role=”tab” aria-selected=”true” aria-controls=”folder-1”

Slide 170

Slide 170

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Adding ARIA role=”tab” aria-selected=”false” aria-controls=”folder-4”

Slide 171

Slide 171

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Adding ARIA role=”tabpanel” aria-hidden=”false” aria-labelledby=”folder-1-tab”

Slide 172

Slide 172

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Adding ARIA role=”application” aria-activedescendant=”folder-1”

Slide 173

Slide 173

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Result!

Slide 174

Slide 174

DESIGNING ACROSS DEVICES WITH PROGRESSIVE ENHANCEMENT Tabbed Interface

Slide 175

Slide 175

Thank you!!! Slides http://is.gd/uie_pe_seminar Password: uie2013 Further Reading http://is.gd/readlist_awd