+ All Categories
Home > Technology > Beyond Responsive [18F 2015]

Beyond Responsive [18F 2015]

Date post: 17-Aug-2015
Category:
Upload: aaron-gustafson
View: 914 times
Download: 0 times
Share this document with a friend
139
BEYOND RESPONSIVE Aaron Gustafson @AaronGustafson slideshare.net/AaronGustafson
Transcript
Page 1: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Aaron Gustafson @AaronGustafson slideshare.net/AaronGustafson

Page 2: Beyond Responsive [18F 2015]

© Brad Frost

Page 3: Beyond Responsive [18F 2015]

[In 2008] 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

Page 4: Beyond Responsive [18F 2015]

Windows users used to comprise 93.5% of our web visits. Now that percentage is 68.2%.“

Page 5: Beyond Responsive [18F 2015]

The percentage visiting from a mobile device or tablet … was just 0.2% in 2008. It has since grown exponentially to 14.4% today.“ 14.4%

Page 6: Beyond Responsive [18F 2015]

[In 2008] 74.9% of our web visitors used Internet Explorer. That number has fallen to 19.7%. Firefox now comprises 20%, Safari 16.7%, and Chrome 37%.“

Page 7: Beyond Responsive [18F 2015]

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

Page 8: Beyond Responsive [18F 2015]

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

1062

Page 9: Beyond Responsive [18F 2015]

In 2008, 27 screen resolutions showed up with more than 10 visits, in 2014 that number was“ 200

Page 10: Beyond Responsive [18F 2015]

© Brad Frost

Page 11: Beyond Responsive [18F 2015]
Page 12: Beyond Responsive [18F 2015]
Page 13: Beyond Responsive [18F 2015]
Page 15: Beyond Responsive [18F 2015]

…but that’s concentrated in 61% of households

Page 16: Beyond Responsive [18F 2015]

U.S. Smartphone penetration #s released in March 2015

Source

< $30k 50%

$30-50k 71%

$50-75k 72%

>$75k 84%

Page 17: Beyond Responsive [18F 2015]

U.S. Smartphone penetration #s released in March 2015

Source

$30k = Average US income 2013

< $30k 50%

$30-50k 71%

$50-75k 72%

>$75k 84%

Page 18: Beyond Responsive [18F 2015]

< $30k 50%

$30-50k 71%

$50-75k 72%

>$75k 84%

Popu

latio

n (in

th

ousa

nds)

0

30000

60000

90000

120000

<30k $30-50k $50-70k >$70k

U.S. Smartphone vs. Income distribution

Opportunity!

Page 19: Beyond Responsive [18F 2015]

Smartphone users making < $30k/yrexperienced app errors52% of the time

Source

Page 20: Beyond Responsive [18F 2015]

Galaxy S5 5.1” (1920 × 1080)

2GB RAM

16GB Storage

16MP Camera

2.5GHz Quad-core

Android 4.4

$799

Page 21: Beyond Responsive [18F 2015]

Galaxy S5 5.1” (1920 × 1080)

2GB RAM

16GB Storage

16MP Camera

2.5GHz Quad-core

Android 4.4

$799

Cloud FX3.5” (480 × 320)

128MB RAM

256MB Storage

2MP Camera

1GHz Single-core

Firefox OS 1.3

$35

Page 22: Beyond Responsive [18F 2015]

Galaxy S5 5.1” (1920 × 1080)

2GB RAM

16GB Storage

16MP Camera

2.5GHz Quad-core

Android 4.4

$799

Dash JR K3.5" (480 × 320)

256 MB RAM

512MB Memory

2MP camera

1.3 GHz Dual-core

Android 4.4

$43

Page 23: Beyond Responsive [18F 2015]

As of Q4 2014, 62% of newnon-phone AT&T subscriptions are

connected carsSource

Page 24: Beyond Responsive [18F 2015]
Page 25: Beyond Responsive [18F 2015]
Page 26: Beyond Responsive [18F 2015]
Page 27: Beyond Responsive [18F 2015]
Page 28: Beyond Responsive [18F 2015]
Page 29: Beyond Responsive [18F 2015]
Page 30: Beyond Responsive [18F 2015]

© Brad Frost

Page 31: Beyond Responsive [18F 2015]

We DON’T know

Page 32: Beyond Responsive [18F 2015]
Page 33: Beyond Responsive [18F 2015]

We DON’T know

Page 34: Beyond Responsive [18F 2015]

Even when we think we know, WE ARE

PROBABLY WRONG

Page 35: Beyond Responsive [18F 2015]

So how do we COPE?

Page 36: Beyond Responsive [18F 2015]

Progressive Enhancement

Page 37: Beyond Responsive [18F 2015]

Technologicalrestrictions

Page 38: Beyond Responsive [18F 2015]

Use

r Exp

erie

nce

Browser CapabilitiesBASIC ADVANCED

Page 39: Beyond Responsive [18F 2015]

Use

r Exp

erie

nce

Browser CapabilitiesBASIC ADVANCED

Content

Page 40: Beyond Responsive [18F 2015]

Use

r Exp

erie

nce

Browser CapabilitiesBASIC ADVANCED

Content

Semantics

Page 41: Beyond Responsive [18F 2015]

Use

r Exp

erie

nce

Browser CapabilitiesBASIC ADVANCED

Content

Semantics

Design

Page 42: Beyond Responsive [18F 2015]

Use

r Exp

erie

nce

Browser CapabilitiesBASIC ADVANCED

Content

Semantics

Design

Interactivity

Page 43: Beyond Responsive [18F 2015]

Use

r Exp

erie

nce

Browser CapabilitiesBASIC ADVANCED

Content

Semantics

Design

Interactivity

Accessibility

Page 44: Beyond Responsive [18F 2015]

Use

r Exp

erie

nce

Browser CapabilitiesBASIC ADVANCED

Text & HTTP

HTML

CSS

JavaScript

<>

{}

ARIA

Page 45: Beyond Responsive [18F 2015]

HTML

Page 46: Beyond Responsive [18F 2015]

HTMLHTML5

Microformats

HTML4

Page 47: Beyond Responsive [18F 2015]

Browsers ignore what they don’t

understand

Page 48: Beyond Responsive [18F 2015]

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

— Mitch Hedberg

Page 49: Beyond Responsive [18F 2015]

Graceful Degradation

Page 50: Beyond Responsive [18F 2015]

Modern Browsers

Older Browsers

Page 51: Beyond Responsive [18F 2015]

Modern Browsers

Older Browsers

Page 52: Beyond Responsive [18F 2015]
Page 53: Beyond Responsive [18F 2015]

a dynamic web page can never break, it can only become a web page.

Page 54: Beyond Responsive [18F 2015]
Page 55: Beyond Responsive [18F 2015]
Page 56: Beyond Responsive [18F 2015]
Page 57: Beyond Responsive [18F 2015]

๏Bugs

๏Browser Add-ons

๏Overzealous Firewalls

๏Underpowered devices

๏Page is still loading

Page 58: Beyond Responsive [18F 2015]
Page 59: Beyond Responsive [18F 2015]
Page 60: Beyond Responsive [18F 2015]
Page 61: Beyond Responsive [18F 2015]

SPoF

Page 62: Beyond Responsive [18F 2015]

Graceful Degradation Progressive Enhancement

Page 63: Beyond Responsive [18F 2015]

Content

Page 64: Beyond Responsive [18F 2015]
Page 65: Beyond Responsive [18F 2015]
Page 66: Beyond Responsive [18F 2015]

Mobile First

Responsive Web Design

:-)

Page 67: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Lightboxes

Page 68: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Lightboxes

Page 69: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No No lightboxLoad

Page 70: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No No lightboxLoad

Page 71: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

Yes

Verify browser width conditionLIVE

JS?No No lightboxLoad

Page 72: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

Yes

Verify browser width conditionLIVE

JS?No No lightboxLoad

Page 73: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

JS?No No lightboxLoad

Yes

Yes

Lightbox

Create link Make image clickable

Verify browser width conditionLIVE

Page 74: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

JS?No No lightboxLoad

Yes

Yes

Lightbox

Create link Make image clickable

Verify browser width conditionLIVE

Page 75: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 76: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 77: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Lightboxes

Page 78: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Thumbnails

Page 79: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Thumbnails

Page 80: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No No imageLoad

Page 81: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No No imageLoad

Page 82: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

JS?No No imageLoad

Yes

Verify browser width condition

Page 83: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

JS?No No imageLoad

Yes

Verify browser width condition

Page 84: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

JS?No No imageLoad

Yes

Yes

Image

Adjust markup Add custom CSS

Verify browser width condition

Page 85: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

JS?No No imageLoad

Yes

Yes

Image

Adjust markup Add custom CSS

Verify browser width condition

Page 86: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

JS?No No imageLoad

Yes

Yes

Image

Adjust markup Add custom CSS

Verify browser width condition

Page 87: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

There is no image…<p class="entry-image" data-image-src="/i/sample.jpg"></p>

Page 88: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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"/> </p>

Page 89: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

CSS at rest[data-image-src] { display: none; }

Page 90: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

CSS at play[data-image-src][data-image-loaded] { display: block; }

Page 91: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

JS Watcherwindow.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(); };

Page 92: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

JS Watchervar browser_width = 0; window.watchResize(function(){ browser_width = window.innerWidth || document.body.offsetWidth; });

Page 93: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

JS Watcherwindow.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; } });

Page 94: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

No

JS?No No imageLoad

Yes

Yes

Image

Adjust markup Add custom CSS

Verify browser width conditionLIVE

Page 95: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Smart CSS[data-image-src][data-image-loaded] { display: block; }

Page 96: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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; } }

Page 97: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Thumbnails

Page 99: Beyond Responsive [18F 2015]

http://is.gd/lazyloading_demo

Page 100: Beyond Responsive [18F 2015]

http://is.gd/lazyloading_demo

Page 101: Beyond Responsive [18F 2015]

http://is.gd/lazyloading_demo

Page 102: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

NO!!!!#reviews { display: none; }

@media only screen and (min-width:50em) { #reviews { display: block; } }

Page 103: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinksLoad

Page 104: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinksLoad

Page 105: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinksLoad

Yes

Verify browser width conditionLIVE

NoHold for user action

Page 106: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinksLoad

Yes

Verify browser width conditionLIVE

NoHold for user action

Page 107: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinksLoad

Yes

Yes

Reviews

Lazy Load the reviews

Verify browser width conditionLIVE

NoHold for user action

Page 108: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinksLoad

Yes

Yes

Reviews

Lazy Load the reviews

Verify browser width conditionLIVE

NoHold for user action

Page 109: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinksLoad

Yes

Yes

Reviews

Lazy Load the reviews

Verify browser width conditionLIVE Click

NoHold for user action

Page 110: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinksLoad

Yes

Yes

Reviews

Lazy Load the reviews

Verify browser width conditionLIVE Click

NoHold for user action

Page 111: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Lazy Loading<section class="aux reviews" id="reviews"> <header id="tab-reviews"> <a href="reviews.html" class="disabled">…</a> </header> </section>

Page 112: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 113: Beyond Responsive [18F 2015]

http://is.gd/lazyloading_demo

Page 114: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Tabbed Interface

Page 115: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 116: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 117: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 118: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

No JS, basic CSS

Page 119: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinearLoad

Page 120: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinearLoad

Page 121: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinearLoad

Yes

Tabs

Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Page 122: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinearLoad

Yes

Tabs

Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Page 123: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 124: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 125: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

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>

Page 126: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinearLoad

Page 127: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinearLoad

Yes

Verify space for tabsLIVE

Page 128: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinearLoad

Yes

Verify space for tabsLIVE

NoAccordion

Build accordion

Page 129: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

IxMap

JS?No LinearLoad

Yes

Tabs

Split content into sections Make tabs Assign event handlers (mouse & keyboard)

Yes

Verify space for tabsLIVE

NoAccordion

Build accordion

Page 130: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

JS?Load

IxMap

Yes

Tabs

Yes

Verify space for tabsLIVE

No Linear

No

Accordion

Build accordion

<?>

Yes

Native

Insert details & summary

Support details & summary?

Page 131: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

role="tablist"

108

Adding ARIA

Page 132: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

role="tab"aria-selected="true"aria-controls="folder-1"

Adding ARIA

Page 133: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

role="tab"aria-selected="false"aria-controls="folder-4"

Adding ARIA

Page 134: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

role="tabpanel"aria-hidden="false"aria-labelledby="folder-1-tab"

Adding ARIA

Page 135: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Result!

Page 136: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Result!

Page 137: Beyond Responsive [18F 2015]

BEYOND RESPONSIVE

Tabbed Interface

Page 138: Beyond Responsive [18F 2015]

Questions?

Tweet me at@AaronGustafson

Page 139: Beyond Responsive [18F 2015]

Thank you!

@AaronGustafson aaron-gustafson.com

slideshare.net/AaronGustafson


Recommended