Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

101
Aaron Gustafson FUNDAMENTAL PROGRESSIVE ENHANCEMENT

description

“Progressive enhancement” involves designing sites in a way that allows everyone to access the basic content of a web page while also providing enhanced versions to visitors with faster bandwidth or more advanced browsers. In this session, Aaron Gustafson covers the current best practice in this critical aspect of web standards development. Staring with an introduction to the topic, Aaron will walk you through the best ways to apply style and behavior to your pages, providing concrete examples and implementations that you can start using right away.

Transcript of Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Page 1: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Aaron Gustafson

FUNDAMENTALPROGRESSIVE

ENHANCEMENT

Page 2: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

WHAT IS PROGRESSIVE

ENHANCEMENT?

Page 3: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Graceful Degradation

3

NEWER OLDER

User

Experi

ence

Browser Age

Page 4: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Progressive Enhancement

4

BASIC ADVANCED

User

Experi

ence

Browser Capabilities

Page 5: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]
Page 6: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

it’s about service

Page 7: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

you wouldn’t do this...

Page 8: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

but sites do...Photo credit: dansays

Page 9: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

but sites do...Photo credit: dansays

Page 10: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

HOW DOESIT WORK?

Page 11: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Photo credit: madam.furie

a little treat for everyone

Page 12: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]
Page 13: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]
Page 14: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]
Page 15: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

(viewed another way)

Page 16: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

CSS

JavaScript

XHTML + HTTP only

13

Page 17: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

CSS

JavaScript

XHTML + HTTP only

13

some JavaScript

some CSS

Page 18: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD 14

BASIC ADVANCED

User

Experi

ence

Browser Capabilities

Page 19: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

LEVELS OFSERVICE

Page 20: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

LEVELS OFSUPPORT

Page 21: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

User

Experi

ence

Rise to meet needs

16

XHTML & HTTP

robust JavaScript

some JavaScript

robust CSS

some CSS

Page 22: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

User

Experi

ence

Rise to meet needs

16

XHTML & HTTP

robust JavaScript

some JavaScript

robust CSS

some CSS

Page 23: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

User

Experi

ence

Rise to meet needs

16

XHTML & HTTP

robust JavaScript

some JavaScript

robust CSS

some CSS

Page 24: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

User

Experi

ence

Rise to meet needs

16

XHTML & HTTP

robust JavaScript

some JavaScript

robust CSS

some CSS

Page 25: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

User

Experi

ence

Rise to meet needs

16

XHTML & HTTP

robust JavaScript

some JavaScript

robust CSS

some CSS

Page 26: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

User

Experi

ence

17

XHTML & HTTP

robust JavaScript

some JavaScript

robust CSS

some CSS

Rely on your baseline

Page 27: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Photo credit: PetitPlat by sk_

you canstill be

creative

Page 28: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

every key we pressa!ects user experience

Photo credit: JasonRogers

Page 29: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

PROGRESSIVE ENHANCEMENT

WITH CSS

Page 30: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD 21

type.csslayout.csscolor.cssmain.css

Page 31: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD 21

type.css

layout.css color.css

Page 32: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<link rel="stylesheet" type="text/css" href="type.css" /><link rel="stylesheet" type="text/css" href="color.css" />

22

<link rel="stylesheet" type="text/css" href="main.css" />

Page 33: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

22

<link rel="stylesheet" type="text/css" href="main.css" /><link rel="stylesheet" type="text/css" href="layout.css" />

Page 34: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="layout.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

23

Page 35: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="layout.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

<link rel="stylesheet" type="text/css" href="print.css" media="print" />

23

Page 36: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="layout.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

<link rel="stylesheet" type="text/css" href="print.css" media="print" />

<link rel="stylesheet" type="text/css" href="layout.css" />

23

Page 37: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="layout.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

<link rel="stylesheet" type="text/css" href="print.css" media="print" /><link rel="stylesheet" type="text/css" href="print.css" media="print" />

23

@import 'screen.css';

Page 38: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="layout.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

<link rel="stylesheet" type="text/css" href="print.css" media="print" /><link rel="stylesheet" type="text/css" href="print.css" media="print" />

23

@import 'screen.css';@import 'screen.css' s; screen;

@import 'print.css' print;

@import 'mobile.css' handheld;

Page 39: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

(the browser that wouldn’t die)Photo credit: oskay

Page 40: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD 25

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="layout.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

Page 41: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD 25

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="layout.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

<!--[if IE lte 7]>

<![endif]-->

<!--[if IE lte 7]>

<![endif]-->

<link rel="stylesheet" type="text/css" href="ie7.css" /><link rel="stylesheet" type="text/css" href="ie7.css" />

Page 42: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD 25

<link rel="stylesheet" type="text/css" href="type.css" />

<link rel="stylesheet" type="text/css" href="layout.css" />

<link rel="stylesheet" type="text/css" href="color.css" />

<!--[if IE lte 7]>

<![endif]-->

<!--[if IE lte 7]>

<![endif]-->

<link rel="stylesheet" type="text/css" href="ie7.css" />

<!--[if IE lte 6]>

<link rel="stylesheet" type="text/css" href="ie6.css" />

<![endif]-->

<link rel="stylesheet" type="text/css" href="ie7.css" />

Page 43: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

*:first-child+html

* html

p\roperty: value;

html>/**/body

-property: value;

_property: value;

voice-family: "\"}\"";voice-family:inherit;

Page 44: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD 27

Make smart decisions

Page 45: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<form id="contact-form" action="#" method="post">

<fieldset>

<legend>Contact Us</legend>

<p>Send us a message. All fields are required.</p>

<ol>

<li>

<label for="contact-name">Name</label>

<input type="text" id="contact-name" name="name" />

</li>

<li>

<label for="contact-email">Email</label>

<input type="text" id="contact-email" name="email" />

</li>

<li>

<label for="contact-message">Message</label>

<textarea id="contact-message" name="message" rows="4"

cols="30"></textarea>

</li>

</ol>

<button type="submit">Send It</button>

</fieldset>

</form>

27

Make smart decisions

Page 46: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<form id="contact-form" action="#" method="post">

<fieldset>

<legend>Contact Us</legend>

<p>Send us a message. All fields are required.</p>

<ol>

<li>

<label for="contact-name">Name</label>

<input type="text" id="contact-name" name="name" />

</li>

<li>

<label for="contact-email">Email</label>

<input type="text" id="contact-email" name="email" />

</li>

<li>

<label for="contact-message">Message</label>

<textarea id="contact-message" name="message" rows="4"

cols="30"></textarea>

</li>

</ol>

<button type="submit">Send It</button>

</fieldset>

</form>

27

Make smart decisions

Page 47: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

<form id="contact-form" action="#" method="post">

<fieldset>

<legend>Contact Us</legend>

<p>Send us a message. All fields are required.</p>

<ol>

<li>

<label for="contact-name">Name</label>

<input type="text" id="contact-name" name="name" />

</li>

<li>

<label for="contact-email">Email</label>

<input type="text" id="contact-email" name="email" />

</li>

<li>

<label for="contact-message">Message</label>

<textarea id="contact-message" name="message" rows="4"

cols="30"></textarea>

</li>

</ol>

<button type="submit">Send It</button>

</fieldset>

</form>

27

Make smart decisions

<label for="contact-name">Name</label>

<label for="contact-email">Email</label>

<label for="contact-message">Message</label>

Page 48: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD 27

Make smart decisionslabel:after {

content: ":";

}

Page 49: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

QUESTIONS?

Page 50: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

inspired?

Page 51: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

PROGRESSIVE ENHANCEMENT

WITH JAVASCRIPT

Page 52: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

proper planning...Photo credit: andyburnfield

Page 53: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

...can keep you from looking

foolish

Page 54: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

User

Experi

ence

34

XHTML & HTTP

robust JavaScript

some JavaScript

robust CSS

some CSS

XHTML & HTTP

Page 55: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Photo credit: ambery

Page 56: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Consider lala.com

36

Page 57: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Without JavaScript

37

Page 58: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

And looking at the markup...

38

Page 59: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Photo credit: spike55151

Page 60: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Photo credit: drp

Page 61: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Photo credit: Giando

listen?

Page 62: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

window.onload = handleExternalLinks;

function handleExternalLinks(){

var server = document.location.hostname; var anchors = document.getElementsByTagName("a"); var i, href; for( i=0; i < anchors.length; i++ ){ href = anchors[i].href;

if( href.indexOf("http://" + server) == -1 && href.indexOf("https://" + server) == -1 ){ // HREF is not a file on my server anchors[i].onclick = function(){ newWin( this.href );

}; } }}

Event Listening

42

Page 63: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

delegate?or

Photo credit: hebedesign

Page 64: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

document.getElementsByTagName( 'body' )[0].onclick = " clickDelegator;

function clickDelegator( e ){ e = ( e ) ? e : event; var el = e.target || e.srcElement;

// external links

if( el.nodeName.toLowerCase() == 'a' && el.getAttribute( 'rel' ) == 'external' ){ newWin( el.href ); }}

Event delegation

44

Page 65: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Photo credit: thus spake drake

can get out of hand

style

Page 66: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Smart styles

46

ul.TabInterface-tab-list { position: absolute; top: 0;

left: 0; width: 100%; border-bottom: 3px solid; margin: 0 0 3px; }

ul.TabInterface- tab-list li { border-left: 1px solid; cursor: pointer; float: left; display: inline;

width: 25%; padding-bottom: 1em; margin-right: -1px;}

Page 67: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

No style before its time

47

<div id="main" class="tabbed">

becomes

<div id="main" class="tabbed-on">

Page 68: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

No style before its time

47

Default Activated

add “-on” to the class .tabbed .tabbed-on

add an activation class .auto-submit .auto-submit.active

change the form of the class .replace-me .replaced

Page 69: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

before you

LEAP

Photo credit: josh-n

Page 70: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Look for methods

49

function someFunction(){ if( !document.getElementsByTagName ) return; // code that uses document.getElementsByTagName()

...}

Page 71: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Look for methods

50

function someFunction(){ if( !document.getElementsByTagName || !document.getElementById ) return;

/* code that uses document.getElementsByTagName() and document.getElementById() */}

Page 72: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Look for elements

51

function someFunction(){ if( !document.getElementsByTagName || !document.getElementsByTagName( 'p' ) ) return;

/* code that uses document.getElementsByTagName() and requires the presence of a P element */ ...}

Page 73: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Look for identified elements

52

function someFunction(){ if( !document.getElementById || !document.getElementById( 'content' ) ) return;

// code that requires the presence of #content ...}

Page 74: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Look for objects

53

function someFunction(){ if( typeof( Prototype ) == 'undefined' ) return; // code that uses Prototype

...}

Page 75: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Look for object versions

54

function someFunction(){ if( typeof( Prototype ) == 'undefined' || parseFloat( Prototype.Version ) < 1.5 ) return;

// code that uses Prototype 1.5 or higher ...}

Page 76: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Look before you leap

55

window.onload = function(){ if( document.getElementsByTagName && document.getElementById ){

someFunction(); }};

Page 77: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

QUESTIONS?

Page 78: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Photo credit: masstistraction

it’s easier than this

Page 79: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Example: Tab Interface

59

Goal: to create a panel-based widget

Page 80: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Traditional approach

60

<h1>Pumpkin Pie</h1>

<div class="container">

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

...

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

Page 81: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Static HTML with no style

61

Page 82: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

A little typography

62

Page 83: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Typography and color

63

Page 84: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Static HTML with no style

64

Page 85: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Static HTML with no style

64

.tabbed

Page 86: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

The actual source

65

<h1>Pumpkin Pie</h1>

<div class="tabbed">

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

<li>1 <abbr title="teaspoon">tsp</abbr> ground cinnamon</li>

...

</ul>

<h2>Directions</h2>

...

</div>

<div class="tabbed">

</div>

Page 87: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Understanding the flow

66

Page 88: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

The full experience

67

Page 89: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

QUESTIONS?

Page 90: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Example: Collapsing Form

69

Goal: to create a search form with optional advanced filters. By default the optional filters should be hidden, but users should be able to show and hide them as they need to.

Page 91: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Collapsing Form as HTML

70

Page 92: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Collapsing Form with CSS

71

Page 93: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Collapsing Form with CSS

72

Page 94: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Collapsing Form with CSS

73

Page 95: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

HTML hooks

74

form.collapsing

Page 96: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

HTML hooks

74

fieldset.optional

Page 97: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Understanding the flow

75

Page 98: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

FUNDAMENTAL PROGRESSIVE ENHANCEMENT

WEB DESIGN WORLD

Collapsing Form with JS

76

Page 99: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

QUESTIONS?

Page 100: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Aaron Gustafson

FUNDAMENTALPROGRESSIVE

ENHANCEMENT

Page 101: Fundamental Progressive Enhancement [Web Design World - Seattle 2009]

Slides available athttp://slideshare.net/AaronGustafson

This presentation is licensed underCreative Commons

Attribution-Noncommercial-Share Alike 3.0

flickr Photo Credits“MacBook Pro” by dansays“M&M” by madame.furie

“Six-layered chocolate cake” by PetitPlat“Day 486 / 365 - Late Night High Level Coding” by JasonRogers

“Leghoul” by oskay“Risk” by andyburnfield

“fr tom” by ambery“CORNERSTONE” by spike55151

“Freedom” by drp“Headphone” by Giando

“Shout, shout” by hebedesign“The writing is on the wall” by thus spake drake

“Tiger Leaping Gorge - Ram” by josh-n“some assembly required” by massdistraction