SlideShare uma empresa Scribd logo
1 de 41
Baixar para ler 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

Mais conteúdo relacionado

Semelhante a 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
 

Semelhante a 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
 

Último

TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxAndrieCagasanAkio
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxmibuzondetrabajo
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxMario
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxNIMMANAGANTI RAMAKRISHNA
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Cybersecurity Threats and Cybersecurity Best Practices
Cybersecurity Threats and Cybersecurity Best PracticesCybersecurity Threats and Cybersecurity Best Practices
Cybersecurity Threats and Cybersecurity Best PracticesLumiverse Solutions Pvt Ltd
 

Último (9)

TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptx
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptx
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptx
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptx
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Cybersecurity Threats and Cybersecurity Best Practices
Cybersecurity Threats and Cybersecurity Best PracticesCybersecurity Threats and Cybersecurity Best Practices
Cybersecurity Threats and Cybersecurity Best Practices
 

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>