SlideShare a Scribd company logo
Mind Your lang
Presented by Adrian Roselli for
Accessibility Camp Toronto 2016
Slides from this talk will be available at
rosel.li/a11yTO
“Toronto Skyline” by Ronan Jouve, CC BY-NC 2.0
About Adrian Roselli
About Adrian Roselli
• I’ve written some stuff,
• Member of W3C,
• Building for the web
since 1993,
• Learn more at
AdrianRoselli.com,
• Avoid on Twitter
@aardrian.
Great bedtime reading!
About Adrian Roselli
What Is lang?
What Is lang?
• Examples:
<html lang="en">
<html lang="en-ca">
<html lang="en-us">
<html lang="en-GB-x-hixie">
• Source:
BCP47: Tags for Identifying Languages,
https://tools.ietf.org/html/bcp47
We’ll come back to that last one.
Who Uses lang?
Who Uses lang?
• WHATWG Bug: “why do these examples of <html>
lack the lang attribute?”
This is where my research started.
“Why not? Realistically,
few people include it. It
just means the language
is unknown.”
Who Uses lang?
• “why do these examples of <html> lack the
lang attribute?”
• WHATWG HTML bug (26942)
• Reported: 2014-09-30
• Resolved: 2016-04-18
• Git merge:
• Editorial: Add lang to most examples #1061
Spoiled the surprise, I know, but we aren’t here for a bug.
Who Uses lang?
• Pulled January 2015 archive from
WebDevData.org (a W3C Community Group),
• Parsed 84,054 pages,
• Found that 39,433 pages use the lang
attribute on the <html> element,
• 47% use <html lang="…">.
12,762 use xml:lang, which is wrong.
Why Would You Use lang?
Why Would You Use lang?
• HTML 5 Specification
• HTML Validation
• Internationalization (i18)
• WCAG 2.0 A, AA
• Numbers
• Dates
• Hyphens
• Quotes
• Screen Readers
https://github.com/w3c/html/issues/218
HTML 5 Specification
HTML 5 Specification
• The spec now provides a warning,
• Notes that must match detected language of
page,
• Identified ways which it is used,
• Added in April 2016
• add warning/advice about lang attribute use #218
https://github.com/w3c/html/issues/218
HTML 5 Specification
http://w3c.github.io/html/dom.html#lang-warning
HTML Validation
HTML Validation
• The W3C HTML validator compares the
following attributes on the page with the
detected page language:
• dir
• lang
• If there is a mismatch, the validator will
provide a warning,
• If there is no dir or lang, the validator will
provide a warning.
It will know if you lie.
HTML Validation
https://www.w3.org/blog/International/2016/07/13/w3c-html5-validator-enhanced-with-language-detection-functionality/
Internationalization (i18n)
Internationalization (i18n)
• Spelling and grammar checkers:
• spellcheck attribute (at caniuse.com)
• CSS:
• ::first-letter (at caniuse.com)
• Hanging punctuation
• Translation tools (particularly when looking at
parts of a page).
https://www.w3.org/International/questions/qa-lang-why
Internationalization (i18n)
• Font selection for CJK (for political reasons).
https://medium.com/behancetech/localization-gotchas-for-asian-languages-cjk-e52a57c0fde1#.vkrhr614s
WCAG 2.0 A, AA
WCAG 2.0 A, AA
• Guideline 3.1 Readable: Make text content
readable and understandable.
• 3.1.1 Language of Page (Level A)
• H57: Using language attributes on the html
element
• 3.1.2 Language of Parts (Level AA)
• H58: Using language attributes to identify changes
in the human language
https://www.w3.org/TR/2008/REC-WCAG20-20081211/#meaning-doc-lang-id
Numbers
Numbers
• A browser can adjust decimal characters in
number fields,
• Some use comma, some use period,
• Yes, this is for Latin scripts.
• Do not worry about browser support unless
you are mixing within a page.
• In that case, Firefox is the way to go.
If left blank, the browser may go with local settings.
Numbers
http://codepen.io/aardrian/pen/rOGYNL
Numbers
http://codepen.io/aardrian/pen/rOGYNL
Dates
Dates
• Not so much.
http://s.codepen.io/aardrian/debug/ZpgNWJ
Hyphens
Hyphens
• For browsers that support hyphens, you will
enjoy the benefit just by using the attribute.
• This assumes you use the following CSS:
• hyphens: auto;
• -ms-hyphens: auto; (ugh)
• -webkit-hyphens: auto; (also ugh)
• Browser support:
• http://caniuse.com/#search=hyphens
If left blank, the browser may go with local settings.
Hyphens
http://codepen.io/aardrian/pen/zKVLvO
Hyphens
http://codepen.io/aardrian/pen/zKVLvO
Quotes
Quotes
• Let the browser choose the quote marks
based on the language.
• This assumes you use the following HTML:
• <q>…</q>
Obviously you can override this with CSS, but that would be silly.
Quotes
http://s.codepen.io/aardrian/debug/zKgbVv
Quotes
http://s.codepen.io/aardrian/debug/zKgbVv
Screen Readers
Screen Readers
• VoiceOver uses it to auto-switch voices.
• VoiceOver can speak using a different accent.
• JAWS uses it to load the correct phonetic engine /
phonologic dictionary.
• NVDA uses it in the same way as VoiceOver and JAWS.
• For HTML in ePub or Apple iBooks document, it affects
how VoiceOver will read the book.
• Leaving out the lang attribute may require the user to
manually switch to the correct language for proper
pronunciation.
This gist is that things can sound funny if done wrong.
Screen Readers
http://s.codepen.io/aardrian/debug/eBOrZY
NVDA:
Screen Readers
http://s.codepen.io/aardrian/debug/eBOrZY
JAWS:
Fun Facts
Fun Facts
• WHATWG HTML 5
<html class=split lang=en-US-x-hixie>
• W3C HTML 5.0
<html lang="en-US-x-Hixie">
• W3C HTML 5.1
<html lang="en">
You can confirm this by the viewing the source of each.
Fun Facts
“Private-use subtags do not appear in the
subtag registry, and are chosen and maintained
by private agreement amongst parties.”
“Because these subtags are only meaningful
within private agreements and cannot be used
interoperably across the Web, they should be
used with great care, and avoided whenever
possible.”
http://www.w3.org/International/articles/language-tags/Overview.en.php#extension
Fun Facts
• There is a normative spec:
• Hixie English
• Version: 1.0-pre43
• Language Tag: en-GB-x-Hixie
• “This is a normative reference to Hixie English.
Hixie English is a variant of the language
spoken by the majority of the residents of the
United Kingdom (England) and the United
States of America.”
http://ian.hixie.ch/bible/english
Questions?
Mind Your lang
Presented by Adrian Roselli for
Accessibility Camp Toronto 2016
Slides from this talk will be available at
rosel.li/a11yTO
“Toronto Skyline” by Ronan Jouve, CC BY-NC 2.0

More Related Content

What's hot

Fringe Accessibility: A11y Camp Toronto 2015
Fringe Accessibility: A11y Camp Toronto 2015Fringe Accessibility: A11y Camp Toronto 2015
Fringe Accessibility: A11y Camp Toronto 2015
Adrian Roselli
 
Accessible Design WordCamp Europe 2018 in Belgrad
Accessible Design WordCamp Europe 2018 in BelgradAccessible Design WordCamp Europe 2018 in Belgrad
Accessible Design WordCamp Europe 2018 in Belgrad
Maja Benke
 
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Adrian Roselli
 
Prototyping Accessibility - WordCamp Europe 2018
Prototyping Accessibility - WordCamp Europe 2018Prototyping Accessibility - WordCamp Europe 2018
Prototyping Accessibility - WordCamp Europe 2018
Adrian Roselli
 
Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014
Adrian Roselli
 
WordPress Security for Beginners
WordPress Security for BeginnersWordPress Security for Beginners
WordPress Security for Beginners
Adam W. Warner
 
WordPress Accessibility - WordCamp Buffalo 2016
WordPress Accessibility - WordCamp Buffalo 2016WordPress Accessibility - WordCamp Buffalo 2016
WordPress Accessibility - WordCamp Buffalo 2016
Adrian Roselli
 
Selfish Accessibility — CodeDaze
Selfish Accessibility — CodeDazeSelfish Accessibility — CodeDaze
Selfish Accessibility — CodeDaze
Adrian Roselli
 
Selfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HKSelfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HK
Adrian Roselli
 
Selfish Accessibility: a11y Camp NYC 2015
Selfish Accessibility: a11y Camp NYC 2015Selfish Accessibility: a11y Camp NYC 2015
Selfish Accessibility: a11y Camp NYC 2015
Adrian Roselli
 
Selfish Accessibility: UXSG 2014
Selfish Accessibility: UXSG 2014Selfish Accessibility: UXSG 2014
Selfish Accessibility: UXSG 2014
Adrian Roselli
 
UCLA HACKU'11
UCLA HACKU'11UCLA HACKU'11
UCLA HACKU'11
Gopal Venkatesan
 
Writing code for others
Writing code for othersWriting code for others
Writing code for othersAmol Pujari
 
ACE! Conference: Selfish accessibility
ACE! Conference: Selfish accessibilityACE! Conference: Selfish accessibility
ACE! Conference: Selfish accessibility
Adrian Roselli
 
Avega Group: Selfish Accessibility
Avega Group: Selfish AccessibilityAvega Group: Selfish Accessibility
Avega Group: Selfish Accessibility
Adrian Roselli
 
Abraham aranguren. legal and efficient web app testing without permission
Abraham aranguren. legal and efficient web app testing without permissionAbraham aranguren. legal and efficient web app testing without permission
Abraham aranguren. legal and efficient web app testing without permissionYury Chemerkin
 
LAPOO - SEO cho wordpress
LAPOO - SEO cho wordpressLAPOO - SEO cho wordpress
LAPOO - SEO cho wordpress
Trần Văn Vẽ
 
Yahoo for the Masses
Yahoo for the MassesYahoo for the Masses
Yahoo for the Masses
Christian Heilmann
 
Realtime Apps with Django
Realtime Apps with DjangoRealtime Apps with Django
Realtime Apps with Django
Renyi Khor
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 Boilerplate
Michael Enslow
 

What's hot (20)

Fringe Accessibility: A11y Camp Toronto 2015
Fringe Accessibility: A11y Camp Toronto 2015Fringe Accessibility: A11y Camp Toronto 2015
Fringe Accessibility: A11y Camp Toronto 2015
 
Accessible Design WordCamp Europe 2018 in Belgrad
Accessible Design WordCamp Europe 2018 in BelgradAccessible Design WordCamp Europe 2018 in Belgrad
Accessible Design WordCamp Europe 2018 in Belgrad
 
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
Guelph A11y Conf: Everything I Know About Accessibility I Learned from Stack ...
 
Prototyping Accessibility - WordCamp Europe 2018
Prototyping Accessibility - WordCamp Europe 2018Prototyping Accessibility - WordCamp Europe 2018
Prototyping Accessibility - WordCamp Europe 2018
 
Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014
 
WordPress Security for Beginners
WordPress Security for BeginnersWordPress Security for Beginners
WordPress Security for Beginners
 
WordPress Accessibility - WordCamp Buffalo 2016
WordPress Accessibility - WordCamp Buffalo 2016WordPress Accessibility - WordCamp Buffalo 2016
WordPress Accessibility - WordCamp Buffalo 2016
 
Selfish Accessibility — CodeDaze
Selfish Accessibility — CodeDazeSelfish Accessibility — CodeDaze
Selfish Accessibility — CodeDaze
 
Selfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HKSelfish Accessibility — Harbour Front HK
Selfish Accessibility — Harbour Front HK
 
Selfish Accessibility: a11y Camp NYC 2015
Selfish Accessibility: a11y Camp NYC 2015Selfish Accessibility: a11y Camp NYC 2015
Selfish Accessibility: a11y Camp NYC 2015
 
Selfish Accessibility: UXSG 2014
Selfish Accessibility: UXSG 2014Selfish Accessibility: UXSG 2014
Selfish Accessibility: UXSG 2014
 
UCLA HACKU'11
UCLA HACKU'11UCLA HACKU'11
UCLA HACKU'11
 
Writing code for others
Writing code for othersWriting code for others
Writing code for others
 
ACE! Conference: Selfish accessibility
ACE! Conference: Selfish accessibilityACE! Conference: Selfish accessibility
ACE! Conference: Selfish accessibility
 
Avega Group: Selfish Accessibility
Avega Group: Selfish AccessibilityAvega Group: Selfish Accessibility
Avega Group: Selfish Accessibility
 
Abraham aranguren. legal and efficient web app testing without permission
Abraham aranguren. legal and efficient web app testing without permissionAbraham aranguren. legal and efficient web app testing without permission
Abraham aranguren. legal and efficient web app testing without permission
 
LAPOO - SEO cho wordpress
LAPOO - SEO cho wordpressLAPOO - SEO cho wordpress
LAPOO - SEO cho wordpress
 
Yahoo for the Masses
Yahoo for the MassesYahoo for the Masses
Yahoo for the Masses
 
Realtime Apps with Django
Realtime Apps with DjangoRealtime Apps with Django
Realtime Apps with Django
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 Boilerplate
 

Similar to Mind Your lang — Accessibility Camp Toronto 2016

Mind Your Lang — London Web Standards
Mind Your Lang — London Web StandardsMind Your Lang — London Web Standards
Mind Your Lang — London Web Standards
Adrian Roselli
 
Three Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
Three Developer Behaviors to Eliminate 85 Percent of Accessibility DefectsThree Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
Three Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
Sean Kelly
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
nobel mujuji
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Joseph Lewis
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith
 
Lecture 9 Professional Practices
Lecture 9 Professional PracticesLecture 9 Professional Practices
Lecture 9 Professional Practices
Sur College of Applied Sciences
 
wt mod1.pdf
wt mod1.pdfwt mod1.pdf
wt mod1.pdf
VinayKumarV24
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPA
Gil Fink
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
Dave Haeffner
 
SMX Munich 2018 - Current State of JavaScript SEO
SMX Munich 2018 - Current State of JavaScript SEOSMX Munich 2018 - Current State of JavaScript SEO
SMX Munich 2018 - Current State of JavaScript SEO
Onely
 
Html5
Html5Html5
Html5
Nasla C.K
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash CourseMrAbbas
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash CourseMrAbas
 
Java script
Java scriptJava script
Java script
umesh patil
 
Java script
Java scriptJava script
Java script
sanjay joshi
 
Creating and Maintaining an Open Source Library
Creating and Maintaining an Open Source LibraryCreating and Maintaining an Open Source Library
Creating and Maintaining an Open Source Library
Nicholas Schweitzer
 
Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!
Chang W. Doh
 
WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)Shumpei Shiraishi
 
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
Christopher Schmitt
 

Similar to Mind Your lang — Accessibility Camp Toronto 2016 (20)

Mind Your Lang — London Web Standards
Mind Your Lang — London Web StandardsMind Your Lang — London Web Standards
Mind Your Lang — London Web Standards
 
Three Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
Three Developer Behaviors to Eliminate 85 Percent of Accessibility DefectsThree Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
Three Developer Behaviors to Eliminate 85 Percent of Accessibility Defects
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
 
Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)Introduction to HTML5 and CSS3 (revised)
Introduction to HTML5 and CSS3 (revised)
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008
 
Lecture 9 Professional Practices
Lecture 9 Professional PracticesLecture 9 Professional Practices
Lecture 9 Professional Practices
 
wt mod1.pdf
wt mod1.pdfwt mod1.pdf
wt mod1.pdf
 
The Characteristics of a Successful SPA
The Characteristics of a Successful SPAThe Characteristics of a Successful SPA
The Characteristics of a Successful SPA
 
[In Control 2010] HTML5
[In Control 2010] HTML5[In Control 2010] HTML5
[In Control 2010] HTML5
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
SMX Munich 2018 - Current State of JavaScript SEO
SMX Munich 2018 - Current State of JavaScript SEOSMX Munich 2018 - Current State of JavaScript SEO
SMX Munich 2018 - Current State of JavaScript SEO
 
Html5
Html5Html5
Html5
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash Course
 
Web Fundamentals Crash Course
Web Fundamentals Crash CourseWeb Fundamentals Crash Course
Web Fundamentals Crash Course
 
Java script
Java scriptJava script
Java script
 
Java script
Java scriptJava script
Java script
 
Creating and Maintaining an Open Source Library
Creating and Maintaining an Open Source LibraryCreating and Maintaining an Open Source Library
Creating and Maintaining an Open Source Library
 
Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!Let's contribute, HTML5Rocks/ko!
Let's contribute, HTML5Rocks/ko!
 
WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)WHAT IS HTML5? (at CSS Nite Osaka)
WHAT IS HTML5? (at CSS Nite Osaka)
 
Looking into HTML5 + CSS3
Looking into HTML5 + CSS3Looking into HTML5 + CSS3
Looking into HTML5 + CSS3
 

More from Adrian Roselli

CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics
Adrian Roselli
 
Selfish Accessibility —DevOpsDays Buffalo
Selfish Accessibility —DevOpsDays BuffaloSelfish Accessibility —DevOpsDays Buffalo
Selfish Accessibility —DevOpsDays Buffalo
Adrian Roselli
 
Selfish Accessibility — YGLF Vilnius
Selfish Accessibility — YGLF VilniusSelfish Accessibility — YGLF Vilnius
Selfish Accessibility — YGLF Vilnius
Adrian Roselli
 
Role of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-upRole of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-up
Adrian Roselli
 
The Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-upThe Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-up
Adrian Roselli
 
Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019
Adrian Roselli
 
Fringe Accessibility — Portland UX
Fringe Accessibility — Portland UXFringe Accessibility — Portland UX
Fringe Accessibility — Portland UX
Adrian Roselli
 
WCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML SemanticsWCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML Semantics
Adrian Roselli
 
Inclusive Usability Testing - WordCamp London
Inclusive Usability Testing - WordCamp LondonInclusive Usability Testing - WordCamp London
Inclusive Usability Testing - WordCamp London
Adrian Roselli
 
CSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
CSUN 2018: Everything I Know About Accessibility I Learned from Stack OverflowCSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
CSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
Adrian Roselli
 
Inclusive Usability Testing — a11yTOCamp
Inclusive Usability Testing — a11yTOCampInclusive Usability Testing — a11yTOCamp
Inclusive Usability Testing — a11yTOCamp
Adrian Roselli
 
Selfish Accessibility - Girl Develop It Buffalo
Selfish Accessibility - Girl Develop It BuffaloSelfish Accessibility - Girl Develop It Buffalo
Selfish Accessibility - Girl Develop It Buffalo
Adrian Roselli
 
Everything I Know About Accessibility I Learned from Stack Overflow
Everything I Know About Accessibility I Learned from Stack OverflowEverything I Know About Accessibility I Learned from Stack Overflow
Everything I Know About Accessibility I Learned from Stack Overflow
Adrian Roselli
 
Inclusive User Testing — Guelph Accessibility Conference
Inclusive User Testing — Guelph Accessibility ConferenceInclusive User Testing — Guelph Accessibility Conference
Inclusive User Testing — Guelph Accessibility Conference
Adrian Roselli
 
Implementing Accessibility: Accessibility Toronto
Implementing Accessibility: Accessibility TorontoImplementing Accessibility: Accessibility Toronto
Implementing Accessibility: Accessibility Toronto
Adrian Roselli
 
Role = Drinks 2016: Selfish Accessibility
Role = Drinks 2016: Selfish AccessibilityRole = Drinks 2016: Selfish Accessibility
Role = Drinks 2016: Selfish Accessibility
Adrian Roselli
 
Fringe Accessibility: ID24 for GAAD
Fringe Accessibility: ID24 for GAADFringe Accessibility: ID24 for GAAD
Fringe Accessibility: ID24 for GAAD
Adrian Roselli
 

More from Adrian Roselli (17)

CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics
 
Selfish Accessibility —DevOpsDays Buffalo
Selfish Accessibility —DevOpsDays BuffaloSelfish Accessibility —DevOpsDays Buffalo
Selfish Accessibility —DevOpsDays Buffalo
 
Selfish Accessibility — YGLF Vilnius
Selfish Accessibility — YGLF VilniusSelfish Accessibility — YGLF Vilnius
Selfish Accessibility — YGLF Vilnius
 
Role of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-upRole of Design in Accessibility — VilniusJS Meet-up
Role of Design in Accessibility — VilniusJS Meet-up
 
The Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-upThe Role of Design in Accessibility — a11yTO Meet-up
The Role of Design in Accessibility — a11yTO Meet-up
 
Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019Prototyping Accessibility: Booster 2019
Prototyping Accessibility: Booster 2019
 
Fringe Accessibility — Portland UX
Fringe Accessibility — Portland UXFringe Accessibility — Portland UX
Fringe Accessibility — Portland UX
 
WCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML SemanticsWCBuf: CSS Display Properties versus HTML Semantics
WCBuf: CSS Display Properties versus HTML Semantics
 
Inclusive Usability Testing - WordCamp London
Inclusive Usability Testing - WordCamp LondonInclusive Usability Testing - WordCamp London
Inclusive Usability Testing - WordCamp London
 
CSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
CSUN 2018: Everything I Know About Accessibility I Learned from Stack OverflowCSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
CSUN 2018: Everything I Know About Accessibility I Learned from Stack Overflow
 
Inclusive Usability Testing — a11yTOCamp
Inclusive Usability Testing — a11yTOCampInclusive Usability Testing — a11yTOCamp
Inclusive Usability Testing — a11yTOCamp
 
Selfish Accessibility - Girl Develop It Buffalo
Selfish Accessibility - Girl Develop It BuffaloSelfish Accessibility - Girl Develop It Buffalo
Selfish Accessibility - Girl Develop It Buffalo
 
Everything I Know About Accessibility I Learned from Stack Overflow
Everything I Know About Accessibility I Learned from Stack OverflowEverything I Know About Accessibility I Learned from Stack Overflow
Everything I Know About Accessibility I Learned from Stack Overflow
 
Inclusive User Testing — Guelph Accessibility Conference
Inclusive User Testing — Guelph Accessibility ConferenceInclusive User Testing — Guelph Accessibility Conference
Inclusive User Testing — Guelph Accessibility Conference
 
Implementing Accessibility: Accessibility Toronto
Implementing Accessibility: Accessibility TorontoImplementing Accessibility: Accessibility Toronto
Implementing Accessibility: Accessibility Toronto
 
Role = Drinks 2016: Selfish Accessibility
Role = Drinks 2016: Selfish AccessibilityRole = Drinks 2016: Selfish Accessibility
Role = Drinks 2016: Selfish Accessibility
 
Fringe Accessibility: ID24 for GAAD
Fringe Accessibility: ID24 for GAADFringe Accessibility: ID24 for GAAD
Fringe Accessibility: ID24 for GAAD
 

Recently uploaded

2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
JeyaPerumal1
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
cuobya
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
nhiyenphan2005
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 

Recently uploaded (20)

2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
 
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
制作毕业证书(ANU毕业证)莫纳什大学毕业证成绩单官方原版办理
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 

Mind Your lang — Accessibility Camp Toronto 2016

  • 1. Mind Your lang Presented by Adrian Roselli for Accessibility Camp Toronto 2016 Slides from this talk will be available at rosel.li/a11yTO “Toronto Skyline” by Ronan Jouve, CC BY-NC 2.0
  • 4. • I’ve written some stuff, • Member of W3C, • Building for the web since 1993, • Learn more at AdrianRoselli.com, • Avoid on Twitter @aardrian. Great bedtime reading! About Adrian Roselli
  • 6. What Is lang? • Examples: <html lang="en"> <html lang="en-ca"> <html lang="en-us"> <html lang="en-GB-x-hixie"> • Source: BCP47: Tags for Identifying Languages, https://tools.ietf.org/html/bcp47 We’ll come back to that last one.
  • 8. Who Uses lang? • WHATWG Bug: “why do these examples of <html> lack the lang attribute?” This is where my research started. “Why not? Realistically, few people include it. It just means the language is unknown.”
  • 9. Who Uses lang? • “why do these examples of <html> lack the lang attribute?” • WHATWG HTML bug (26942) • Reported: 2014-09-30 • Resolved: 2016-04-18 • Git merge: • Editorial: Add lang to most examples #1061 Spoiled the surprise, I know, but we aren’t here for a bug.
  • 10. Who Uses lang? • Pulled January 2015 archive from WebDevData.org (a W3C Community Group), • Parsed 84,054 pages, • Found that 39,433 pages use the lang attribute on the <html> element, • 47% use <html lang="…">. 12,762 use xml:lang, which is wrong.
  • 11. Why Would You Use lang?
  • 12. Why Would You Use lang? • HTML 5 Specification • HTML Validation • Internationalization (i18) • WCAG 2.0 A, AA • Numbers • Dates • Hyphens • Quotes • Screen Readers https://github.com/w3c/html/issues/218
  • 14. HTML 5 Specification • The spec now provides a warning, • Notes that must match detected language of page, • Identified ways which it is used, • Added in April 2016 • add warning/advice about lang attribute use #218 https://github.com/w3c/html/issues/218
  • 17. HTML Validation • The W3C HTML validator compares the following attributes on the page with the detected page language: • dir • lang • If there is a mismatch, the validator will provide a warning, • If there is no dir or lang, the validator will provide a warning. It will know if you lie.
  • 20. Internationalization (i18n) • Spelling and grammar checkers: • spellcheck attribute (at caniuse.com) • CSS: • ::first-letter (at caniuse.com) • Hanging punctuation • Translation tools (particularly when looking at parts of a page). https://www.w3.org/International/questions/qa-lang-why
  • 21. Internationalization (i18n) • Font selection for CJK (for political reasons). https://medium.com/behancetech/localization-gotchas-for-asian-languages-cjk-e52a57c0fde1#.vkrhr614s
  • 23. WCAG 2.0 A, AA • Guideline 3.1 Readable: Make text content readable and understandable. • 3.1.1 Language of Page (Level A) • H57: Using language attributes on the html element • 3.1.2 Language of Parts (Level AA) • H58: Using language attributes to identify changes in the human language https://www.w3.org/TR/2008/REC-WCAG20-20081211/#meaning-doc-lang-id
  • 25. Numbers • A browser can adjust decimal characters in number fields, • Some use comma, some use period, • Yes, this is for Latin scripts. • Do not worry about browser support unless you are mixing within a page. • In that case, Firefox is the way to go. If left blank, the browser may go with local settings.
  • 28. Dates
  • 29.
  • 30. Dates • Not so much. http://s.codepen.io/aardrian/debug/ZpgNWJ
  • 32. Hyphens • For browsers that support hyphens, you will enjoy the benefit just by using the attribute. • This assumes you use the following CSS: • hyphens: auto; • -ms-hyphens: auto; (ugh) • -webkit-hyphens: auto; (also ugh) • Browser support: • http://caniuse.com/#search=hyphens If left blank, the browser may go with local settings.
  • 36. Quotes • Let the browser choose the quote marks based on the language. • This assumes you use the following HTML: • <q>…</q> Obviously you can override this with CSS, but that would be silly.
  • 40. Screen Readers • VoiceOver uses it to auto-switch voices. • VoiceOver can speak using a different accent. • JAWS uses it to load the correct phonetic engine / phonologic dictionary. • NVDA uses it in the same way as VoiceOver and JAWS. • For HTML in ePub or Apple iBooks document, it affects how VoiceOver will read the book. • Leaving out the lang attribute may require the user to manually switch to the correct language for proper pronunciation. This gist is that things can sound funny if done wrong.
  • 44. Fun Facts • WHATWG HTML 5 <html class=split lang=en-US-x-hixie> • W3C HTML 5.0 <html lang="en-US-x-Hixie"> • W3C HTML 5.1 <html lang="en"> You can confirm this by the viewing the source of each.
  • 45. Fun Facts “Private-use subtags do not appear in the subtag registry, and are chosen and maintained by private agreement amongst parties.” “Because these subtags are only meaningful within private agreements and cannot be used interoperably across the Web, they should be used with great care, and avoided whenever possible.” http://www.w3.org/International/articles/language-tags/Overview.en.php#extension
  • 46. Fun Facts • There is a normative spec: • Hixie English • Version: 1.0-pre43 • Language Tag: en-GB-x-Hixie • “This is a normative reference to Hixie English. Hixie English is a variant of the language spoken by the majority of the residents of the United Kingdom (England) and the United States of America.” http://ian.hixie.ch/bible/english
  • 48. Mind Your lang Presented by Adrian Roselli for Accessibility Camp Toronto 2016 Slides from this talk will be available at rosel.li/a11yTO “Toronto Skyline” by Ronan Jouve, CC BY-NC 2.0