SlideShare una empresa de Scribd logo
1 de 55
Graham Armfield
Coolfields Consulting
1
How to Build an Accessible WordPress Theme
A bit about me
2
I’m a…
Web Accessibility Consultant
WordPress Developer
@coolfields
Photo by Kari Leigh London
coolfields.co.uk
What I'm going to cover
• Why accessibility is
important
• When to think about
accessibility
• Designing your theme
• Building your theme
@coolfields
• Adding plugins
• What to tell your content
authors
• The checklist
Why is accessibility important?
Photo by Kari Leigh London
Accessibility can help
everyone
Why is accessibility important?
The legal answer
@coolfields
Accessibility as a legal requirement
When to think about accessibility?
Do not leave it until last – as time goes by it becomes harder
and costlier to fix…
Treat it as you would any other requirement – think about it at
every stage.
Dessigning an accessible
WordPress theme
Designing for accessibility
Presentation slides:
https://www.slideshare.net/coolfields/designing-for-accessibility-
wordcamp-london-2017
WordPress TV:
https://wordpress.tv/2017/05/30/graham-armfield-designing-for-
accessibility/
9
Colour contrast
10
Define focus as well as hover styles
11
Hover styles Focus styles
Making links look like links
12@coolfields
Users who are colour blind or who have poor vision may struggle to see
links with no underline.
Text justification
13
Left aligned text
Can make life very difficult for dyslexics - around 8 - 10% of the population.
Fully justified text
14
Building your accessible theme
WordPress theme review guidelines
For coding standards etc:
https://make.wordpress.org/themes/handbook/review/required/
But also for accessibility:
https://make.wordpress.org/themes/handbook/review/accessibility/
15
Use semantic markup
Screen readers rely on the semantics to communicate
structure to users.
Speech recognition software also relies on good semantics.
16
Indicating page language
Enables screen readers to voice words correctly
Use lang attribute on <html> element.
<html lang="en-gb">
List of language codes:
http://www.metamodpro.com/browser-language-codes
17
Heading strategy 1
Headings are used as in-page navigation by screen reader users - so
very important to get this right.
One top level heading <h1> per page/post - should be equivalent of
page/post <title>
18
Heading strategy 2
It's OK to start the page with other headings - eg <h2> just before
primary navigation
<h2 class="srt">Main navigation</h2>
<nav>…</nav>
<main>
<h1>Meet the team</h1>
19
Heading strategy 3
Widget headings - keep heading hierarchy sensible if you can in the
widget areas
Editing content - see later
20
Landmarks
Landmarks
Who uses landmarks in their themes?
Who uses these HTML5 elements in their themes?
<nav>, <main>, <header>, <footer>, <section>, etc
These are all understood as landmarks, by screen readers in certain
situations…
Landmarks
A way of defining discrete regions or areas of a page.
For example: the banner, the navigation, main content, etc.
Increasingly used by screen reader users to help them navigate around
pages.
Sometimes indicated by role="navigation", role="main", etc
Use aria-label to give more information if required:
<nav aria-label="primary">
Landmarks
<header role="banner">
<nav role="navigation">
<footer role="contentinfo">
<main role="main"> <aside role=
"complementary">
<form role="search">
Coolfields Consulting Photo:
Links
Skip links
26
• Make it the first link in page.
• Visible when it gets focus.
• Should point at <main id="main">.
<a href="#main">Skip to content</a>
These are really useful
for sighted keyboard
users and screen reader
users.
Are your blog links meaningful?
27
1
1
2
3 4
5
6 7
2
3
4
5
6
7
Pagination links
By default these links are just
numbers - no context for screen
reader users.
So, add some screen reader text to
give context.
But how do you do that?
Pagination links
From: https://codex.wordpress.org/Function_Reference/paginate_links
*
Logos
Typically, site logos are links
to home page.
So alt attribute of logo should
be set to the link destination
30
Icons as links/buttons
Depending on how they are added to page, icons may not give any
useful information to screen readers.
So hide the icon from screen readers, and add aria-label on link/button.
<a href="blah" aria-label="Twitter">
<i class="socmed-twitter" aria-hidden="true">
</a>
31
Alternate text strategy depends on whether they are links or not.
Here, the featured image is not a link.
Featured images
32
Featured images
33
Here, the featured image is a
link to the post.
Featured images
34
Set what you want the
alternate text to be in here,
or function will use
whatever is set in media
manager.
NB: Resizing and zooming are not the same thing.
Can your theme handle resizing?
35@coolfields
Larger text sizeNormal text size
Best practices:
• Define font sizes in em and rem - not px.
• Define breakpoints in em values
• Don't fix box heights.
Catering for text resizing
36@coolfields
Please don't do this…
<meta name="viewport" content="width=device-
width, initial-scale=1, maximum-scale=1, user-
scalable=no">
Instead, do this…
<meta name="viewport" content="width=device-
width, initial-scale=1.0">
Don't block zooming on mobiles
37@coolfields
Coolfields Consulting
Keyboard Interaction
Keyboard interaction
Important for sighted keyboard users and screen reader users:
• Anything actionable must be able to get focus - and show that it has
focus. Remember we specified this at the design stage.
• Anything actionable must be able to be actioned using appropriate
keystrokes.
• Does your dropdown navigation work with a keyboard?
39
Forms - contact, comments, etc
• Always add labels to your input fields.
• In special situations these could be hidden with screen reader text -
eg Search.
• Ensure any error messages can be accessed by screen reader users.
40
Other quick build points
• Say "No" to title attributes
• Avoid accesskey attributes
• Avoid opening new windows
without warning users - sighted
and screen reader
41
Other quick build points
• Avoid tabindex values > 0
• Avoid movement on pages,
or allow users to stop it
42
43
Pesky plugins
How plugins can break accessibility
Lightbox plugin example
44
Screen reader users know these are links, but do they
know what they are for? And that they open a new
panel?
Lightbox plugin example
45
Is alternate text
added to the large
images?
When this
lightbox opens,
focus remains
on page below
Do these icons get
keyboard focus? And
are they labelled?
Form plugin example
46
Do screen reader
users get to hear these
error messages?
Are these labels
linked to input
fields?
Slider/carousel plugin example
47
Can I stop the
slider using the
keyboard?
Can I attach
alternate text to
the images?
Do these buttons or
links label their
purpose?
Does the
carousel 'break'
if I tab into it?
Cookie warning plugin example
48
Cookie warning panel is position:fixed - can hide important links and
buttons for keyboard users.
These items are the very last items in the tab order of the page.
Frustrating for sighted keyboard users.
49
Helping your content
authors get things
right
A guide for content authors?
@coolfields
The people who add or edit the content can have a significant
impact on the accessibility of a site.
Do we just assume they know what they're doing?
A guide for content authors?
@coolfields
Maybe provide a 'cheat sheet' to help them get it right?
• Headings - importance,
hierarchy
• Link text - avoid
'Click here'
• Adding images with
alternate text, especially
if the image is a link
• Lists of items
Maybe a plugin could help?
Link with title attribute
present
Image with empty alt
attribute
Link that opens new window
Empty header
On GitHub:
https://github.com/boswall/Co
ntent-Author-Accessibility-
Preview
Now at:
https://wordpress.org/plugins/c
ontent-author-accessibility-
preview/
https://www.coolfields.co.uk/2019/04/accessibility-checklist/
The checklist
From http://a11ymemes.tumblr.com
Webaim Million site survey:
https://webaim.org/projects/million/
Thanks for listening
Any questions?
graham.armfield@coolfields.co.uk
@coolfields 55

Más contenido relacionado

Similar a How to Build an Accessible WordPress Theme

FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
Frédéric Harper
 
T2L3.doc
T2L3.docT2L3.doc
T2L3.doc
butest
 
How to manage a big scale HTML/CSS project
How to manage a big scale HTML/CSS projectHow to manage a big scale HTML/CSS project
How to manage a big scale HTML/CSS project
Renoir Boulanger
 
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In DrupalBeginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Mediacurrent
 
Kick start your career with WordPress
Kick start your career with WordPressKick start your career with WordPress
Kick start your career with WordPress
Jignasa Naik
 

Similar a How to Build an Accessible WordPress Theme (20)

FITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web DesignFITC - 2012-04-23 - Responsive Web Design
FITC - 2012-04-23 - Responsive Web Design
 
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...[DevDay2018] Embrace the challenge – working as a developer in Content Manage...
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...
 
Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014Making Your Site Printable: CSS Summit 2014
Making Your Site Printable: CSS Summit 2014
 
WordPress for Business
WordPress for Business WordPress for Business
WordPress for Business
 
Week 8 - Interactive News Editing and Producing
Week 8 - Interactive News Editing and ProducingWeek 8 - Interactive News Editing and Producing
Week 8 - Interactive News Editing and Producing
 
ًWebsite_development and design
ًWebsite_development and designًWebsite_development and design
ًWebsite_development and design
 
T2L3.doc
T2L3.docT2L3.doc
T2L3.doc
 
Dreaweaver cs5
Dreaweaver cs5Dreaweaver cs5
Dreaweaver cs5
 
How to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive WebsiteHow to Project-Manage and Implement a Responsive Website
How to Project-Manage and Implement a Responsive Website
 
How to manage a big scale HTML/CSS project
How to manage a big scale HTML/CSS projectHow to manage a big scale HTML/CSS project
How to manage a big scale HTML/CSS project
 
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In DrupalBeginner & Intermediate Guide to HTML5/CSS3 In Drupal
Beginner & Intermediate Guide to HTML5/CSS3 In Drupal
 
Accessibility With WordPress: Accessing Higher Ground 2014
Accessibility With WordPress: Accessing Higher Ground 2014Accessibility With WordPress: Accessing Higher Ground 2014
Accessibility With WordPress: Accessing Higher Ground 2014
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
 
Web Accessibility for the 21st Century
Web Accessibility for the 21st CenturyWeb Accessibility for the 21st Century
Web Accessibility for the 21st Century
 
Creating UI Marketers Won't F*Up
Creating UI Marketers Won't F*UpCreating UI Marketers Won't F*Up
Creating UI Marketers Won't F*Up
 
Responsive design with flexbox
Responsive design with flexboxResponsive design with flexbox
Responsive design with flexbox
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS Troubleshooting
 
What is Wordpress | What is HTML | Wordpress vs HTML
What is Wordpress | What is HTML | Wordpress vs HTMLWhat is Wordpress | What is HTML | Wordpress vs HTML
What is Wordpress | What is HTML | Wordpress vs HTML
 
Kick start your career with WordPress
Kick start your career with WordPressKick start your career with WordPress
Kick start your career with WordPress
 

Más de Graham Armfield

Más de Graham Armfield (20)

Useful Accessibility Tools Version 3 - Jul 2021
Useful Accessibility Tools Version 3 - Jul 2021Useful Accessibility Tools Version 3 - Jul 2021
Useful Accessibility Tools Version 3 - Jul 2021
 
So how do i know if my wordpress website is accessible - WordPress Accessibil...
So how do i know if my wordpress website is accessible - WordPress Accessibil...So how do i know if my wordpress website is accessible - WordPress Accessibil...
So how do i know if my wordpress website is accessible - WordPress Accessibil...
 
Useful Accessibility Tools - WordCamp Brighton
Useful Accessibility Tools - WordCamp BrightonUseful Accessibility Tools - WordCamp Brighton
Useful Accessibility Tools - WordCamp Brighton
 
Accessibility Hacks Version 2
Accessibility Hacks Version 2Accessibility Hacks Version 2
Accessibility Hacks Version 2
 
Accessibility Hacks version 2
Accessibility Hacks version 2Accessibility Hacks version 2
Accessibility Hacks version 2
 
Useful Accessibility Tools - WP Pompey April 2019
Useful Accessibility Tools - WP Pompey April 2019Useful Accessibility Tools - WP Pompey April 2019
Useful Accessibility Tools - WP Pompey April 2019
 
Accessibility Hacks Wordcamp Manchester October 2018
Accessibility Hacks Wordcamp Manchester October 2018Accessibility Hacks Wordcamp Manchester October 2018
Accessibility Hacks Wordcamp Manchester October 2018
 
Useful Accessibility Tools
Useful Accessibility ToolsUseful Accessibility Tools
Useful Accessibility Tools
 
Assistive technology Demo WordCamp Bristol
Assistive technology Demo WordCamp BristolAssistive technology Demo WordCamp Bristol
Assistive technology Demo WordCamp Bristol
 
Designing for Accessibility - WordCamp London 2017
Designing for Accessibility - WordCamp London 2017Designing for Accessibility - WordCamp London 2017
Designing for Accessibility - WordCamp London 2017
 
Designing for Accessibility - Front End North - September 2016
Designing for Accessibility - Front End North - September 2016Designing for Accessibility - Front End North - September 2016
Designing for Accessibility - Front End North - September 2016
 
Obscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite UsefulObscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite Useful
 
Themes Plugins and Accessibility - WordCamp London March 2015
Themes Plugins and Accessibility - WordCamp London March 2015Themes Plugins and Accessibility - WordCamp London March 2015
Themes Plugins and Accessibility - WordCamp London March 2015
 
Can WordPress help make the web more accessible - eaccess15 - Feb 2015
Can WordPress help make the web more accessible - eaccess15 - Feb 2015Can WordPress help make the web more accessible - eaccess15 - Feb 2015
Can WordPress help make the web more accessible - eaccess15 - Feb 2015
 
Wordpress and Web Accessibility Wordcamp UK 2014
Wordpress and Web Accessibility Wordcamp UK 2014Wordpress and Web Accessibility Wordcamp UK 2014
Wordpress and Web Accessibility Wordcamp UK 2014
 
So What is This Thing Called WordPress?
So What is This Thing Called WordPress?So What is This Thing Called WordPress?
So What is This Thing Called WordPress?
 
So How Do I Know if My Website is Accessible?
So How Do I Know if My Website is Accessible?So How Do I Know if My Website is Accessible?
So How Do I Know if My Website is Accessible?
 
Handling User Generated Content in WordPress
Handling User Generated Content in WordPressHandling User Generated Content in WordPress
Handling User Generated Content in WordPress
 
So, How Do I Know if my WordPress Website is Accessible?
So, How Do I Know if my WordPress Website is Accessible?So, How Do I Know if my WordPress Website is Accessible?
So, How Do I Know if my WordPress Website is Accessible?
 
Web Accessibility: What it is, Why it's important
Web Accessibility: What it is, Why it's importantWeb Accessibility: What it is, Why it's important
Web Accessibility: What it is, Why it's important
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

How to Build an Accessible WordPress Theme

  • 1. Graham Armfield Coolfields Consulting 1 How to Build an Accessible WordPress Theme
  • 2. A bit about me 2 I’m a… Web Accessibility Consultant WordPress Developer @coolfields Photo by Kari Leigh London coolfields.co.uk
  • 3. What I'm going to cover • Why accessibility is important • When to think about accessibility • Designing your theme • Building your theme @coolfields • Adding plugins • What to tell your content authors • The checklist
  • 4. Why is accessibility important? Photo by Kari Leigh London
  • 6. Why is accessibility important? The legal answer @coolfields Accessibility as a legal requirement
  • 7. When to think about accessibility? Do not leave it until last – as time goes by it becomes harder and costlier to fix… Treat it as you would any other requirement – think about it at every stage.
  • 9. Designing for accessibility Presentation slides: https://www.slideshare.net/coolfields/designing-for-accessibility- wordcamp-london-2017 WordPress TV: https://wordpress.tv/2017/05/30/graham-armfield-designing-for- accessibility/ 9
  • 11. Define focus as well as hover styles 11 Hover styles Focus styles
  • 12. Making links look like links 12@coolfields Users who are colour blind or who have poor vision may struggle to see links with no underline.
  • 13. Text justification 13 Left aligned text Can make life very difficult for dyslexics - around 8 - 10% of the population. Fully justified text
  • 15. WordPress theme review guidelines For coding standards etc: https://make.wordpress.org/themes/handbook/review/required/ But also for accessibility: https://make.wordpress.org/themes/handbook/review/accessibility/ 15
  • 16. Use semantic markup Screen readers rely on the semantics to communicate structure to users. Speech recognition software also relies on good semantics. 16
  • 17. Indicating page language Enables screen readers to voice words correctly Use lang attribute on <html> element. <html lang="en-gb"> List of language codes: http://www.metamodpro.com/browser-language-codes 17
  • 18. Heading strategy 1 Headings are used as in-page navigation by screen reader users - so very important to get this right. One top level heading <h1> per page/post - should be equivalent of page/post <title> 18
  • 19. Heading strategy 2 It's OK to start the page with other headings - eg <h2> just before primary navigation <h2 class="srt">Main navigation</h2> <nav>…</nav> <main> <h1>Meet the team</h1> 19
  • 20. Heading strategy 3 Widget headings - keep heading hierarchy sensible if you can in the widget areas Editing content - see later 20
  • 22. Landmarks Who uses landmarks in their themes? Who uses these HTML5 elements in their themes? <nav>, <main>, <header>, <footer>, <section>, etc These are all understood as landmarks, by screen readers in certain situations…
  • 23. Landmarks A way of defining discrete regions or areas of a page. For example: the banner, the navigation, main content, etc. Increasingly used by screen reader users to help them navigate around pages. Sometimes indicated by role="navigation", role="main", etc Use aria-label to give more information if required: <nav aria-label="primary">
  • 24. Landmarks <header role="banner"> <nav role="navigation"> <footer role="contentinfo"> <main role="main"> <aside role= "complementary"> <form role="search">
  • 26. Skip links 26 • Make it the first link in page. • Visible when it gets focus. • Should point at <main id="main">. <a href="#main">Skip to content</a> These are really useful for sighted keyboard users and screen reader users.
  • 27. Are your blog links meaningful? 27 1 1 2 3 4 5 6 7 2 3 4 5 6 7
  • 28. Pagination links By default these links are just numbers - no context for screen reader users. So, add some screen reader text to give context. But how do you do that?
  • 30. Logos Typically, site logos are links to home page. So alt attribute of logo should be set to the link destination 30
  • 31. Icons as links/buttons Depending on how they are added to page, icons may not give any useful information to screen readers. So hide the icon from screen readers, and add aria-label on link/button. <a href="blah" aria-label="Twitter"> <i class="socmed-twitter" aria-hidden="true"> </a> 31
  • 32. Alternate text strategy depends on whether they are links or not. Here, the featured image is not a link. Featured images 32
  • 33. Featured images 33 Here, the featured image is a link to the post.
  • 34. Featured images 34 Set what you want the alternate text to be in here, or function will use whatever is set in media manager.
  • 35. NB: Resizing and zooming are not the same thing. Can your theme handle resizing? 35@coolfields Larger text sizeNormal text size
  • 36. Best practices: • Define font sizes in em and rem - not px. • Define breakpoints in em values • Don't fix box heights. Catering for text resizing 36@coolfields
  • 37. Please don't do this… <meta name="viewport" content="width=device- width, initial-scale=1, maximum-scale=1, user- scalable=no"> Instead, do this… <meta name="viewport" content="width=device- width, initial-scale=1.0"> Don't block zooming on mobiles 37@coolfields
  • 39. Keyboard interaction Important for sighted keyboard users and screen reader users: • Anything actionable must be able to get focus - and show that it has focus. Remember we specified this at the design stage. • Anything actionable must be able to be actioned using appropriate keystrokes. • Does your dropdown navigation work with a keyboard? 39
  • 40. Forms - contact, comments, etc • Always add labels to your input fields. • In special situations these could be hidden with screen reader text - eg Search. • Ensure any error messages can be accessed by screen reader users. 40
  • 41. Other quick build points • Say "No" to title attributes • Avoid accesskey attributes • Avoid opening new windows without warning users - sighted and screen reader 41
  • 42. Other quick build points • Avoid tabindex values > 0 • Avoid movement on pages, or allow users to stop it 42
  • 43. 43 Pesky plugins How plugins can break accessibility
  • 44. Lightbox plugin example 44 Screen reader users know these are links, but do they know what they are for? And that they open a new panel?
  • 45. Lightbox plugin example 45 Is alternate text added to the large images? When this lightbox opens, focus remains on page below Do these icons get keyboard focus? And are they labelled?
  • 46. Form plugin example 46 Do screen reader users get to hear these error messages? Are these labels linked to input fields?
  • 47. Slider/carousel plugin example 47 Can I stop the slider using the keyboard? Can I attach alternate text to the images? Do these buttons or links label their purpose? Does the carousel 'break' if I tab into it?
  • 48. Cookie warning plugin example 48 Cookie warning panel is position:fixed - can hide important links and buttons for keyboard users. These items are the very last items in the tab order of the page. Frustrating for sighted keyboard users.
  • 50. A guide for content authors? @coolfields The people who add or edit the content can have a significant impact on the accessibility of a site. Do we just assume they know what they're doing?
  • 51. A guide for content authors? @coolfields Maybe provide a 'cheat sheet' to help them get it right? • Headings - importance, hierarchy • Link text - avoid 'Click here' • Adding images with alternate text, especially if the image is a link • Lists of items
  • 52. Maybe a plugin could help? Link with title attribute present Image with empty alt attribute Link that opens new window Empty header On GitHub: https://github.com/boswall/Co ntent-Author-Accessibility- Preview Now at: https://wordpress.org/plugins/c ontent-author-accessibility- preview/
  • 54. From http://a11ymemes.tumblr.com Webaim Million site survey: https://webaim.org/projects/million/
  • 55. Thanks for listening Any questions? graham.armfield@coolfields.co.uk @coolfields 55

Notas del editor

  1. I work with organisations to help them improve the accessibility of their digital offerings. Do accessibility testing and guide designers and developers in solutions to the issues found. WordPress developer – have built many accessible websites using WordPress. I've delivered presentations to many WordCamps inc London, Sheffield, Edinburgh, Lancaster, Manchester, Bournemouth – and a number of WordPress meetup groups. This is me in Sheffield a couple of years ago. The presentation is called So, How Do I Know if My WordPress Website is Accessible and focusses on easy accessibility tests that you can do on your own WordPress website. If you've not seen me do that one – and I know that some of you have - the slides are still on Slideshare , and the deck has been viewed over 12,000 times now.
  2. - WP theme review guidelines
  3. Get some overview stats to put in here…
  4. Similar in a way to designing for mobile.
  5. Similar in a way to designing for mobile.