SlideShare a Scribd company logo
HTML5 Accessibility
Agenda 
 Status of HTML5 
 Basic HTML Accessibility 
 Improved HTML5 Semantics 
 ARIA Integration 
 New Input Types & Attributes 
 New Figure & Figcaption elements 
 Media elements 
Accessibility Summit 2014 2
HTML5 Status 
 HTML5 is in Candidate Recommendation 
 Expected completion in late 2014 
 Currently focused on responding to comments 
 HTML 5.1 is a public working draft 
 Target Recommendation by end of 2016 
Accessibility Summit 2014 3
HTML5Accessibility.com 
 http://www.html5accessibility.com 
 Under Development by The Paciello Group 
 Provides table showing what HTML5 Accessibility 
features are supported in different browsers 
June 23, 2014 
Accessibility Summit 2014 4
Basic HTML Accessibility 
 Semantic HTML 
 Alt text on images 
 Label form controls 
Accessibility Summit 2014 5
Use Semantic HTML 
 <div class=“myCoolH1”>Topics</div> 
 <div class=”myCoolH1” 
role=”heading”>Topics</div> 
 <h1 class=“myCoolH1”>Topics</div> 
Accessibility Summit 2014 6
Add Alt text on Images 
 Add alt text to meaningful images 
<img src=”youWin.png” alt=”You Win!”> 
 Empty alt text if decorative 
<img src=”shelby.png” alt=””> 
(gratuitous image) 
Accessibility Summit 2014 7
HTML5 Alt Text Vocabulary 
http://www.w3.org/html/wg/drafts/html/CR/embedded-Accessibility Summit 2014 content-0.html 8
Label Form Controls 
 <label> element with for attribute 
<label for=”addr”>Address: </label> 
<input type=”text” id=”addr” name=”addr”> 
 Alternatives if the designer insists on no visible 
text 
<img src=”house.png” alt=””>&nbsp; 
<input type=”text” id=”addr” name=”addr” size=“50” 
aria-label=”enter address”> 
or 
<label for="addr"><img src="home.png” alt="enter address” title=“enter 
address”>&nbsp; </label> 
<input id="addr" name=“addr” type="text" size="50"> 
Accessibility Summit 2014 9
Improved HTML 5 Semantics 
 <nav> 
 <section> 
 <article> 
 <header> 
 <footer> 
 <aside> 
Accessibility Summit 2014 10
Example: Newsletter 
Accessibility Summit 2014 11
Simple Newsletter 
Accessibility Summit 2014 12
Captioned 
Screen Reader Demo 
 Flash Version 
 simpleNewsletter.flv 
 Web Version 
 http://www.weba11y.com/Examples/HTML5A11y/Capti 
onDemo1.html 
simpleNewsletter.html 
Accessibility Summit 2014 13
Simple Newsletter Code 1 
 See SimpleNewsletter.html 
 HTML 4 
 Styled <divs> 
 No semantics 
Accessibility Summit 2014 14
Update to HTML5 
 Change the DOCTYPE 
 Use nav 
 Use footer 
 Use header 
 Use section, article, aside 
Accessibility Summit 2014 15
Change the DOCTYPE 
 Original 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd"> 
 HTML5 
<!DOCTYPE html> 
Accessibility Summit 2014 16
Use nav 
 Original  HTML5 
<div> 
<ul> 
<li><a href="#top">Top Stories</a></li> 
<li><a href="evts.html">Events</a></li> 
<li><a href="phs.html">Photos</a></li> 
<li><a href="arch.html">Archives</a></li> 
<li><a href="#subs">Subscribe</a></li> 
</ul> 
</div> 
<nav> 
<ul> 
<li><a href="#top">Top Stories</a></li> 
<li><a href="evts.html">Events</a></li> 
<li><a href="phs.html">Photos</a></li> 
<li><a href="arch.html">Archives</a></li> 
<li><a href="#subs">Subscribe</a></li> 
</ul> 
</nav> 
Accessibility Summit 2014 17
Use footer 
 Original  HTML5 
<div> 
<p style="margin-right:1em;"> 
Footer 
</p> 
</div> 
<footer> 
<p style="margin-right:1em;"> 
Footer 
</p> 
</footer> 
Accessibility Summit 2014 18
Use header 
 Original  HTML5 
<h1> My Newsletter </h1> 
<div> 
<form> 
<label for="search">Search: 
</label> 
<input type="text" id="search”> 
<input type="submit" value="Go"> 
</form> 
</div> 
<header> 
<h1> My Newsletter </h1> 
<section> 
<form action="#"> 
<label for="search">Search: </label> 
<input type="text" id="search"> 
<input type="submit" value="Go"> 
</form> 
</section> 
</header> 
When <header> is NOT a descendant of an article or section the default role=banner 
See http://www.w3.org/html/wg/drafts/html/CR/dom.html#wai-aria 
Accessibility Summit 2014 19
Use section, article, aside 
 Original  HTML5 
<div> 
<h2> Top Stories</h2> 
<h3> Story 1 </h3> 
<p>Here is the first top story</p> 
<p><a href="moreStory1.html"> 
More info about top story 1</a> 
</p> 
<h3> Story 2 </h3> 
<p>Here is the next top story</p> 
<p><a href="moreStory2.html"> 
More info about top story 2</a> 
</p> 
<h3> Story 3 </h3> 
<p>Here is the next top story</p> 
</div> 
<section> 
<header> <h2> Top Stories</h2></header> 
<article> 
<header> <h3> Story 1 </h3></header> 
<p>Here is the first top story</p> 
<aside> 
<p> 
<a href="moreStory1.html"> 
More info about top story 1</a> 
</p> 
</aside> 
</article> 
…. other articles 
</section> 
Accessibility Summit 2014 20
ARIA Integration 
 Accessible Rich Internet Applications 
 Added semantics to generic HTML elements 
 <div role=“banner”> 
 Now incorporated into HTML5 
 <header> 
 Adds states and properties to elements 
 aria-label=“street address” 
 aria-required=“true”* 
*required attribute now included in many HTML5 elements 
Accessibility Summit 2014 21
Add required Attribute 
<section> 
<header> 
<a name="subscribe"></a><h3>Subscribe!</h3> 
</header> 
<section> 
<form action="mailingList"> 
<label for="email">Email: </label> 
<input type="text" id="email" required>* 
<input type="submit" value="Sign me up!"> 
</form> 
</section> 
</section> 
Accessibility Summit 2014 22
ARIA Landmarks 
 Search 
 Main 
<header role="banner"> 
<h1> My Newsletter </h1> 
<section role="search"> 
<form action="#"> 
<label for="search">Search: </label> 
<input type="text" id="search"> 
<input type="submit" value="Go"> 
</form> 
</section> 
</header> 
<section role="main"> 
<header> 
<a name="top"></a><h2> Top Stories</h2> 
</header> 
Accessibility Summit 2014 23
Use ARIA Wisely 
 Strong Native Semantics 
 Example: header that is not a descendant of section or 
article, default native role is banner 
 <header role=“banner”> - not recommended* 
 May cause screen reader to speak banner twice 
 See WAI-ARIA section of HTML5 
spechttp://www.w3.org/html/wg/drafts/html/CR/dom.html#sec-strong-native-semantics 
*Note: In the majority of cases setting an ARIA role and/or aria-* attribute that 
matches the default implicit ARIA semantics is unnecessary and not recommended 
as these properties are already set by the browser. 
Accessibility Summit 2014 24
Use ARIA Wisely (2) 
 Implicit Native Semantics 
 Example: Section 
 default role=region 
 If specified, role must be one of the following: alert, 
alertdialog, application, contentinfo, dialog, document, log, 
main, marquee, region, search, status or presentation 
 See WAI-ARIA section of HTML5 spec 
http://www.w3.org/html/wg/drafts/html/CR/dom.html#sec-implicit-aria-semantics 
Accessibility Summit 2014 25
Captioned 
Screen Reader Demo 
 Flash Version 
 SimpleNewsletterHTML5.flv 
 Web Version 
 http://www.weba11y.com/Examples/HTML5A11y/Capti 
onDemo2.html 
SimpleNewsletterARIA.html 
Accessibility Summit 2014 26
Figure & Figcaption Elements 
 figure identifies stand-alone content (that may be) 
referenced from the main body of work 
 illustrations 
 diagrams 
 image(s) 
 code listings 
 figcaption provides the description 
Accessibility Summit 2014 27
Figure & Figcaption Example 
figureExample1.html 
Accessibility Summit 2014 28
Figure & Figcaption Code 1 
<p>The Three Stooges were an American vaudeville and comedy act of the 
mid&dash;20th century best known for their numerous short subject films, still 
syndicated to television. Their hallmark was physical farce and slapstick. <a 
href="#fig1">Figure 1 </a>shows the original 3 Stooges. 
</p> 
<figure id="fig1"> 
<img src="../images/Souptonuts.jpg"> 
<figcaption>Figure 1: Shemp Howard, Moe Howard, and Larry Fine 
in &quot;Soup To Nuts&quot; 
</figcaption> 
</figure> 
Accessibility Summit 2014 29
Figure & Figcaption Code 2 
<p>Shemp left the trio and was replaced by Curly Howard, creating the most 
common trio as shown in <a href="#fig2">Figure 2.</a> Source: <a 
href="http://en.wikipedia.org/wiki/The_Three_Stooges"> Wikipedia Three 
Stooges Reference</a> 
</p> 
<figure id="fig2"> 
<img src="../images/moe.jpg?"> 
<img src="../images/curly.jpg"> 
<img src="../images/larry.jpg"> 
<figcaption>Figure 2: Individual photos of Moe Howard, Curly Howard, 
and Larry Fine<figcaption> 
</figure> 
No alt text?? See: http://html5doctor.com/html5-simplequiz-4-figures-captions-and- 
alt-text/ 
Accessibility Summit 2014 30
New input Types 
 Color 
 date 
 Datetime* 
 email 
 Month* 
 number 
 range 
 search 
 tel 
 time 
 url 
 Week* 
*Removed from 5 but remain in 5.1 
Accessibility Summit 2014 31
New input Attributes 
 autocomplete 
 autofocus 
 autosave 
 list 
 max/min/step 
 maxlength 
 pattern 
 required 
 spellcheck 
Accessibility Summit 2014 32
Windows Browser Demo 
Firefox 31 Chrome 37.0.2062.94 
newInputTypes.html 
Both flag errors on form submission 
Accessibility Summit 2014 33
Mobile Support for Input Types 
ASUS TF300T Android 
4.2.1 Chrome 
 Interactive Keyboards 
 email - / _ @ .com 
 url - : _ / .com 
 tel – number pad 
 number (check phone) 
 date, time, month 
 color 
 week 
iPhone 4S iOS 7.1.2, 
iPad 2 iOS7.1.1 
 Interactive keyboards 
 email – _123 @ . _ - 
 url - @123 . / .com : _ - 
 tel – number pad numbers 
 number - symbol keyboard 
 date, time, month 
Accessibility Summit 2014 34
ASUS Color Picker 
Accessibility Summit 2014 35
ASUS Date & Week 
Accessibility Summit 2014 36
iPad Date & Month 
Accessibility Summit 2014 37
iPad Email & URL 
Accessibility Summit 2014 38
iPhone 4S Email & URL 
Accessibility Summit 2014 39
iPhone Date & Number 
Accessibility Summit 2014 40
Audio & Video Elements 
 Natively play audio and video files 
 No plug-ins required 
 Browser provides the (accessible) UI 
 Opportunity for 
 synchronized captions 
 Audio descriptions 
 Sign language 
 JavaScript APIs 
 Format compatibility issues across browsers 
Accessibility Summit 2014 41
Audio Format Support 
 Taken from: 
http://www.w3schools.com/html/html5_audio.asp 
Browser MP3 Wav Ogg 
IE ✔ ✖ ✖ 
Chrome ✔ ✔ ✔ 
Firefox ✔ ✔ ✔ 
Safari ✔ ✔ ✖ 
Opera ✖ ✔ ✔ 
Accessibility Summit 2014 42
Audio Example 
<p>A refreshing sound to many....</p> 
<audio autoplay controls> 
<source src="beer.ogg" type=“audio/ogg” /> 
<source src="beer.mp3” type=“audio/mpeg” /> 
<source src="beer.wav” type=“audio/wav” /> 
</audio> 
<p>a beer being opened!</p> 
Firefox 
Chrome 
audioExample.html IE 11 
Accessibility Summit 2014 43
Video Format Support 
 Subject change 
 Taken from: 
HTML5 Video Guide - All You Need to Know for 2014 
Browser MP4 WEBM Ogv 
IE ✔ ✖ ✖ 
Chrome ✔ ✔ ✔ 
Firefox ✖ ✔ ✔ 
Safari ✔ ✖ ✖ 
Opera ✖ ✔ ✔ 
Accessibility Summit 2014 44
Simple Video Example 
<video controls> 
<source src="small.mp4” type=“video/mp4” /> 
<source src="small.ogv" type=“video/ogg” /> 
</video> 
videoExample.html 
Firefox 
Accessibility Summit 2014 45
Subtitles Example 
 Internet Explorer Dev Center 
 Basic timed text track example 
 Uses webVTT file 
 See HTML5 Doctor - Video Subtitling and WebVTT 
<video controls autoplay loop> 
<source src="video.mp4" type="video/mp4"> 
<track id="enTrack" src="entrack.vtt" label="English" kind="subtitles” 
srclang="en" default> 
<track id="esTrack" src="sptrack.vtt" label="Spanish" kind="subtitles" 
srclang="es”> 
<track id="deTrack" src="detrack.vtt" label="German" kind="subtitles" 
srclang="de”> 
HTML5 video not supported 
</video> 
Accessibility Summit 2014 46
Sample WebVTT File 
WEBVTT 
00:00:00.400 --> 00:00:01.070 
simple new 
00:00:01.940 --> 00:00:03.690 
simple newsletter Mozilla Firefox 
00:00:03.859 --> 00:00:04.770 
simple newsletter 
00:00:04.800 --> 00:00:06.690 
page has 6 headings and 7 links 
00:00:07.144 --> 00:00:09.784 
simple newsletter heading level 1 My Newsletter search 
Accessibility Summit 2014 47
Example of Multiple Tracks (IE) 
Accessibility Summit 2014 48
HTML5 Accessibility Review 
 Improved Semantics 
 ARIA integration 
 figure & figcaption elements 
 New input types & attributes 
 Embedded audio and video 
Make use of them! 
Accessibility Summit 2014 49

More Related Content

PPTX
CSS3 2D/3D transform
PPTX
AEM MSM: Basics & More
PDF
Intro to HTML and CSS basics
KEY
HTML CSS & Javascript
PPT
Introduction to BOOTSTRAP
PDF
Adobe Experience Manager Core Components
PDF
Styled Components & React.js
CSS3 2D/3D transform
AEM MSM: Basics & More
Intro to HTML and CSS basics
HTML CSS & Javascript
Introduction to BOOTSTRAP
Adobe Experience Manager Core Components
Styled Components & React.js

What's hot (20)

PPTX
An introduction to bootstrap
PPTX
PPT
Eye catching HTML BASICS tips: Learn easily
PPTX
Adobe AEM core components
PPTX
ASP.NET MVC Presentation
PPTX
Basic HTML
PDF
CSS Dasar #7 : Selector
PPTX
Presentation of bootstrap
PPTX
PDF
CSS For Backend Developers
PPTX
PPTX
Java script
PPTX
Css Display Property
PPTX
Html training slide
PPTX
jQuery Mobile
PPTX
1 03 - CSS Introduction
PPTX
PDF
HTML Common Tags -1
An introduction to bootstrap
Eye catching HTML BASICS tips: Learn easily
Adobe AEM core components
ASP.NET MVC Presentation
Basic HTML
CSS Dasar #7 : Selector
Presentation of bootstrap
CSS For Backend Developers
Java script
Css Display Property
Html training slide
jQuery Mobile
1 03 - CSS Introduction
HTML Common Tags -1
Ad

Viewers also liked (20)

PPTX
Lesson 2 - More Basic HTML
PPTX
Creating and Modifying Charts
PDF
EPUB Evolutions: Towards HTML5 and CSS3
PDF
Text Formatting+(HTML5)
PDF
HTML5 New and Improved
PDF
طور نفسك
PPTX
HTML5 Tutorial
PPT
HTML5 & WAI-ARIA - Happy Families
PDF
Eduvision - Webinar Big Data in de Zorg
PPTX
Html 5 Features And Benefits
PDF
HTML 5 - CSS 3 Arabic Book
PPT
Eduvision - Webinar html5 css3
PPTX
Html5 tutorial for beginners
PDF
دورة CSS3 باللغة العربية
PDF
1 فون جاب
PDF
باللغة العربية HTML5 دورة
PDF
كتاب تعلم Html5 css3
PDF
أحدث الأدوات والمستجدات في تطوير تطبيقات الأجهزة الذكية
PPTX
Getting Started with HTML5 in Tech Com (STC 2012)
PDF
Up to Speed on HTML 5 and CSS 3
Lesson 2 - More Basic HTML
Creating and Modifying Charts
EPUB Evolutions: Towards HTML5 and CSS3
Text Formatting+(HTML5)
HTML5 New and Improved
طور نفسك
HTML5 Tutorial
HTML5 & WAI-ARIA - Happy Families
Eduvision - Webinar Big Data in de Zorg
Html 5 Features And Benefits
HTML 5 - CSS 3 Arabic Book
Eduvision - Webinar html5 css3
Html5 tutorial for beginners
دورة CSS3 باللغة العربية
1 فون جاب
باللغة العربية HTML5 دورة
كتاب تعلم Html5 css3
أحدث الأدوات والمستجدات في تطوير تطبيقات الأجهزة الذكية
Getting Started with HTML5 in Tech Com (STC 2012)
Up to Speed on HTML 5 and CSS 3
Ad

Similar to HTML5 Accessibility (20)

PDF
What you need to know bout html5
PDF
An Introduction To HTML5
PDF
Html5 intro
KEY
2022 HTML5: The future is now
KEY
An Introduction to HTML5
PPT
HTML5 & Front-end overview
PPSX
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
PPTX
presentation_html_5_ppt_1444491485_163390.pptx
PDF
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
PDF
Intro to html 5
PDF
SW Drupal Summit: HTML5+Drupal
PPTX
Powerpoint
PDF
Html5 101
PDF
Frontend for developers
PDF
TOSSUG HTML5 讀書會 新標籤與表單
PPT
HTML5 tags.ppt
PPTX
Polytechnic speaker deck oluwadamilare
PPTX
Polytechnic speaker deck oluwadamilare
PDF
HTML5, The Open Web, and what it means for you - Altran
PDF
Creating HTML Pages
What you need to know bout html5
An Introduction To HTML5
Html5 intro
2022 HTML5: The future is now
An Introduction to HTML5
HTML5 & Front-end overview
Accessible Design with HTML5 - HTML5DevConf.com May 21st San Francisco, 2012 ...
presentation_html_5_ppt_1444491485_163390.pptx
HTML5: Smart Markup for Smarter Websites [Future of Web Apps, Las Vegas 2011]
Intro to html 5
SW Drupal Summit: HTML5+Drupal
Powerpoint
Html5 101
Frontend for developers
TOSSUG HTML5 讀書會 新標籤與表單
HTML5 tags.ppt
Polytechnic speaker deck oluwadamilare
Polytechnic speaker deck oluwadamilare
HTML5, The Open Web, and what it means for you - Altran
Creating HTML Pages

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Approach and Philosophy of On baking technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Cloud computing and distributed systems.
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Modernizing your data center with Dell and AMD
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
Teaching material agriculture food technology
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Cloud computing and distributed systems.
Spectral efficient network and resource selection model in 5G networks
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Modernizing your data center with Dell and AMD
Unlocking AI with Model Context Protocol (MCP)
Digital-Transformation-Roadmap-for-Companies.pptx
Teaching material agriculture food technology
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Dropbox Q2 2025 Financial Results & Investor Presentation

HTML5 Accessibility

  • 2. Agenda  Status of HTML5  Basic HTML Accessibility  Improved HTML5 Semantics  ARIA Integration  New Input Types & Attributes  New Figure & Figcaption elements  Media elements Accessibility Summit 2014 2
  • 3. HTML5 Status  HTML5 is in Candidate Recommendation  Expected completion in late 2014  Currently focused on responding to comments  HTML 5.1 is a public working draft  Target Recommendation by end of 2016 Accessibility Summit 2014 3
  • 4. HTML5Accessibility.com  http://www.html5accessibility.com  Under Development by The Paciello Group  Provides table showing what HTML5 Accessibility features are supported in different browsers June 23, 2014 Accessibility Summit 2014 4
  • 5. Basic HTML Accessibility  Semantic HTML  Alt text on images  Label form controls Accessibility Summit 2014 5
  • 6. Use Semantic HTML  <div class=“myCoolH1”>Topics</div>  <div class=”myCoolH1” role=”heading”>Topics</div>  <h1 class=“myCoolH1”>Topics</div> Accessibility Summit 2014 6
  • 7. Add Alt text on Images  Add alt text to meaningful images <img src=”youWin.png” alt=”You Win!”>  Empty alt text if decorative <img src=”shelby.png” alt=””> (gratuitous image) Accessibility Summit 2014 7
  • 8. HTML5 Alt Text Vocabulary http://www.w3.org/html/wg/drafts/html/CR/embedded-Accessibility Summit 2014 content-0.html 8
  • 9. Label Form Controls  <label> element with for attribute <label for=”addr”>Address: </label> <input type=”text” id=”addr” name=”addr”>  Alternatives if the designer insists on no visible text <img src=”house.png” alt=””>&nbsp; <input type=”text” id=”addr” name=”addr” size=“50” aria-label=”enter address”> or <label for="addr"><img src="home.png” alt="enter address” title=“enter address”>&nbsp; </label> <input id="addr" name=“addr” type="text" size="50"> Accessibility Summit 2014 9
  • 10. Improved HTML 5 Semantics  <nav>  <section>  <article>  <header>  <footer>  <aside> Accessibility Summit 2014 10
  • 13. Captioned Screen Reader Demo  Flash Version  simpleNewsletter.flv  Web Version  http://www.weba11y.com/Examples/HTML5A11y/Capti onDemo1.html simpleNewsletter.html Accessibility Summit 2014 13
  • 14. Simple Newsletter Code 1  See SimpleNewsletter.html  HTML 4  Styled <divs>  No semantics Accessibility Summit 2014 14
  • 15. Update to HTML5  Change the DOCTYPE  Use nav  Use footer  Use header  Use section, article, aside Accessibility Summit 2014 15
  • 16. Change the DOCTYPE  Original <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  HTML5 <!DOCTYPE html> Accessibility Summit 2014 16
  • 17. Use nav  Original  HTML5 <div> <ul> <li><a href="#top">Top Stories</a></li> <li><a href="evts.html">Events</a></li> <li><a href="phs.html">Photos</a></li> <li><a href="arch.html">Archives</a></li> <li><a href="#subs">Subscribe</a></li> </ul> </div> <nav> <ul> <li><a href="#top">Top Stories</a></li> <li><a href="evts.html">Events</a></li> <li><a href="phs.html">Photos</a></li> <li><a href="arch.html">Archives</a></li> <li><a href="#subs">Subscribe</a></li> </ul> </nav> Accessibility Summit 2014 17
  • 18. Use footer  Original  HTML5 <div> <p style="margin-right:1em;"> Footer </p> </div> <footer> <p style="margin-right:1em;"> Footer </p> </footer> Accessibility Summit 2014 18
  • 19. Use header  Original  HTML5 <h1> My Newsletter </h1> <div> <form> <label for="search">Search: </label> <input type="text" id="search”> <input type="submit" value="Go"> </form> </div> <header> <h1> My Newsletter </h1> <section> <form action="#"> <label for="search">Search: </label> <input type="text" id="search"> <input type="submit" value="Go"> </form> </section> </header> When <header> is NOT a descendant of an article or section the default role=banner See http://www.w3.org/html/wg/drafts/html/CR/dom.html#wai-aria Accessibility Summit 2014 19
  • 20. Use section, article, aside  Original  HTML5 <div> <h2> Top Stories</h2> <h3> Story 1 </h3> <p>Here is the first top story</p> <p><a href="moreStory1.html"> More info about top story 1</a> </p> <h3> Story 2 </h3> <p>Here is the next top story</p> <p><a href="moreStory2.html"> More info about top story 2</a> </p> <h3> Story 3 </h3> <p>Here is the next top story</p> </div> <section> <header> <h2> Top Stories</h2></header> <article> <header> <h3> Story 1 </h3></header> <p>Here is the first top story</p> <aside> <p> <a href="moreStory1.html"> More info about top story 1</a> </p> </aside> </article> …. other articles </section> Accessibility Summit 2014 20
  • 21. ARIA Integration  Accessible Rich Internet Applications  Added semantics to generic HTML elements  <div role=“banner”>  Now incorporated into HTML5  <header>  Adds states and properties to elements  aria-label=“street address”  aria-required=“true”* *required attribute now included in many HTML5 elements Accessibility Summit 2014 21
  • 22. Add required Attribute <section> <header> <a name="subscribe"></a><h3>Subscribe!</h3> </header> <section> <form action="mailingList"> <label for="email">Email: </label> <input type="text" id="email" required>* <input type="submit" value="Sign me up!"> </form> </section> </section> Accessibility Summit 2014 22
  • 23. ARIA Landmarks  Search  Main <header role="banner"> <h1> My Newsletter </h1> <section role="search"> <form action="#"> <label for="search">Search: </label> <input type="text" id="search"> <input type="submit" value="Go"> </form> </section> </header> <section role="main"> <header> <a name="top"></a><h2> Top Stories</h2> </header> Accessibility Summit 2014 23
  • 24. Use ARIA Wisely  Strong Native Semantics  Example: header that is not a descendant of section or article, default native role is banner  <header role=“banner”> - not recommended*  May cause screen reader to speak banner twice  See WAI-ARIA section of HTML5 spechttp://www.w3.org/html/wg/drafts/html/CR/dom.html#sec-strong-native-semantics *Note: In the majority of cases setting an ARIA role and/or aria-* attribute that matches the default implicit ARIA semantics is unnecessary and not recommended as these properties are already set by the browser. Accessibility Summit 2014 24
  • 25. Use ARIA Wisely (2)  Implicit Native Semantics  Example: Section  default role=region  If specified, role must be one of the following: alert, alertdialog, application, contentinfo, dialog, document, log, main, marquee, region, search, status or presentation  See WAI-ARIA section of HTML5 spec http://www.w3.org/html/wg/drafts/html/CR/dom.html#sec-implicit-aria-semantics Accessibility Summit 2014 25
  • 26. Captioned Screen Reader Demo  Flash Version  SimpleNewsletterHTML5.flv  Web Version  http://www.weba11y.com/Examples/HTML5A11y/Capti onDemo2.html SimpleNewsletterARIA.html Accessibility Summit 2014 26
  • 27. Figure & Figcaption Elements  figure identifies stand-alone content (that may be) referenced from the main body of work  illustrations  diagrams  image(s)  code listings  figcaption provides the description Accessibility Summit 2014 27
  • 28. Figure & Figcaption Example figureExample1.html Accessibility Summit 2014 28
  • 29. Figure & Figcaption Code 1 <p>The Three Stooges were an American vaudeville and comedy act of the mid&dash;20th century best known for their numerous short subject films, still syndicated to television. Their hallmark was physical farce and slapstick. <a href="#fig1">Figure 1 </a>shows the original 3 Stooges. </p> <figure id="fig1"> <img src="../images/Souptonuts.jpg"> <figcaption>Figure 1: Shemp Howard, Moe Howard, and Larry Fine in &quot;Soup To Nuts&quot; </figcaption> </figure> Accessibility Summit 2014 29
  • 30. Figure & Figcaption Code 2 <p>Shemp left the trio and was replaced by Curly Howard, creating the most common trio as shown in <a href="#fig2">Figure 2.</a> Source: <a href="http://en.wikipedia.org/wiki/The_Three_Stooges"> Wikipedia Three Stooges Reference</a> </p> <figure id="fig2"> <img src="../images/moe.jpg?"> <img src="../images/curly.jpg"> <img src="../images/larry.jpg"> <figcaption>Figure 2: Individual photos of Moe Howard, Curly Howard, and Larry Fine<figcaption> </figure> No alt text?? See: http://html5doctor.com/html5-simplequiz-4-figures-captions-and- alt-text/ Accessibility Summit 2014 30
  • 31. New input Types  Color  date  Datetime*  email  Month*  number  range  search  tel  time  url  Week* *Removed from 5 but remain in 5.1 Accessibility Summit 2014 31
  • 32. New input Attributes  autocomplete  autofocus  autosave  list  max/min/step  maxlength  pattern  required  spellcheck Accessibility Summit 2014 32
  • 33. Windows Browser Demo Firefox 31 Chrome 37.0.2062.94 newInputTypes.html Both flag errors on form submission Accessibility Summit 2014 33
  • 34. Mobile Support for Input Types ASUS TF300T Android 4.2.1 Chrome  Interactive Keyboards  email - / _ @ .com  url - : _ / .com  tel – number pad  number (check phone)  date, time, month  color  week iPhone 4S iOS 7.1.2, iPad 2 iOS7.1.1  Interactive keyboards  email – _123 @ . _ -  url - @123 . / .com : _ -  tel – number pad numbers  number - symbol keyboard  date, time, month Accessibility Summit 2014 34
  • 35. ASUS Color Picker Accessibility Summit 2014 35
  • 36. ASUS Date & Week Accessibility Summit 2014 36
  • 37. iPad Date & Month Accessibility Summit 2014 37
  • 38. iPad Email & URL Accessibility Summit 2014 38
  • 39. iPhone 4S Email & URL Accessibility Summit 2014 39
  • 40. iPhone Date & Number Accessibility Summit 2014 40
  • 41. Audio & Video Elements  Natively play audio and video files  No plug-ins required  Browser provides the (accessible) UI  Opportunity for  synchronized captions  Audio descriptions  Sign language  JavaScript APIs  Format compatibility issues across browsers Accessibility Summit 2014 41
  • 42. Audio Format Support  Taken from: http://www.w3schools.com/html/html5_audio.asp Browser MP3 Wav Ogg IE ✔ ✖ ✖ Chrome ✔ ✔ ✔ Firefox ✔ ✔ ✔ Safari ✔ ✔ ✖ Opera ✖ ✔ ✔ Accessibility Summit 2014 42
  • 43. Audio Example <p>A refreshing sound to many....</p> <audio autoplay controls> <source src="beer.ogg" type=“audio/ogg” /> <source src="beer.mp3” type=“audio/mpeg” /> <source src="beer.wav” type=“audio/wav” /> </audio> <p>a beer being opened!</p> Firefox Chrome audioExample.html IE 11 Accessibility Summit 2014 43
  • 44. Video Format Support  Subject change  Taken from: HTML5 Video Guide - All You Need to Know for 2014 Browser MP4 WEBM Ogv IE ✔ ✖ ✖ Chrome ✔ ✔ ✔ Firefox ✖ ✔ ✔ Safari ✔ ✖ ✖ Opera ✖ ✔ ✔ Accessibility Summit 2014 44
  • 45. Simple Video Example <video controls> <source src="small.mp4” type=“video/mp4” /> <source src="small.ogv" type=“video/ogg” /> </video> videoExample.html Firefox Accessibility Summit 2014 45
  • 46. Subtitles Example  Internet Explorer Dev Center  Basic timed text track example  Uses webVTT file  See HTML5 Doctor - Video Subtitling and WebVTT <video controls autoplay loop> <source src="video.mp4" type="video/mp4"> <track id="enTrack" src="entrack.vtt" label="English" kind="subtitles” srclang="en" default> <track id="esTrack" src="sptrack.vtt" label="Spanish" kind="subtitles" srclang="es”> <track id="deTrack" src="detrack.vtt" label="German" kind="subtitles" srclang="de”> HTML5 video not supported </video> Accessibility Summit 2014 46
  • 47. Sample WebVTT File WEBVTT 00:00:00.400 --> 00:00:01.070 simple new 00:00:01.940 --> 00:00:03.690 simple newsletter Mozilla Firefox 00:00:03.859 --> 00:00:04.770 simple newsletter 00:00:04.800 --> 00:00:06.690 page has 6 headings and 7 links 00:00:07.144 --> 00:00:09.784 simple newsletter heading level 1 My Newsletter search Accessibility Summit 2014 47
  • 48. Example of Multiple Tracks (IE) Accessibility Summit 2014 48
  • 49. HTML5 Accessibility Review  Improved Semantics  ARIA integration  figure & figcaption elements  New input types & attributes  Embedded audio and video Make use of them! Accessibility Summit 2014 49

Editor's Notes

  • #5: Partial screen shot of the HTML5Accessibility.com page showing the HTML5 Accessibility support score for: Chrome: 67/100 Firefox: 88.5/100 IE: 37/100
  • #43: Table of browser support for different formats repeated here in text format: IE supports MP3; does not support wav and ogg Chrome and Firefox support MP3,Wav, Ogg Safari supports MP3, Wav; does not support ogg Opera supports Wav, Ogg; does not support wav
  • #45: Table of browser support for different formats repeated here in text format. IE and Safari support MP4; do not support webm and ogv Chrome supports MP4,WEBM, Ogv Firefox and Opera support WEBM, Ogv; do not support mp4