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

Clean application development tutorial
Clean application development tutorialClean application development tutorial
Clean application development tutorialAdam Culp
 
Creating Content in a Pattern Library
Creating Content in a Pattern LibraryCreating Content in a Pattern Library
Creating Content in a Pattern LibraryRachel DeLauder
 
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 projectsGabriel Cardoso
 
Chapter 8 User Interface Design
Chapter 8 User Interface DesignChapter 8 User Interface Design
Chapter 8 User Interface DesignMeryl C
 
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 WorldSmartBear
 
Introduction to building wireframes
Introduction to building wireframesIntroduction to building wireframes
Introduction to building wireframesHong Qu
 
Accessibility with Joomla [on a budget]
Accessibility with Joomla [on a budget]Accessibility with Joomla [on a budget]
Accessibility with Joomla [on a budget]Aimee Maree Forsstrom
 
New Ranking Metrics by Google
New Ranking Metrics by GoogleNew Ranking Metrics by Google
New Ranking Metrics by GooglePhil Marx
 
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 : GitKrakenSheikhMoonwaraAnjumM
 
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) Mediacurrent
 
JET BI products 2021
JET BI products 2021JET BI products 2021
JET BI products 2021JET BI
 
User centered design process - Measurefest Presentation
User centered design process - Measurefest PresentationUser centered design process - Measurefest Presentation
User centered design process - Measurefest Presentationflashbender
 
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 SystemsMetricMarketing
 
The power of accessibility (November, 2018)
The power of accessibility (November, 2018)The power of accessibility (November, 2018)
The power of accessibility (November, 2018)Rachel M. Carmena
 
Event loop in browser
Event loop in browserEvent loop in browser
Event loop in browservaluebound
 
OutSystems Webinar - Troubleshooting Mobile Apps Performance
OutSystems Webinar - Troubleshooting Mobile Apps PerformanceOutSystems Webinar - Troubleshooting Mobile Apps Performance
OutSystems Webinar - Troubleshooting Mobile Apps PerformanceDaniel Reis
 
Training Webinar: Troubleshooting Mobile Apps Performance
Training Webinar: Troubleshooting Mobile Apps Performance Training Webinar: Troubleshooting Mobile Apps Performance
Training Webinar: Troubleshooting Mobile Apps Performance OutSystems
 
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 houseParis Apostolopoulos
 

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

VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdfkeithzhangding
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our EscortsCall Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escortsindian call girls near you
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 

Recently uploaded (20)

VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
象限策略:Google Workspace 与 Microsoft 365 对业务的影响 .pdf
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our EscortsCall Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
Call Girls in East Of Kailash 9711199171 Delhi Enjoy Call Girls With Our Escorts
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 

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>