SlideShare a Scribd company logo
Do your best to make
your webpage accessible
Boštjan Kovač - @boshtian
THANKS!
@drupaldevdays #drupaldevdays
ABOUT THE SPEAKER
● Boštjan Kovač
● Technical director @
● @boshtian on drupal.org, Twitter …
@drupaldevdays #drupaldevdays
● Working on couple of projects where
accessibility was a demand
● Went on Eric Eggert’s session in Drupal
Camp Vienna in 2015
● Really figured out how ignorant I was
● I don’t want to be ignorant
INSPIRATION AND MOTIVATION
@drupaldevdays #drupaldevdays
TODAY WEBPAGES ARE
@drupaldevdays #drupaldevdays
AWESOME UI
@drupaldevdays #drupaldevdays
BEAUTIFUL DESIGN
@drupaldevdays #drupaldevdays
LIGHTNING SPEED
@drupaldevdays #drupaldevdays
WHAT ABOUT ACCESSIBILITY?
@drupaldevdays #drupaldevdays
SO, CAN YOU DO IT?
@drupaldevdays #drupaldevdays
@drupaldevdays #drupaldevdays
FACTS
@drupaldevdays #drupaldevdays
15%
of the world's population (>1 billion of people), have some form of disability.
– WHO, November 2016
110 - 190
million adults have significant difficulties in functioning.
– WHO, November 2016
8%
of men have some form of color blindness.
– NEI (National eye institute), February 2015
● Broken arm
● Lost eyeglasses
● Looking a video in a noisy room
SITUATIONAL DISABILITIES
@drupaldevdays #drupaldevdays
@drupaldevdays #drupaldevdays
● Responsive webpages for mobile devices
● Multi-lingual webpages
● Google is the biggest blind user of the
web
THIS IS ALSO ACCESSIBILITY
@drupaldevdays #drupaldevdays
● Zoom
● Screen readers
● Browser configuration
● Captions
● Braile keyboard
● Mouth mouse
ASSISTIVE TECHNOLOGY
@drupaldevdays #drupaldevdays
“The power of the Web is in its universality.
Access by everyone regardless of disability is an
essential aspect.”
- Tim Berners-Lee, W3C Director and inventor of the World Wide Web
@drupaldevdays #drupaldevdays
● Designing for web accessibility
● Creating content for web accessibility
● Developing for web accessibility
HOW TO START?
@drupaldevdays #drupaldevdays
● Guidelines for creating accessible
webpages
● Developed by WAI under W3C
● Three levels of conformance:
○ Level A
○ Level AA
○ Level AAA
WCAG
@drupaldevdays #drupaldevdays
● Level A
○ Provide text alternatives for non-text content
○ Provide a ‘Skip to Content’ link
○ Accessible by keyboard only (unplug mouse)
○ Logical order
○ Don’t trap keyboard users
○ Helpful and clear page title
○ Every link’s purpose is clear from its context
WCAG 2.0
@drupaldevdays #drupaldevdays
● Level AA
○ Contrast ratio between text and background is
at least 4.5:1 (talk with the designers)
○ Text can be resized to 200% without loss of
content or function
○ Keyboard focus is visible and clear
○ Don’t use images of text
○ Use menus consistently
WCAG 2.0
@drupaldevdays #drupaldevdays
● Level AAA
○ Contrast ratio between text and background is
at least 7:1 (again, for designers)
○ Offer users a range of presentation options
○ Don’t interrupt users
○ Don’t change elements until users ask
○ Provide a text alternative to videos
WCAG 2.0
@drupaldevdays #drupaldevdays
● Public Working Draft
(comment by 31 March 2017)
● Attention being given to three areas
○ Small-screen and touch mobile devices
○ Users with low vision
○ Users with cognitive or learning disabilities
WCAG 2.1
@drupaldevdays #drupaldevdays
● 3 Succes Criterias formally accepted
● 25 other Success Criterias suggestions
● https://www.w3.org/TR/WCAG21/
WHAT’S NEW IN WCAG 2.1
@drupaldevdays #drupaldevdays
SIMPLE EXAMPLES I LIKE TO SHOW
@drupaldevdays #drupaldevdays
SCREEN READER EXAMPLES
@drupaldevdays #drupaldevdays
<button><i class="fa fa-pencil fa-2x"></i></button>
<button><i class="fa fa-remove fa-2x"></i></button>
<button title="Edit"><i class="fa fa-pencil fa-2x"></i></button>
<button title="Remove"><i class="fa fa-remove fa-2x"></i></button>
SCREEN READER EXAMPLES
@drupaldevdays #drupaldevdays
<button title="Edit"><i class="fa fa-pencil-broken fa-2x"></i></button>
<button title="Delete"><i class="fa fa-delete-broken fa-2x"></i></button>
SCREEN READER EXAMPLES
@drupaldevdays #drupaldevdays
<button title="Edit"><i class="fa fa-pencil fa-2x"></i> Edit</button>
<button title="Edit"><i class="fa fa-pencil-broken fa-2x"></i> Edit</button>
SCREEN READER EXAMPLES
@drupaldevdays #drupaldevdays
<img src="images/marvin.jpg" alt="Marvin the robot">
<a href="print.html">
<img src="images/printer.png" alt="Print document">
</a>
Informative images
<img src="images/agiledrop.png" alt="Agiledrop logo"></a>
Images of text
Functional images
DRUPAL & ACCESSIBILITY
@drupaldevdays #drupaldevdays
● HTML5 tags <article>, <section>,
<header>, <aside>, <mark> and <nav>
● WAI-ARIA markup out of the box
○ <role=”main”> for main content
○ <role=”complementary”> for sidebars
HTML5 & IMPROVED SEMANTIC
@drupaldevdays #drupaldevdays
● ARIA properties:
aria-required="true", aria-live, aria-label,
aria-labelledby, aria-describedby
● ARIA states:
aria-disabled="true", aria-checked,
aria-invalid
HTML5 & IMPROVED SEMANTIC
@drupaldevdays #drupaldevdays
REMEMBER!
Google likes semantic markup.
HTML5 & Improved Semantics
@drupaldevdays #drupaldevdays
● This is more for designers
● Drupal core developers do care
COLOR CONTRAST
@drupaldevdays #drupaldevdays
● Alternative text (alt) required by default
● User image also has alt text required
IMAGES
@drupaldevdays #drupaldevdays
● Drupal.announce() is now part of core
● Drupal.tabbingManager is also in core
● Fieldsets for radios and checkboxes in
Form API
Other things that improve accessibility
@drupaldevdays #drupaldevdays
● jQuery UI used for autocomplete and
dialogs
● Inline Form Errors added in core as an
experimental module
Other things that improve accessibility
@drupaldevdays #drupaldevdays
MOST COMMON MISTAKES DEVELOPERS MAKE
@drupaldevdays #drupaldevdays
MARKUP
@drupaldevdays #drupaldevdays
<header id="header" class="header" role="banner" aria-label="{{ 'Site header'|t }}">
<div class="section layout-container clearfix">
{{ page.secondary_menu }}
{{ page.header }}
{{ page.primary_menu }}
</div>
</header>
Bartik theme (page.html.twig)
MARKUP
@drupaldevdays #drupaldevdays
<header role="banner">
{{ page.header }}
</header>
Classy theme (page.html.twig)
REMEMBER THEM?
@drupaldevdays #drupaldevdays
MARKUP
@drupaldevdays #drupaldevdays
<div class="main-header">
<div class="col-sm-12 clearfix">
{{ page.header }}
</div>
</div>
Ignorant theme
MARKUP
@drupaldevdays #drupaldevdays
{% if page.sidebar_first %}
<div id="sidebar-first" class="column sidebar">
<aside class="section" role="complementary">
{{ page.sidebar_first }}
</aside>
</div>
{% endif %}
Bartik theme (page.html.twig)
MARKUP
@drupaldevdays #drupaldevdays
{% if page.sidebar_first %}
<aside class="layout-sidebar-first" role="complementary">
{{ page.sidebar_first }}
</aside>
{% endif %}
Classy theme (page.html.twig)
MARKUP
@drupaldevdays #drupaldevdays
{% if page.sidebar_first %}
<div class="sidebar-first">
{{ page.sidebar_first }}
</div>
{% endif %}
Ignorant theme
SKIP LINK
@drupaldevdays #drupaldevdays
<a href="#main-content" class="visually-hidden focusable">
{{ 'Skip to main content'|t }}
</a>
Don’t remove this (html.html.twig)
<a id="main-content" tabindex="-1"></a>
And this (page.html.twig)
IMAGES
@drupaldevdays #drupaldevdays
<img class="special-class" src={{ file_url(node.field_test_image.entity.fileuri) }}>
Writing own markup for fields
● So many better ways of doing this
● Create your own twig file, preprocess ...
FORMS
● Form API will do most of the work for you
so use it!
● Use #title property on every element
● Use #title_display if you want to hide it
from display
● #description property is also highly
advisable
@drupaldevdays #drupaldevdays
FORMS
● Use fieldsets to group elements which
belong together logically
○ Radio buttons, Checkboxes, Date elements
● Giving initial focus fo input field is almost
always a bad thing to do
@drupaldevdays #drupaldevdays
AJAX
● Dynamic changes on the page are tricky
for screenreaders
● Also scrolling can add additional content
● Use Drupal.announce() in Drupal 8
@drupaldevdays #drupaldevdays
Drupal.announce()
@drupaldevdays #drupaldevdays
$('#search-list')
.on('itemInsert', function (event, data) {
// Insert the new items.
$(data.container.el).append(data.items.el);
// Announce the change to the page contents.
Drupal.announce(Drupal.t('@count items added to @container',
{'@count': data.items.length, '@container': data.container.title}
));
});
Example from announce.js
CSS
● Help yourself
● Example: use role attributes for styling
@drupaldevdays #drupaldevdays
[role*=banner] a {
border-bottom: none;
}
Bartik theme
CSS
@drupaldevdays #drupaldevdays
[role*=complementary] h2 {
font-size: 2rem;
color: #3b3b3b;
border-bottom: 1px solid #d6d6d6;
}
H2 in sidebar
CSS
@drupaldevdays #drupaldevdays
[role*=main] p {
color: #3b3b3b;
}
Paragraph in main content
DRUPAL CONTRIB MODULES
@drupaldevdays #drupaldevdays
BLOCK ARIA LANDMARK ROLES
● Drupal 7 & Drupal 8
● Extra block setting to add ARIA role
@drupaldevdays #drupaldevdays
<div id="block-tags" class="..."
role="contentinfo">
...
</div>
SWITCHTHEME
● Only Drupal 7
● New block available to switch theme
● Custom links by using url parameter
@drupaldevdays #drupaldevdays
<a href="http://d7.dev/?theme=garland" … >
Switch to Garland theme
</a>
HIGH CONTRAST
● Drupal 7 & Drupal 8
● New block available to switch color scheme
● Toggle high contrast after skip link (D7 only)
@drupaldevdays #drupaldevdays
HIGH CONTRAST
@drupaldevdays #drupaldevdays
ACCESSIBLE FORMS
● Only drupal 7 (Drupal 8 actually has most of
this out of the box)
● It adds:
○ required attribute to required fields
○ required label to required fields (instead of asterix
*)
○ aria-invalid to form fields with errors
@drupaldevdays #drupaldevdays
OTHER TOOLS TO HELP YOU OUT
@drupaldevdays #drupaldevdays
BROWSER EXTENSIONS
● Accessibility Developer Tools (Chrome)
@drupaldevdays #drupaldevdays
BROWSER EXTENSIONS
● Siteimprove Accessibility Checker (Chrome)
@drupaldevdays #drupaldevdays
BROWSER EXTENSIONS
● WAVE Accessibility Extension
(Chrome & Firefox)
● aXe (Chrome)
● WCAG Contrast checker (Firefox) or Color
Contrast Analyzer (Chrome)
● Web Accessibility Toolbar for IE
@drupaldevdays #drupaldevdays
WEB-BASED TOOLS
● https://achecker.ca/checker/
● http://www.508checker.com/
● http://www.cynthiasays.com/
● http://ffoodd.github.io/a11y.css/
@drupaldevdays #drupaldevdays
BOOK(S)
● https://www.wuhcag.com/wcag/
@drupaldevdays #drupaldevdays
RESOURCES
● How people with disabilities use web:
○ https://www.w3.org/WAI/intro/people-use-web
● Tips for getting started:
○ https://www.w3.org/WAI/gettingstarted/tips/
● Tutorials for different elements:
○ https://www.w3.org/WAI/tutorials/
● Before and after demo:
○ https://www.w3.org/WAI/demos/bad/
@drupaldevdays #drupaldevdays
ACCESSIBILITY IS NOT AN AFTERTHOUGHT
@drupaldevdays #drupaldevdays
MAKES YOUR WEBSITE EASIER TO UNDERSTAND
(to people and to search engines)
@drupaldevdays #drupaldevdays
ACCESSIBILITY IS AN OPPORTUNITY
@drupaldevdays #drupaldevdays
THANK YOU
@drupaldevdays #drupaldevdays
BOŠTJAN KOVAČ
@boshtian / bostjan.kovac@agiledrop.com
THANKS!
@drupaldevdays #drupaldevdays

More Related Content

PPTX
Drupal core indeas - Andy Postnikov
PPT
The State of Drupal 8
PDF
Headless Drupal 8
PDF
ZS Drupal meetup - Drupal 8 CHALLENGES AND HANDS ON
PDF
Drupal for beginners - Global Training Days - Cebu 2016
PDF
HeadLess Drupal
ODP
Drupal
PDF
Choosing Drupal as your Content Management Framework
Drupal core indeas - Andy Postnikov
The State of Drupal 8
Headless Drupal 8
ZS Drupal meetup - Drupal 8 CHALLENGES AND HANDS ON
Drupal for beginners - Global Training Days - Cebu 2016
HeadLess Drupal
Drupal
Choosing Drupal as your Content Management Framework

Similar to Do your best to make your webpage accessible (20)

PDF
Drupal south 2014 - bootstrap vs foundation deathmatch - v.1.1
PPTX
Web Accessibility in Drupal 8
PPTX
DrupalCon Austin 2014 Review
PDF
Drupal migrations in 2018 - presentation at DrupalCon in Nashville
PDF
Drupal Association Q3 Supporter Update
PDF
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
PDF
Spark: Authoring Experience++ in Drupal 7, 8, and Beyond
PDF
[Srijan Wednesday Webinars] Breaking Limitations using Drupal 8
PDF
Ottawa Drupalcamp 2024 Keynote: Chart Your Drupal Journey
PDF
Responsive testing in Drupal - Drupal Developer Days
PDF
Starting a Drupal 8 Project? Let’s do a Technical Discovery - DrupalConAsia 2...
PDF
Decoupled drupal DcRuhr
PPTX
Advantages of using drupal 8
PPTX
Backend accessible
PDF
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
PPTX
Drupal content editing ux
PDF
Forensic Theming - DrupalCon London
PPTX
Backing yourself into an Accessible Corner
PPTX
Our encounter with d8
Drupal south 2014 - bootstrap vs foundation deathmatch - v.1.1
Web Accessibility in Drupal 8
DrupalCon Austin 2014 Review
Drupal migrations in 2018 - presentation at DrupalCon in Nashville
Drupal Association Q3 Supporter Update
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
Spark: Authoring Experience++ in Drupal 7, 8, and Beyond
[Srijan Wednesday Webinars] Breaking Limitations using Drupal 8
Ottawa Drupalcamp 2024 Keynote: Chart Your Drupal Journey
Responsive testing in Drupal - Drupal Developer Days
Starting a Drupal 8 Project? Let’s do a Technical Discovery - DrupalConAsia 2...
Decoupled drupal DcRuhr
Advantages of using drupal 8
Backend accessible
Drupal7 Theming session on the occassion of Drupal7 release party in Delhi NCR
Drupal content editing ux
Forensic Theming - DrupalCon London
Backing yourself into an Accessible Corner
Our encounter with d8
Ad

Recently uploaded (20)

PPT
12 Things That Make People Trust a Website Instantly
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PDF
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
PPTX
newyork.pptxirantrafgshenepalchinachinane
PPTX
t_and_OpenAI_Combined_two_pressentations
PPTX
Layers_of_the_Earth_Grade7.pptx class by
PPTX
Slides PPTX: World Game (s): Eco Economic Epochs.pptx
PPT
Ethics in Information System - Management Information System
PDF
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
PDF
Introduction to the IoT system, how the IoT system works
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
Database Information System - Management Information System
PDF
Containerization lab dddddddddddddddmanual.pdf
PPTX
E -tech empowerment technologies PowerPoint
PPTX
Cyber Hygine IN organizations in MSME or
PPTX
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PDF
The Evolution of Traditional to New Media .pdf
PDF
Exploring The Internet Of Things(IOT).ppt
PDF
Exploring VPS Hosting Trends for SMBs in 2025
12 Things That Make People Trust a Website Instantly
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
newyork.pptxirantrafgshenepalchinachinane
t_and_OpenAI_Combined_two_pressentations
Layers_of_the_Earth_Grade7.pptx class by
Slides PPTX: World Game (s): Eco Economic Epochs.pptx
Ethics in Information System - Management Information System
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
Introduction to the IoT system, how the IoT system works
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Database Information System - Management Information System
Containerization lab dddddddddddddddmanual.pdf
E -tech empowerment technologies PowerPoint
Cyber Hygine IN organizations in MSME or
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
The Evolution of Traditional to New Media .pdf
Exploring The Internet Of Things(IOT).ppt
Exploring VPS Hosting Trends for SMBs in 2025
Ad

Do your best to make your webpage accessible