SlideShare a Scribd company logo
1 of 41
Download to read offline
Common Accessibility
Mistakes and How to
Make Avoid Them
July 14, 2018
Mediacurrent
| 2
Today’s Agenda
I. About Me
II. Accessibility Principles
III. Common Mistakes
IV. Questions and Opinions
| 3
Ben Robertson
Front End Developer
benrobertson.io
@banquos_ghost
Mediacurrent is a full-service digital
agency that implements world class
open source software development,
strategy and design to achieve
defined goals for enterprise
organizations seeking a better return
on investment.
| 4
Ben’s Homegrown
Web Accessibility
Principles
●●●●●●
| 5
Principle 1:
Web Design > Graphic Design
●●●●●●
| 6
The Three Tasks of Web Design
●●●●●●
1. Write Good Markup
2. Use CSS to enhance the existing structure
3. Layer interactivity with JavaScript
| 7
Principle 2:
Be ASAP:
As Semantic As Possible
●●●●●●
| 8
Every time you start typing
<div>...
Ask yourself:
●●●●●●
| 9
Could I use a more semantic
element?
●●●●●●
| 10
HTML Elements Organized by Purpose
●●●●●●
http://bit.ly/semantic-html
(MDN)
| 11●●●●●●
| 12
Alternatives to <div>
●●●●●●
List of all elements, organized by purpose (MDN):
http://bit.ly/semantic-html
● <section>
● <article>
● <ul> or <ol>
● <header>
● <footer>
● <aside>
● <button>
| 13
Principle 3:
Web Sites Should
Look Good Naked
●●●●●●
| 14●●●●●●
| 15●●●●●●
The Naked Test: Bookmarklet
http://bit.ly/remove-styles
(StackExchange)
| 16●●●●●●
| 17
Nice heading.
Where are the buttons?
Label order?
Next / Create Account
Swapped Position
| 18
The Naked Test: What to Look For
●●●●●●
● Does the structure of the site make sense?
● Is the content organized?
● Do interactive elements look interactive?
● Do inputs have labels?
| 19
Principle 4:
Talk to Your Computer
●●●●●●
| 20
ARIA Attributes
●●●●●●
● aria-label: What is this element?
● aria-expanded: Is this element open or closed?
● aria-describedby: What element describes this
element?
● aria-live: Will this element be updated later?
| 21
The Principles:
A Refresher
●●●●●●
| 22
Web Design > Graphic Design
Write Good Markup.
Enhance good markup with CSS.
Layer interactivity with JavaScript.
| 23
As Semantic As Possible
Avoid <div>s when possible.
Always use <button>.
| 24
Websites should look
good naked.
Remove CSS to check markup.
| 25
Talk to your computer.
Use ARIA attributes to give the browser / screen
reader more context.
| 26
Common Mistakes
●●●●●●
| 27
Missing Title
● Every page needs a <title>Page Title</title>
● It should be informative
● It should be unique on your site.
| 28
Poor Heading structure
● Headings: h1, h2, h3, h4, h5, h6
● Form the outline of a web page
● Should be used in order - don’t skip one!
● Assist readability / scannability
| 29
| 30
<a href=“/”>Read More</a>
● Read more what?
● Read more where?
● Links text should tell where or what a user is clicking on
● Solution: Add hidden text
● <a href=”/link” aria-label=”Read more about {{ title }}”>{{ title }}</a>
| 31
Inputs Missing a <label>
● Most common mistake is using a placeholder value instead of a value
● Designers love this:
● Wrong way: <input placeholder=”Search Google or type URL” />
● You can achieve this using the “float label” pattern (http://bit.ly/float-labels)
● Every input needs a real <label> tag, associated with an input
● <label for=”email-field”>Email Address</label>
| 32
CSS Grid / Flexbox: { order: ?? }
● `order` lets you reorder flex items or grid items
● Only visual reordering
● Creates a mismatch between logical ordering / visual order
● Go back and update the source order
| 33
Images and ALT attributes
● Always include the alt attribute on an image
● ALT = Alternative
● <img src=”image.png” alt=”Description of the image” />
● Is the image content, or merely decorative?
● It may be fine to leave the alt attribute blank
| 34
Empty ALT
| 35
Empty ALT #2
| 36
:focus { outline: none; }
● Focus styles are for people who aren’t using a mouse
● They help show a user where they are currently interacting with the interface
● Don’t remove them, style them!
● Limit them to keyboard-only interactions with :focus-visible (polyfill:
http://bit.ly/focus-ring)
| 37
Missing keyboard functionality
● Interactivity needs to be triggered via mouse and keyboard
● Use the <button> element
● Other common keyboard considerations:
○ Exiting the current component
○ Submitting
○ Moving position / browsing
| 38
For other keyboard
functionality, listen to the
keyup or keydown
event.
http://keycode.info
| 39
Hiding Things
● So many ways to hide things
● The mistake is to hide something visually but not from tabindex or screen
readers
● Methods of hiding visually and from tabindex / screen readers:
○ display: none
○ Html hidden attribute: <p hidden>Hidden Text</p>
● Hiding from screen-readers (combine with other CSS):
○ aria-hidden=”true”
| 40
Hiding & aria-expanded
● Indicates expanded / collapsed
● <button aria-expanded=”false”>A Button</button>
Thank you!
@Mediacurrent Mediacurrent.comfacebook.com/mediacurrent

More Related Content

Similar to Common accessibility mistakes and how to avoid them

Designing a new user interface for open source projects
Designing a new user interface for open source projectsDesigning a new user interface for open source projects
Designing a new user interface for open source projects
Gabriel Cardoso
 
Introduction to building wireframes
Introduction to building wireframesIntroduction to building wireframes
Introduction to building wireframes
Hong Qu
 

Similar to Common accessibility mistakes and how to avoid them (20)

Clean application development tutorial
Clean application development tutorialClean application development tutorial
Clean application development tutorial
 
Creating Content in a Pattern Library
Creating Content in a Pattern LibraryCreating Content in a Pattern Library
Creating Content in a Pattern Library
 
Designing a new user interface for open source projects
Designing a new user interface for open source projectsDesigning a new user interface for open source projects
Designing a new user interface for open source projects
 
Chapter 8 User Interface Design
Chapter 8 User Interface DesignChapter 8 User Interface Design
Chapter 8 User Interface Design
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
 
Introduction to building wireframes
Introduction to building wireframesIntroduction to building wireframes
Introduction to building wireframes
 
Accessibility with Joomla [on a budget]
Accessibility with Joomla [on a budget]Accessibility with Joomla [on a budget]
Accessibility with Joomla [on a budget]
 
New Ranking Metrics by Google
New Ranking Metrics by GoogleNew Ranking Metrics by Google
New Ranking Metrics by Google
 
Bai giang-se-24feb14
Bai giang-se-24feb14Bai giang-se-24feb14
Bai giang-se-24feb14
 
Web designer
Web designerWeb designer
Web designer
 
Headless browser: puppeteer and git client : GitKraken
Headless browser: puppeteer and git client : GitKrakenHeadless browser: puppeteer and git client : GitKraken
Headless browser: puppeteer and git client : GitKraken
 
We Built This City (On Drupal 8)
We Built This City (On Drupal 8) We Built This City (On Drupal 8)
We Built This City (On Drupal 8)
 
JET BI products 2021
JET BI products 2021JET BI products 2021
JET BI products 2021
 
User centered design process - Measurefest Presentation
User centered design process - Measurefest PresentationUser centered design process - Measurefest Presentation
User centered design process - Measurefest Presentation
 
The Wonderful World of Content Management Systems
The Wonderful World of Content Management SystemsThe Wonderful World of Content Management Systems
The Wonderful World of Content Management Systems
 
The power of accessibility (November, 2018)
The power of accessibility (November, 2018)The power of accessibility (November, 2018)
The power of accessibility (November, 2018)
 
Event loop in browser
Event loop in browserEvent loop in browser
Event loop in browser
 
OutSystems Webinar - Troubleshooting Mobile Apps Performance
OutSystems Webinar - Troubleshooting Mobile Apps PerformanceOutSystems Webinar - Troubleshooting Mobile Apps Performance
OutSystems Webinar - Troubleshooting Mobile Apps Performance
 
Training Webinar: Troubleshooting Mobile Apps Performance
Training Webinar: Troubleshooting Mobile Apps Performance Training Webinar: Troubleshooting Mobile Apps Performance
Training Webinar: Troubleshooting Mobile Apps Performance
 
Services, tools & practices for a software house
Services, tools & practices for a software houseServices, tools & practices for a software house
Services, tools & practices for a software house
 

Recently uploaded

一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
pxcywzqs
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
F
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 

Recently uploaded (20)

20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 

Common accessibility mistakes and how to avoid them

  • 1. Common Accessibility Mistakes and How to Make Avoid Them July 14, 2018 Mediacurrent
  • 2. | 2 Today’s Agenda I. About Me II. Accessibility Principles III. Common Mistakes IV. Questions and Opinions
  • 3. | 3 Ben Robertson Front End Developer benrobertson.io @banquos_ghost Mediacurrent is a full-service digital agency that implements world class open source software development, strategy and design to achieve defined goals for enterprise organizations seeking a better return on investment.
  • 4. | 4 Ben’s Homegrown Web Accessibility Principles ●●●●●●
  • 5. | 5 Principle 1: Web Design > Graphic Design ●●●●●●
  • 6. | 6 The Three Tasks of Web Design ●●●●●● 1. Write Good Markup 2. Use CSS to enhance the existing structure 3. Layer interactivity with JavaScript
  • 7. | 7 Principle 2: Be ASAP: As Semantic As Possible ●●●●●●
  • 8. | 8 Every time you start typing <div>... Ask yourself: ●●●●●●
  • 9. | 9 Could I use a more semantic element? ●●●●●●
  • 10. | 10 HTML Elements Organized by Purpose ●●●●●● http://bit.ly/semantic-html (MDN)
  • 12. | 12 Alternatives to <div> ●●●●●● List of all elements, organized by purpose (MDN): http://bit.ly/semantic-html ● <section> ● <article> ● <ul> or <ol> ● <header> ● <footer> ● <aside> ● <button>
  • 13. | 13 Principle 3: Web Sites Should Look Good Naked ●●●●●●
  • 15. | 15●●●●●● The Naked Test: Bookmarklet http://bit.ly/remove-styles (StackExchange)
  • 17. | 17 Nice heading. Where are the buttons? Label order? Next / Create Account Swapped Position
  • 18. | 18 The Naked Test: What to Look For ●●●●●● ● Does the structure of the site make sense? ● Is the content organized? ● Do interactive elements look interactive? ● Do inputs have labels?
  • 19. | 19 Principle 4: Talk to Your Computer ●●●●●●
  • 20. | 20 ARIA Attributes ●●●●●● ● aria-label: What is this element? ● aria-expanded: Is this element open or closed? ● aria-describedby: What element describes this element? ● aria-live: Will this element be updated later?
  • 21. | 21 The Principles: A Refresher ●●●●●●
  • 22. | 22 Web Design > Graphic Design Write Good Markup. Enhance good markup with CSS. Layer interactivity with JavaScript.
  • 23. | 23 As Semantic As Possible Avoid <div>s when possible. Always use <button>.
  • 24. | 24 Websites should look good naked. Remove CSS to check markup.
  • 25. | 25 Talk to your computer. Use ARIA attributes to give the browser / screen reader more context.
  • 27. | 27 Missing Title ● Every page needs a <title>Page Title</title> ● It should be informative ● It should be unique on your site.
  • 28. | 28 Poor Heading structure ● Headings: h1, h2, h3, h4, h5, h6 ● Form the outline of a web page ● Should be used in order - don’t skip one! ● Assist readability / scannability
  • 29. | 29
  • 30. | 30 <a href=“/”>Read More</a> ● Read more what? ● Read more where? ● Links text should tell where or what a user is clicking on ● Solution: Add hidden text ● <a href=”/link” aria-label=”Read more about {{ title }}”>{{ title }}</a>
  • 31. | 31 Inputs Missing a <label> ● Most common mistake is using a placeholder value instead of a value ● Designers love this: ● Wrong way: <input placeholder=”Search Google or type URL” /> ● You can achieve this using the “float label” pattern (http://bit.ly/float-labels) ● Every input needs a real <label> tag, associated with an input ● <label for=”email-field”>Email Address</label>
  • 32. | 32 CSS Grid / Flexbox: { order: ?? } ● `order` lets you reorder flex items or grid items ● Only visual reordering ● Creates a mismatch between logical ordering / visual order ● Go back and update the source order
  • 33. | 33 Images and ALT attributes ● Always include the alt attribute on an image ● ALT = Alternative ● <img src=”image.png” alt=”Description of the image” /> ● Is the image content, or merely decorative? ● It may be fine to leave the alt attribute blank
  • 36. | 36 :focus { outline: none; } ● Focus styles are for people who aren’t using a mouse ● They help show a user where they are currently interacting with the interface ● Don’t remove them, style them! ● Limit them to keyboard-only interactions with :focus-visible (polyfill: http://bit.ly/focus-ring)
  • 37. | 37 Missing keyboard functionality ● Interactivity needs to be triggered via mouse and keyboard ● Use the <button> element ● Other common keyboard considerations: ○ Exiting the current component ○ Submitting ○ Moving position / browsing
  • 38. | 38 For other keyboard functionality, listen to the keyup or keydown event. http://keycode.info
  • 39. | 39 Hiding Things ● So many ways to hide things ● The mistake is to hide something visually but not from tabindex or screen readers ● Methods of hiding visually and from tabindex / screen readers: ○ display: none ○ Html hidden attribute: <p hidden>Hidden Text</p> ● Hiding from screen-readers (combine with other CSS): ○ aria-hidden=”true”
  • 40. | 40 Hiding & aria-expanded ● Indicates expanded / collapsed ● <button aria-expanded=”false”>A Button</button>