Top Banner
Designing the Conversation Aaron Gustafson @AaronGustafson slideshare.net/AaronGustafson
110

Designing the Conversation [Paris Web 2017]

Jan 22, 2018

Download

Technology

Aaron Gustafson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Designing the Conversation [Paris Web 2017]

Designing the Conversation

Aaron Gustafson @AaronGustafson

slideshare.net/AaronGustafson

Page 2: Designing the Conversation [Paris Web 2017]

I’m<em>really</em>happytoseeyou.

Page 3: Designing the Conversation [Paris Web 2017]

IPowerful Phrases

Page 4: Designing the Conversation [Paris Web 2017]

I’m<em>really</em>happytoseeyou.

Emphasis

Page 5: Designing the Conversation [Paris Web 2017]

Pleasefillouttheformbelowtocontactus.

<strong>Allfieldsarerequired.</strong>

Strong Importance

Page 6: Designing the Conversation [Paris Web 2017]

I’m really happy to see you.

Please fill out the form below to contact us. All fields are required.

Page 7: Designing the Conversation [Paris Web 2017]

It'saterriblemovieanditmade$200million.

<i>Gofigure!</i>

Sheisadmiredforherenergyand<ilang="fr">joiede

vivre</i>.

Alternate Voice or Mood

Page 8: Designing the Conversation [Paris Web 2017]

For12yearsandrunning,over100,000companieshaveadopted

the<b>Basecamp</b>wayofworking.Notjusttried,butsigned

up,said“ah-ha!”,andneverlookedback.There’snothingelse

like<b>Basecamp</b>.

Stylistically Offset

Page 9: Designing the Conversation [Paris Web 2017]

Iwrotethebook<cite>AdaptiveWebDesign</cite>.Ifyoulike

thistalk,you’llfindin-depthinformationaboutsemantics(and

awholelotmore)inthere.

Published Works

Page 10: Designing the Conversation [Paris Web 2017]

ArampembeddedinstaircaseofRobsonSquareinVancouver,

<abbraria-label="BritishColumbia">BC</abbr>.

Abbreviations & Acronyms

Page 11: Designing the Conversation [Paris Web 2017]

Press<kbd>Tab</kbd>tomovefromlinktolinkwithina

document.

The<code>kbd</code>elementisusedtoindicatekeyboardkey

names.

Keyboard & Code

Page 12: Designing the Conversation [Paris Web 2017]

Thereis<span>nothingparticularlyinteresting</span>inthis

sentence.

Generic Phrasing

Page 13: Designing the Conversation [Paris Web 2017]

IIMindful Links

Page 14: Designing the Conversation [Paris Web 2017]

Arampembeddedinstaircaseof<ahref="https://

en.wikipedia.org/wiki/Robson_Square">RobsonSquare</a>in

Vancouver,<abbraria-label="BritishColumbia">BC</abbr>.

Connecting Content

Page 15: Designing the Conversation [Paris Web 2017]

<ahref="…"><bclass="hidden">Youcan</b>finishreading<b

class="hidden"><cite>TheWebShouldJustWorkforEveryone</

cite>inlessthan10minutes</b></a>

Connecting Content

Page 16: Designing the Conversation [Paris Web 2017]

Toillustratetheconceptoflayeringstyles,perhapsit’sbest

tostartatthebeginning:withnostyleapplied. <ahref="#figure-3-3">Figure3.3</a>showsthelodgingarticle

inSafariwithonlythedefaultbrowserstylesapplied.

<figureid="figure-3-3">

</figure>

Connecting Content

Page 17: Designing the Conversation [Paris Web 2017]

<arel="bookmark"href="…"><bclass="hidden">Youcan</b>finish

reading<bclass="hidden"><cite>TheWebShouldJustWorkfor

Everyone</cite>inlessthan10minutes</b></a>

Creating Context

Page 18: Designing the Conversation [Paris Web 2017]

<ahref="…"hreflang="es"><bclass="hidden">Leaestapáginaen

</b>Español</a>

Creating Context

Page 19: Designing the Conversation [Paris Web 2017]

<ahref="giant.mp4"type="video/mp4">Downloadthismovie</a>

Creating Context

Page 20: Designing the Conversation [Paris Web 2017]

<ahref="giant.mp4"type="video/mp4"download>Downloadthismovie</a>

Triggering Actions

Page 21: Designing the Conversation [Paris Web 2017]

<ahref="mailto:[email protected]">Sendmeanemail</a>

<ahref="tel:18009346489">CallComcastCustomerService</a>

Connecting Tools

Page 22: Designing the Conversation [Paris Web 2017]

IIIEffective Organization

Page 23: Designing the Conversation [Paris Web 2017]
Page 24: Designing the Conversation [Paris Web 2017]

<h1>Thisisthetitleofthepage</h1>

<h2>Thistitlesasection</h2>

<h3>Thistitlesasubsection</h3>

etc.

Headings

Page 25: Designing the Conversation [Paris Web 2017]

<p>Thistwistiswhat<ahref="https://en.wikipedia.org/wiki/

John_Harsanyi">JohnHarsanyi</a>—anearlygametheorist—refers

toasthe<ahref="https://en.wikipedia.org/wiki/

Veil_of_ignorance">“VeilofIgnorance”</a>andwhatRawlsfound,

timeandtimeagain,wasthatindividualsparticipatinginthe

experimentwouldgravitatetowardcreatingthemostegalitarian

societies.</p>

Moving Focus

Page 26: Designing the Conversation [Paris Web 2017]

<ptabindex="0">Pleasefillouttheformbelowcompletely.

<strong>Allfieldsarerequired.</strong></p>

Moving Focus

Page 27: Designing the Conversation [Paris Web 2017]

AccessibleRich Internet Applications

Page 28: Designing the Conversation [Paris Web 2017]

<divid="nav"role="navigation">

<ul>

<li>

<ahref="/about/"><bclass="hidden">ABit</b>About<b

class="hidden">Me</b></a>

</li>

</ul>

</div>

Navigation Region

Page 29: Designing the Conversation [Paris Web 2017]

๏banner ๏navigation ๏search ๏main ๏complementary ๏contentinfo

ARIA Landmark Roles

Page 30: Designing the Conversation [Paris Web 2017]
Page 31: Designing the Conversation [Paris Web 2017]

<headerclass="banner"role="banner"id="top"><h1class="banner_logo"><ahref="/"rel="home"> 24ways<span>toimpressyourfriends</span></a></h1>

</header>

Page 32: Designing the Conversation [Paris Web 2017]

<mainrole="main">

</main>

Page 33: Designing the Conversation [Paris Web 2017]

<navclass="navigation"role="navigation"id="menu"><h1class="hidden">Browse24ways</h1><ulclass="navnav-topics">

<liclass="nav_item"><ahref="/topics/business/" data-icon="&#x2655;">Business</a></li>

</ul>…

</nav>

Page 34: Designing the Conversation [Paris Web 2017]

<footerclass="contentinfo"role="contentinfo">

<pclass="contentinfo_copyright">

<small>&#169;2005-201624waysandourauthors. <ahref="/about/#colophon">Colophon</a></small>

</p>

<pclass="contentinfo_social">

<ahref="http://feeds.feedburner.com/24ways" rel="alternate">GrabourRSSfeed</a>

<ahref="https://twitter.com/24ways"rel="me">Followus onTwitter</a>

<ahref="/newsletter">Subscribetoournewsletter</a>

</p>

</footer>

Page 35: Designing the Conversation [Paris Web 2017]

๏banner - first header element not inside a sectioning element ๏navigation - nav ๏search ๏main - main ๏complementary - aside ๏contentinfo - first footer element not inside a sectioning element

HTML Landmarks

Page 36: Designing the Conversation [Paris Web 2017]

<div>

Thisissimplyagenericdivisionofcontent.

</div>

Page 37: Designing the Conversation [Paris Web 2017]

๏p - a paragraph ๏ol - a list of items whose order matters ๏ul - an list of items whose order doesn’t matter ๏li - an item in a list ๏dl - a list of terms and their associated definitions ๏dt - terms to be defined within a definition list ๏dd - descriptions of terms in a definition list ๏figure - referenced content (images, tables, etc.) ๏figcaption - caption for a figure

Alterna-divs

Page 38: Designing the Conversation [Paris Web 2017]

๏article - a piece of content that can stand on its own ๏section - a section of a document or article ๏header - preamble content for a document, article, or section ๏footer - supplementary information for a document, article, or section ๏main - the primary content of a document ๏nav - navigational content ๏aside - complementary content

Alterna-divs

Page 39: Designing the Conversation [Paris Web 2017]

IVFriendly Forms

Page 40: Designing the Conversation [Paris Web 2017]
Page 41: Designing the Conversation [Paris Web 2017]

How does this photo make you feel?

Embarrassing Upsetting Saddening Bad Photo Other

Page 42: Designing the Conversation [Paris Web 2017]

How does this photo make you feel?

Embarrassing Upsetting Saddening Bad Photo Other

Page 43: Designing the Conversation [Paris Web 2017]

How does this photo make you feel?

Embarrassing Upsetting Saddening Bad Photo ◉ Other it’s embarrassing

Page 44: Designing the Conversation [Paris Web 2017]

Please describe the photo

It’s embarrassing It’s a bad photo of me It makes me sad

Page 45: Designing the Conversation [Paris Web 2017]

Talk to your users like they talk

to one another

Page 46: Designing the Conversation [Paris Web 2017]

Make it clear users need to respond

Page 47: Designing the Conversation [Paris Web 2017]

“What’s your first name?”

Page 48: Designing the Conversation [Paris Web 2017]

“What’s your first name?”

Page 49: Designing the Conversation [Paris Web 2017]

“Without your first name, I won’t know how to address you.

Could you please provide it?”

Page 50: Designing the Conversation [Paris Web 2017]

“Without your first name, I won’t know how to address you.

Could you please provide it?”

Page 51: Designing the Conversation [Paris Web 2017]

“Reserve your spot”

Page 52: Designing the Conversation [Paris Web 2017]

“Reserve your spot”

Page 53: Designing the Conversation [Paris Web 2017]

What’syourfirstname?

<inputname="first_name">

Page 54: Designing the Conversation [Paris Web 2017]

<label>What’syourfirstname?</label>

<inputname="first_name">

Page 55: Designing the Conversation [Paris Web 2017]

<labelfor="first_name">What’syourfirstname?</label>

<inputid="first_name"name="first_name">

Page 56: Designing the Conversation [Paris Web 2017]

<label>

What’syourfirstname?

<inputname="first_name">

</label>

Page 57: Designing the Conversation [Paris Web 2017]

<labelfor="first_name">

What’syourfirstname?

<inputid="first_name"name="first_name">

</label>

Page 58: Designing the Conversation [Paris Web 2017]

<labelfor="first_name">What’syourfirstname?</label>

<inputid="first_name"name="first_name">

Page 59: Designing the Conversation [Paris Web 2017]

Use the rightfield type

Page 60: Designing the Conversation [Paris Web 2017]

<labelfor="first_name">What’sYourFirstName?</label>

<inputtype="text"id="first_name"name="first_name">

Free Response

Page 61: Designing the Conversation [Paris Web 2017]

<labelfor="email">What’sYourBusinessEmailAddress?</label>

<inputtype="email"id="email"name="email">

Free Response: Email

Appearance Native Validation

Text Field Maybe

Page 62: Designing the Conversation [Paris Web 2017]

Browsers ignore what they don’t

understand

Page 63: Designing the Conversation [Paris Web 2017]

Progressive Enhancement

Page 64: Designing the Conversation [Paris Web 2017]

<labelfor="url">What’sYourWebsite’sURL?</label>

<inputtype="url"id="url"name="url">

Free Response: URL

Appearance Native Validation

Text Field Maybe

Page 65: Designing the Conversation [Paris Web 2017]

Please describe the photo

It’s embarrassing It’s a bad photo of me It makes me sad

Choose One

Page 66: Designing the Conversation [Paris Web 2017]

Pleasedescribethephoto

<label>

<inputtype="radio"name="reason"value="embarrassing">

It’sembarrassing

</label>

<label>

<inputtype="radio"name="reason"value="badphoto">

It’sabadphotoofme

</label>

<label>

<inputtype="radio"name="reason"value="saddening">

Itmakesmesad

</label>

Choose One

Page 67: Designing the Conversation [Paris Web 2017]

<labelfor="reason">Pleasedescribethephoto</label>

<selectid="reason"name="reason">

<optionvalue="embarrassing">It’sembarrassing</option>

<optionvalue="badphoto">It’sabadphotoofme</option>

<optionvalue="saddening">Itmakesmesad</option>

</select>

Choose One

Page 68: Designing the Conversation [Paris Web 2017]

<labelfor="volume">HowLoudisSpinalTap?</label>

<inputtype="range"id="volume"name="volume"

min="0"max="11"step="1"

>

Choose One: Number

Appearance Native Validation

Slider (Maybe) Maybe

Page 69: Designing the Conversation [Paris Web 2017]

Don’t introduce unnecessary complexity

Page 70: Designing the Conversation [Paris Web 2017]

Phone Number:

Page 71: Designing the Conversation [Paris Web 2017]

<labelfor="tel">What’sYourBusinessPhoneNumber?</label>

<inputtype="tel"id="tel"name="business_phone">

Free Response: Telephone

Appearance Native Validation

Text Field No

Page 72: Designing the Conversation [Paris Web 2017]

We should work harderso our users don’t have to

Page 73: Designing the Conversation [Paris Web 2017]

๏input[type=date]

๏input[type=datetime] (global) ๏input[type=datetime-local] (local) ๏input[type=month] (year & month) ๏input[type=week] (year & week) ๏input[type=time] (year & week)

Structured Data: Dates & Times

Page 74: Designing the Conversation [Paris Web 2017]

Help users avoid (and fix)

errors

Page 75: Designing the Conversation [Paris Web 2017]

Enable common information to be

auto-filled

Page 76: Designing the Conversation [Paris Web 2017]

<labelfor="name">What’sYourName?</label>

<inputid="name"name="name"requiredaria-required="true">

Keys for Auto-filling

Page 77: Designing the Conversation [Paris Web 2017]

<labelfor="ssn">What’sYourSocialSecurityNumber?</label>

<inputid="ssn"name="ssn"requiredaria-required="true"

autocomplete="off"

>

Don’t Store All Values

Page 78: Designing the Conversation [Paris Web 2017]

๏ name ๏ honorific-prefix ๏ given-name ๏ additional-name ๏ family-name ๏ honorific-suffix ๏ nickname ๏ username ๏ new-password ๏ current-password ๏ organization-title ๏ organization ๏ street-address ๏ address-line1 ๏ address-line2 ๏ address-line3 ๏ address-level4 ๏ address-level3

๏ address-level2 ๏ address-level1 ๏ country ๏ country-name ๏ postal-code ๏ cc-name ๏ cc-given-name ๏ cc-additional-name ๏ cc-family-name ๏ cc-number ๏ cc-exp ๏ cc-exp-month ๏ cc-exp-year ๏ cc-csc ๏ cc-type ๏ transaction-currency ๏ transaction-amount ๏ language

๏ bday ๏ bday-day ๏ bday-month ๏ bday-year ๏ sex ๏ url ๏ photo ๏ tel ๏ tel-country-code ๏ tel-national ๏ tel-area-code ๏ tel-local ๏ tel-local-prefix ๏ tel-local-suffix ๏ tel-extension ๏ email ๏ impp

Autofill Tokens

Page 79: Designing the Conversation [Paris Web 2017]

๏For Addresses: ‣ shipping ‣ billing

๏For Telephone Numbers: ‣ home ‣ work ‣ mobile ‣ fax ‣ pager

๏Universally: ‣ section-*

Autofill Token Modifiers

Page 80: Designing the Conversation [Paris Web 2017]

<fieldset>

<legendtabindex="0">Shipthebluegiftto…</legend>

<p>

<labelfor="b-street-address">Address</label>

<inputname="ba"id="b-street-address"

autocomplete="section-blueshippingstreet-address"></p>

<p>

<labelfor="b-city">City</label>

<inputname="bc"id="b-city"

autocomplete="section-blueshippingaddress-level2">

</p>

<p>

<labelfor="b-postal-code">PostalCode</label>

<inputname="bp"id="b-postal-code"

autocomplete="section-blueshippingpostal-code">

</p>

</fieldset>

For Example

Page 81: Designing the Conversation [Paris Web 2017]

[section-](optional)

[shipping|billing](optional)

[home|work|mobile|fax|pager](optional)

[autofilltokenname]

Page 82: Designing the Conversation [Paris Web 2017]

<labelfor="shipping-mobile">Isthereamobilenumberwecan

reachyouonregardingdelivery?</label>

<inputtype="tel"id="shipping-mobile"name="shipping-mobile" autocomplete="section-redshippingmobiletel">

Page 83: Designing the Conversation [Paris Web 2017]

Let users know when a field is

required

Page 84: Designing the Conversation [Paris Web 2017]

<p>Fieldsmarkedwitha*are

<strongid="required">required</strong>.</p>

<labelfor="first_name">What’sYourFirstName?

<brole="presentation"class="required">*</b>

</label>

<inputid="first_name"name="first_name"

required

aria-required="true"

>

Required Fields

Page 85: Designing the Conversation [Paris Web 2017]

<p><strong>Allofthefieldsarerequired.</strong></p>

<labelfor="first_name">What’sYourFirstName?</label>

<inputid="first_name"name="first_name"

required

aria-required="true"

>

Required Fields

Page 86: Designing the Conversation [Paris Web 2017]

<p><strong>Allofthefieldsarerequired.</strong></p>

<labelfor="first_name">What’sYourFirstName?</label>

<inputid="first_name"name="first_name"

required

aria-required="true"

>

Required Fields

Page 87: Designing the Conversation [Paris Web 2017]

Provide useful hints as to the

type of response you’re expecting

Page 88: Designing the Conversation [Paris Web 2017]

<labelfor="flight">Whatflightareyoulookingfor?</label>

<inputid="flight"name="flight"

pattern="DL\d{2,}"

placeholder="e.g.DL5407"

>

Suggesting a response

Page 89: Designing the Conversation [Paris Web 2017]

Validatein the browser

Page 90: Designing the Conversation [Paris Web 2017]

<labelfor="first_name">What’sYourFirstName?</label>

<inputid="first_name"name="first_name"

required

aria-required="true"

>

Indicate Required Fields

Page 91: Designing the Conversation [Paris Web 2017]

<labelfor="email">What’sYourBusinessEmailAddress?</label>

<inputtype="email"id="email"name="email">

Use Native Validation

Page 92: Designing the Conversation [Paris Web 2017]

<labelfor="flight">Whatflightareyoulookingfor?</label>

<inputid="flight"name="flight"

pattern="DL\d{2,}"

placeholder="e.g.DL5407"

>

Use Custom Validation Schema

Page 93: Designing the Conversation [Paris Web 2017]
Page 94: Designing the Conversation [Paris Web 2017]

<labelfor="email">YourEmailAddress</label>

<inputid="email"type="email"name="email"

requiredaria-required="true"

aria-invalid="true"

aria-describedby="email-error"

>

<strongid="email-error"class="validation-error-message">

Youremailaddressisrequired</strong>

Provide Inline Error Messages

Page 95: Designing the Conversation [Paris Web 2017]

<labelfor="email">YourEmailAddress</label>

<inputid="email"type="email"name="email"

requiredaria-required="true"

aria-invalid="true"

aria-describedby="email-error"

>

<strongid="email-error"class="validation-error-message">

Youremailaddressisrequired</strong>

Provide Inline Error Messages

Page 96: Designing the Conversation [Paris Web 2017]

Validateon the server

Page 97: Designing the Conversation [Paris Web 2017]
Page 98: Designing the Conversation [Paris Web 2017]

<input type=“hidden” name=“price” value=“399.99”>

Page 99: Designing the Conversation [Paris Web 2017]

<input type=“hidden” name=“price” value=“1”>

Page 100: Designing the Conversation [Paris Web 2017]

Never trustthe client

Page 101: Designing the Conversation [Paris Web 2017]

Never trustthe client

Page 102: Designing the Conversation [Paris Web 2017]

Summarize server-side errors

Page 103: Designing the Conversation [Paris Web 2017]
Page 104: Designing the Conversation [Paris Web 2017]

<divrole="alert">

<p>Therewereerrorswithyourformsubmission:</p>

<ol>

<li><ahref="#message">Message</a>isarequired field</li>

<li><ahref="#name">Name</a>isarequiredfield</li>

<li><ahref="#email">Email</a>isarequiredfield</li>

</ol>

</div>

Page 105: Designing the Conversation [Paris Web 2017]

<divrole="alert">

<p>Therewereerrorswithyourformsubmission:</p>

<ol>

<li><ahref="#message">Message</a>isarequired field</li>

<li><ahref="#name">Name</a>isarequiredfield</li>

<li><ahref="#email">Email</a>isarequiredfield</li>

</ol>

</div>

Page 106: Designing the Conversation [Paris Web 2017]

<divrole="alert">

<p>Therewereerrorswithyourformsubmission:</p>

<ol>

<li><ahref="#message">Message</a>isarequiredfield</li>

<li><ahref="#name">Name</a>isarequiredfield</li>

<li><ahref="#email">Email</a>isarequiredfield</li>

</ol>

</div>

Page 107: Designing the Conversation [Paris Web 2017]

<divrole="alert">

<p>Therewereerrorswithyourformsubmission:</p>

<ol>

<li><ahref="#message">Message</a>isarequired field</li>

<li><ahref="#name">Name</a>isarequiredfield</li>

<li><ahref="#email">Email</a>isarequiredfield</li>

</ol>

</div>

Page 108: Designing the Conversation [Paris Web 2017]

<divrole="alert">

<p>Therewereerrorswithyourformsubmission:</p>

<ol>

<li><ahref="#message">Message</a>isarequired field</li>

<li><ahref="#name">Name</a>isarequiredfield</li>

<li><ahref="#email">Email</a>isarequiredfield</li>

</ol>

</div>

Page 109: Designing the Conversation [Paris Web 2017]

<labelfor="email">YourEmailAddress</label>

<inputid="email"type="email"name="email"

requiredaria-required="true"

aria-invalid="true"

aria-describedby="email-error"

>

<strongid="email-error"class="validation-error-message">

Youremailaddressisrequired</strong>

Provide Inline Error Messages

Page 110: Designing the Conversation [Paris Web 2017]

Thank you! @AaronGustafson

aaron-gustafson.com slideshare.net/AaronGustafson