SlideShare a Scribd company logo
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

PDF
Four Principles of Accessibility UK Version
PDF
Web Accessibility for the 21st Century
PDF
Top 10 tips for maximising accessibility - breakfast briefing March 2016
PDF
Beginners Guide to Accessibility
PDF
Accessibility & Compatibility
PDF
Web Accessibility Gone Wild (Now Even MORE Wilder!)
PDF
How Accessibility Made Me a Better Developer
PDF
Web Accessibility Gone Wild
Four Principles of Accessibility UK Version
Web Accessibility for the 21st Century
Top 10 tips for maximising accessibility - breakfast briefing March 2016
Beginners Guide to Accessibility
Accessibility & Compatibility
Web Accessibility Gone Wild (Now Even MORE Wilder!)
How Accessibility Made Me a Better Developer
Web Accessibility Gone Wild

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

PPTX
Developing accessible experiences - Alison Walden
PPTX
Lit 20170306
PDF
UXPA 2024- Baking Accessibility into Design.pdf
PPTX
Accessibility and universal usability
PPTX
accessibility
PDF
Web Accessibility
PDF
Accessible thinking in your IA
PPTX
How to Build an Accessible WordPress Theme
PPTX
10 Design & Layout Principles Guaranteed To Improve
PPTX
apidays LIVE Paris - Accessibility matters by Ilona Koren-Deutsch
PPTX
A Half Day Workshop on Building Accessible Websites For People With Disabilities
PPTX
Designing Accessible Drupal Themes
PPTX
Laughlin Constable Web Accessibility Basics for Web Developers
PPTX
Accessibility 101
PDF
Quick Web Accessibility - Sensory Therapy Gardens Manual
PPS
What to consider from day 1 of planning a new website
PDF
Website Accessibility: Building Inclusive Digital Spaces
PPT
Web design
PDF
Accessibility - A feature you can build
PPT
webdesign.ppt
Developing accessible experiences - Alison Walden
Lit 20170306
UXPA 2024- Baking Accessibility into Design.pdf
Accessibility and universal usability
accessibility
Web Accessibility
Accessible thinking in your IA
How to Build an Accessible WordPress Theme
10 Design & Layout Principles Guaranteed To Improve
apidays LIVE Paris - Accessibility matters by Ilona Koren-Deutsch
A Half Day Workshop on Building Accessible Websites For People With Disabilities
Designing Accessible Drupal Themes
Laughlin Constable Web Accessibility Basics for Web Developers
Accessibility 101
Quick Web Accessibility - Sensory Therapy Gardens Manual
What to consider from day 1 of planning a new website
Website Accessibility: Building Inclusive Digital Spaces
Web design
Accessibility - A feature you can build
webdesign.ppt
Ad

Recently uploaded (20)

PPTX
newyork.pptxirantrafgshenepalchinachinane
PPTX
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PDF
Uptota Investor Deck - Where Africa Meets Blockchain
PPT
Ethics in Information System - Management Information System
PDF
The Evolution of Traditional to New Media .pdf
PPTX
artificialintelligenceai1-copy-210604123353.pptx
PPTX
Slides PPTX: World Game (s): Eco Economic Epochs.pptx
PDF
Exploring VPS Hosting Trends for SMBs in 2025
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PDF
si manuel quezon at mga nagawa sa bansang pilipinas
PPTX
E -tech empowerment technologies PowerPoint
PPTX
artificial intelligence overview of it and more
PPTX
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
PDF
Introduction to the IoT system, how the IoT system works
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PDF
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
PPTX
Layers_of_the_Earth_Grade7.pptx class by
newyork.pptxirantrafgshenepalchinachinane
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
Uptota Investor Deck - Where Africa Meets Blockchain
Ethics in Information System - Management Information System
The Evolution of Traditional to New Media .pdf
artificialintelligenceai1-copy-210604123353.pptx
Slides PPTX: World Game (s): Eco Economic Epochs.pptx
Exploring VPS Hosting Trends for SMBs in 2025
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
Power Point - Lesson 3_2.pptx grad school presentation
si manuel quezon at mga nagawa sa bansang pilipinas
E -tech empowerment technologies PowerPoint
artificial intelligence overview of it and more
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
Introduction to the IoT system, how the IoT system works
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
Layers_of_the_Earth_Grade7.pptx class by
Ad

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>