Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Selfish Accessibility — WordCamp Europe 2017


Published on

We can all pretend that we’re helping others by making web sites and software accessible, but we are really making them better for our future selves. Learn some fundamentals of accessibility and how it can benefit you (whether future you from aging or you after something else limits your abilities). We’ll review simple testing techniques, basic features and enhancements, coming trends, and where to get help. This isn’t intended to be a deep dive, but more of an overall primer for those who aren’t sure where to start nor how it helps them.

Published in: Internet
  • Login to see the comments

Selfish Accessibility — WordCamp Europe 2017

  1. 1. Selfish Accessibility Presented by Adrian Roselli for WordCamp Europe 2017 Slides from this talk will be available at
  2. 2. Introductions
  3. 3. • I’ve written some stuff, • Member of W3C, • Building for the web since 1993, • Learn more at, • Avoid on Twitter @aardrian. Great bedtime reading! About Adrian Roselli
  4. 4. • This trip paid for by The Paciello Group. • But please do not tell them in case they do not know. Seriously. Do not tell them. About Adrian Roselli
  5. 5. Primer
  6. 6. What is a11y? • A numeronym for “accessibility”: • The first and last letter (accessibility), • The number of characters omitted (a11y). • Prominent on Twitter (character restrictions): • #a11y • Examples: • l10n → localization • i18n → internationalization Ain’t language funsies?
  7. 7. Accessibility Gets No Respect In fairness, Sherwin Williams needs to come up with a lot of color names... “Cyberspace” (gray) “Online” (blue) “Lime Rickey” (green)
  8. 8. Accessibility Gets No Respect In fairness, Sherwin Williams needs to come up with a lot of color names... “Cyberspace” (gray) “Online” (blue) “Lime Rickey” (green)
  9. 9. Accessibility Gets No Respect …however I think the team could have done better than this.
  10. 10. What We’ll Cover • Yay Statistics! • Be Selfish • User Experience Models • Technical Bits • WordPress Goes WCAG • Wrap-up • Resources Work with me, people.
  11. 11. Yay Statistics!
  12. 12. Any Disability • In the United States: • 10.4% aged 21-64 years old, • 25% aged 65-74 years old, • 50% aged 75+. • Includes: • Visual • Hearing • Mobility • Cognitive
  13. 13. Vision Impairments • 285 million worldwide: • 39 million are blind, • 246 million have low vision, • 82% of people living with blindness are aged 50 and above. • 1.8% of Americans aged 21-64. • 4.0% of Americans aged 65-74. • 9.8% of Americans aged 75+.
  14. 14. Hearing Impairments • 360 million people worldwide have disabling hearing loss. • 17% (36 million) of American adults report some degree of hearing loss: • 18% aged 45-64 years old, • 30% aged 65-74 years old, • 47% aged 75+ years old.
  15. 15. Mobility Impairments • In the United States: • 5.5% aged 21-64 years old. • 15.6% aged 65-74 years old. • 32.9% aged 75+.
  16. 16. Cognitive Impairments • Dyslexia, • Dyscalculia, • Memory issues, • Distractions (ADD, ADHD), • In the United States: • 4.3% aged 21-64 years old. • 5.4% aged 65-74 years old. • 14.4% aged 75+.
  17. 17. Be Selfish
  18. 18. WebAIM’s Hierarchy for Motivating Accessibility Change
  19. 19. My Hierarchy for Motivating Accessibility Change Is better, no?
  20. 20. Getting Older • Affects (nearly) everyone, • Carries risks and side effects, • Is not for the young. I’m still experimenting with it.
  21. 21. Rising Damp on Flickr.
  22. 22. Darren Baldwin on Flickr.
  23. 23. Accidents • Broken limbs, • Eye injuries, • Hearing injuries, • Head trauma. All of these have happened to me, multiple times.
  24. 24. Rev Stan on Flickr.
  25. 25. Let Ideas Compete on Flickr.
  26. 26. Fluffy Steve on Flickr.
  27. 27. Paul Townsend on Flickr.
  28. 28. But I’m Invincible! • Multi-tasking, • Sunlight, • Eating at your desk, • No headphones handy, • Content is not in your native language. The sun is trying to kill me.
  29. 29. Mariëlle on Flickr.
  30. 30. barockschloss on Flickr.
  31. 31. Seb on Flickr.
  32. 32. A.Davy on Flickr.
  33. 33. Steve Rhodes on Flickr.
  34. 34. SuperFantastic on Flickr.
  35. 35. World Bank Photo Collection on Flickr.
  36. 36. Lars Kristian Flem on Flickr.
  37. 37. Tech Support • Think of your family! • Think of your time spent helping them! • Think of the wasted holidays! This is why we hate the holidays.
  38. 38. Robert Simmons on Flickr.
  39. 39. User Experience Models
  40. 40. User Stories • Components: • User, • Outcome, • Value. • Writing: • As user, I want outcome. • As user, I want outcome so that value. • In order to get value as user, I want outcome. How to Write User Stories for Web Accessibility
  41. 41. Selfish User Stories • As a user on a sun-lit patio, I want to be able to read the content and see the controls. Add beer and as a user I may have trouble focusing.
  42. 42. Selfish User Stories • As a user in bed with a sleeping spouse, I want to watch a training video in silence so that I can get caught up at work. As a user who doesn’t want to get punched for having slacked off at work.
  43. 43. Selfish User Stories • In order to click links as a user with no elbow room in coach class with a tiny trackpad, I want click areas to be large enough and adequately spaced. As a user in coach class who also paid too much for the drink he’s spilling on his keyboard.
  44. 44. Selfish User Stories • As a user distracted by the TV, I want clear headings and labels so that I don’t lose my place. As a user who really should be finishing his work in the office.
  45. 45. Personas Book Excerpt: A Web for Everyone, by Sarah Horton, Whitney Quesenbery
  46. 46. Personas Adrian • Works when he should be relaxing, relaxes when he should be working. • Lives between motorcycles. • Works late at night with the TV on. • Uses sub-titles in Netflix. • Keeps all screens as dark as possible. That photo is from official ID.
  47. 47. Technical Bits
  48. 48. Use @alt Text on Images
  49. 49. Use @alt Text on Images
  50. 50. Use @alt Text on Images • Can you still make sense of the page? • Is content missing? • Can you still use the site? • Is your alt text useful?
  51. 51. Use @alt Text on Images 1. What role does image play? 2. Does it present new info? 3. What type of info? Informative Yes alt="" or <a href="foo"><img alt="">Link</a> alt="" or Use CSS alt="descriptive identification" or alt="short label" + caption PurelyDecorative Sensory No alt="label for link" alt=“short alternative" or alt="short label" + caption alt="short label + location of long alternative" or long text alternative on same or linked page Long/Complex Short/Simple
  52. 52. Hyperlinks!
  53. 53. Hyperlinks! • Is there any “click here,” “more,” “link to…”? • Are you using all-caps, URLs, emoticons? • Do you warn before opening new windows? • Do links to downloads provide helpful info? • Are you using pagination links? • Are your links underlined (or otherwise obvious)? • Is there alt text for image links? • Is the link text consistent?
  54. 54. Use Link Underlines
  55. 55. Use Link Underlines • You are not Google: • Users know Google’s layout, • Users probably don’t visit your site daily. • Relying on color alone will not suffice (WCAG 1.4.1 [A], 1.4.3 [AA]), • Necessary contrast values: • 4.5:1 between text and its background for copy, • 3:1 between text and its background for larger text, • 3:1 between surrounding text and a hyperlink, plus an additional visual cue (G183).
  56. 56. Use :focus Styles
  57. 57. Use :focus Styles • Particularly if you removed link underlines, • Everywhere you have :hover, add :focus, • Look for :focus{outline:none;} in libraries: • If you find it, remove it. • Easy to test with the tab key.
  58. 58. Tritanopia Color Contrast
  59. 59. Protanopia Color Contrast
  60. 60. Deuteranopia Color Contrast
  61. 61. Color Contrast • Is there enough contrast? • Are hyperlinks, menus, etc. still visible? • WCAG 2.0: • 4.5:1 for normal text • 3:1 for large text (14+pt & bold, or 18+pt) • Tools: • Chrome Color Contrast Analyzer • Lea Verou’s Contrast Ratio • WebAIM Color Contrast Checker •
  62. 62. Use <label> (properly)
  63. 63. Use <label> (properly) • Match the for attribute to the corresponding field’s id attribute. • When you click label text next to a text box, does the cursor appear in the field? • When you click label text next to a radio / checkbox, does it get toggled? • When you click label text next to a select menu, does it get focus?
  64. 64. Use HTML5
  65. 65. Use HTML5 <header role="banner"> <nav role="navigation"> <aside role="complementary"> <form role="search"> <footer role="contentinfo"> <main role="main">
  66. 66. Use HTML5 “Mobile” often means narrow screen in RWD, as well as this context.
  67. 67. Use HTML5 <header role="banner"> <nav role="navigation"> <aside role="complementary"> <form role="search"> <footer role="contentinfo"> <main role="main"> “Mobile” often means narrow screen in RWD, as well as this context.
  68. 68. Use HTML5 • Sectioning elements already have accessibility built in. Use them. • <header> • <nav> • <main> (one per page) • <aside> • <footer> • <form> (a search form) This stuff is baked in!
  69. 69. Use <h#> Wisely
  70. 70. Use <h#> Wisely • Use only one <h1> per page, • Don’t skip heading levels, • Use appropriate nesting, • There is no Document Outline Algorithm: • Don’t use <h1> within every new <section> nor <article>, • This will not affect your SEO.
  71. 71. <button>, <input>, or <a>
  72. 72. <button>, <input>, or <a> • Don’t use a <div> nor <span>. • Does the control take me to another URL? • Use an <a href>. • Note: does not fire on space-bar. • Does the control change something on the current page? • Use a <button>. • Does the control submit form fields? • Use a <input type="submit"> or <button type="submit">.
  73. 73. Don’t Use tabindex > 0
  74. 74. Don’t Use tabindex > 0 • tabindex="-1" • Use to set focus with script, • Does not put it in tab order of page. • tabindex="0" • Allows user to set focus (eg: via keyboard), • Puts in tab order of page (based on DOM). • tabindex="1" (or greater) • Do not do this, • Messes with natural tab order.
  75. 75. Maybe Use tabindex=0
  76. 76. Maybe Use tabindex=0 • Do you have scrolling content boxes? • Keyboard users cannot access it. • Do you have content that displays on hover? • Keyboard users probably cannot access it. • A technique: • <div role="region" aria-label="[if appropriate]" tabindex="0">
  77. 77. Set lang attribute on <html>
  78. 78. Set lang attribute on <html>
  79. 79. Set lang attribute on <html> • VoiceOver uses to auto-switch voices, • VoiceOver uses appropriate accenting, • JAWS loads correct phonetic engine / phonologic dictionary, • NVDA matches VoiceOver and JAWS, • Use the correct lang value: • Sub-tags are ok, • Avoid private-use: en-GB-x-hixie
  80. 80. Source Order Matters Firefox Chrome
  81. 81. Source Order Matters • CSS techniques allow visual order to break from DOM order: • Floats, • Absolute positioning, • Flexbox (see 5.4.1 of ED for a11y note), • Grid (read Rachel Andrew on subgrid). • WCAG 1.3.2 and 2.4.3 describe meaningful sequence and tab order matching visual flow, • Different behavior among different browsers.
  82. 82. Don’t Disable Zoom
  83. 83. Don’t Disable Zoom • Allow users on mobile to zoom in, • Look in <meta name="viewport"> for this: • minimum-scale=1.0 • maximum-scale=1.0 • user-scalable=no • Look in @-ms-viewport {} for this: • zoom:1.0 • Enhance!
  84. 84. Avoid Infinite Scroll
  85. 85. Avoid Infinite Scroll • Makes it impossible to access some content: • Footer, • Sidebar links. • Destroys the back button, • Makes it impossible to share a URL to specific “page” of results, • Makes it impossible to jump ahead several “pages” of results, • Can overwhelm AT users, less powerful devices.
  86. 86. Use Captions/Subtitles
  87. 87. Use Captions/Subtitles • Everybody uses them: • Working in public, in bed, at home, • Surfing in public, in bed, at work. • Should include audio descriptions, • Should include speaker identification, • Review auto-captions (“craptions”): •
  88. 88. Use Captions/Subtitles • Do video/audio clips have text alternatives? • Are links to closed-captions or transcripts built into the player or separate text links? • Is there an audio description available? • Tools: • Media Access Australia YouTube captioning tutorial, Vimeo captioning tutorial, • Tiffany Brown’s WebVTT tutorial, • DIY Resources for Closed Captioning and Transcription from 3 Play Media.
  89. 89. WAI-ARIA • Web Accessibility Initiative – Accessible Rich Internet Applications. • Adds accessibility information to HTML elements. • Can be used with prior versions of HTML. • WAI-ARIA 1.0 published March 20, 2014.
  90. 90. Five Rules of ARIA Use 1. If you can use a native HTML5 element with semantics/behavior already built in, then do so, instead of repurposing another element. RT this!
  91. 91. Five Rules of ARIA Use 2. Do not change native semantics. Unless you really have to (no <h1> with a role="button", for example). RT this!
  92. 92. Five Rules of ARIA Use 3. All interactive ARIA controls must be usable with the keyboard — keyboard users must be able to perform equivalent actions. RT this!
  93. 93. Five Rules of ARIA Use 4. Do not use role="presentation" or aria- hidden="true" on a focusable element. If you do so, some users will never be able to focus. RT this!
  94. 94. Five Rules of ARIA Use 5. All interactive elements must have an accessible name. This may come from visible (text on a button) or invisible (alt text on an image) property. Accessible name:
  95. 95. HTML/ARIA Don’t • <div onclick="DoThing();">Do a thing.</div> I see this all the time.
  96. 96. HTML/ARIA Don’t • <div onclick="DoThing();" tabindex="0">Do a thing.</div> I see this a bunch, too.
  97. 97. HTML/ARIA Don’t • <div onclick="DoThing();" tabindex="0" onkeypress="DoThing();" >Do a thing.</div> Excluded bits like if(event.keyCode==32||event.keyCode==13)DoThing();
  98. 98. HTML/ARIA Don’t • <div onclick="DoThing();" tabindex="0" onkeypress="DoThing();" onkeydown="e.preventDefault();">Do a thing.</div> Oh right, have to keep page from scrolling if the use tries to activate the button with a space bar.
  99. 99. HTML/ARIA Don’t • <div onclick="DoThing();" tabindex="0" onkeypress="DoThing();" onkeydown="e.preventDefault();" role="button">Do a thing.</div> ARIA roles to the rescue! Er…
  100. 100. HTML/ARIA Do • <button>Do a thing.</button> Or just start with the right element.
  101. 101. WordPress Goes WCAG 2 of 4 sections
  102. 102. <irony>No transcripts nor captions, but go to the video and search (ctrl + F) for “It's Martin.” to jump to the point in the in-progress slightly inaccurate transcript.</irony>
  103. 103. “All new or updated code released into WordPress core and bundled themes must conform with the WCAG 2.0 guidelines at level AA.” — Rian Rietveld March 21, 2016
  104. 104. Notes • Leans on WP Core Accessibility Coding Standards • practices/coding-standards/accessibility-coding- standards/ • Itself informed by WCAG (Web Content Accessibility Guidelines) 2.0 (a W3C recommendation) • • Get involved • involved/
  105. 105. More Notes • To get accessibility-ready tag for your theme, must follow specific guidelines • eview/accessibility/required/ • “The accessibility of plugins is the responsibility of each plugin author.”
  106. 106. Yet More Notes • Accessibility wish list for 4.6+, 27 April 2016 • essibility-wish-list-for-4-6-and-beyond/ • Rian Rietveld won Heroes of Accessibility Award, Individual Achievement category • rietveld-wins-heroes-of-accessibility-award
  107. 107. Accessibility Ready Themes
  108. 108. Plug-ins • WP Accessibility • • Access Monitor • • Accessible Video Library • library/
  109. 109. Wrap-up
  110. 110. The Message • Supporting accessibility now helps to serve future you. Do or do not.
  111. 111. The Message • Supporting accessibility now helps to serve future you. • Supporting accessibility now helps injured you, encumbered you. There is no try.
  112. 112. The Message • Supporting accessibility now helps to serve future you. • Supporting accessibility now helps injured you, encumbered you. • Getting younger developers to buy in helps future you – if you teach them well. Always pass on what you have learned.
  113. 113. Stairamp Dean Bouchard on Flickr
  114. 114. ≠ Checklist • Accessibility is not a checklist.
  115. 115. Maintenance Nicolas Steenhout “Wheelchair ramp at pharmacy not only hasn’t been cleared of snow but has 2 potted trees to ensure nobody can pass.”
  116. 116. = Process • Accessibility is not a checklist. • Accessibility is an ongoing process.
  117. 117. Resources Unless you had questions, which you didn’t else you would have asked by now.
  118. 118. Resources • Web Accessibility and Older People: Meeting the Needs of Ageing Web Users • Easy Checks - A First Review of Web Accessibility • How People with Disabilities Use the Web: Overview web/Overview.html In addition to the gems I’ve sprinkled throughout.
  119. 119. Resources • 2.11 ARIA Role, State, and Property Quick Reference state-and-property-quick-reference • 2.12 Definitions of States and Properties (all aria-* attributes) states-and-properties-all-aria--attributes In addition to the gems I’ve sprinkled throughout.
  120. 120. Resources • Designing For The Elderly: Ways Older People Use Digital Technology Differently ing-digital-technology-for-the-elderly/ • How to Write User Stories for Web Accessibility write-user-stories-accessibility-requirements • Book Excerpt: A Web for Everyone everyone In addition to the gems I’ve sprinkled throughout.
  121. 121. Selfish Accessibility Presented by Adrian Roselli for WordCamp Europe 2017 Slides from this talk will be available at