Front End Frameworks - are they accessible

Russ Weakley
Russ WeakleyUX/UI developer at Max Design
Front
Frameworks
ARE THEY ACCESSIBLE?
End
Over the last 5 years or so there
has been a rapid rise in the use of
HTML/CSS and/or JavaScript
frameworks.
Developers often choose to use
frameworks as they have many
benefits:
• They save re-invention
• They are ready-to-use
• They provide cross browser stability
• They allow quick prototyping
• They promote consistency
However, this reliance on
frameworks has some downsides.
1. Many developers who have
grown up only using frameworks
have a total lack of understanding
about the fundamentals of HTML
such as valid and semantic
markup.
This is of great concern as
semantic markup is one of the
core principles of an accessible
web.
2. There is a widespread
assumption that most of these
frameworks are “accessible out of
the box” and don’t need any
further work.
3. Even when frameworks do have
inbuilt accessibility, many
developers do not understand how
to implement these accessibility
features.
We’re now going to look at some
examples using the Bootstrap
Framework.
(And this is not to say that Bootstrap is inaccessible)
Bad
buttons
Front End Frameworks - are they accessible
The Bootstrap button classes allow
developers to make any element
appear like a button even if these
elements have no semantic
meaning.
<span class="btn btn-default" role="button">
Button using a span
</span>
<a class="btn btn-default" href="#"
role="button">
Button using a link
</a>
<button class="btn btn-default btn-lg"
type="button">
Button using a button
</button>
Some developers have a tendency
to throw the role=“button”
attribute onto span and link
elements, assuming that this
makes it alright.
<span class="btn btn-default" role="button">
Button using a span
</span>
<a class="btn btn-default" href="#"
role="button">
Button using a link
</a>
<button class="btn btn-default btn-lg"
type="button">
Button using a button
</button>
What’s the issue?
Using button classes on <span>
elements can cause all sorts of
issues for Assistive Technologies.
These “fake” buttons are
announced as buttons when
reading through the page, but they
are sometimes not actionable.
Solution:
Avoid applying button classes to
non-semantic elements such as
<span> elements.
Links or
buttons?
Front End Frameworks - are they accessible
When using these button classes,
developers are often confused
about when to use a link or a
button as the base element.
What’s the issue?
When the incorrect element is
used, this can confuse Assistive
Technology users who expect links
and buttons to behave in specific
ways.
Solution:
Use a link when you want to send
the user to a new location (visit a
new page).
Use a button when you want the
user to perform some sort of action
(click, submit, open etc.)
Headings
Front End Frameworks - are they accessible
Bootstrap allows developers to add
classes to any elements and make
them appear like a heading.
This is quite common in complex
layouts, such as application
interfaces, where developers
ignore heading hierarchy and
apply “visual headings” to span or
paragraph elements instead.
<span class="h1">
Heading here
</span>
<p class="h1">
Heading here
</p>
What’s the issue?
Many Assistive Technologies rely
on heading levels to move around
pages quickly. Heading levels
also allow users to understand the
importance and hierarchy of
information.
Solution:
Where possible, avoid styling non-
heading elements to appear like
headings if a heading would be
more appropriate.
Solution:
Even in complex layouts, try to
maintain a basic heading
hierarchy to allow users to
understand content flow and
importance.
Badges
Front End Frameworks - are they accessible
Badges allow developers to insert
specially-styled number values
into links, buttons and other
elements.
<button class="btn btn-primary">
A button with a badge
<span class="badge">4</span>
</button>
These numbers are often used to
indicate a dynamic number value
such as the number of messages
in an inbox.
For sighted users, there is often
some context associated with
these badge numbers - visual
clues that let users know what
these numbers mean.
What’s the issue?
For Screen Reader users, these
badge numbers can sometimes be
confusing as they seem to be
random numbers that do not
have any additional context.
Solution:
Try to provide some additional
context for Screen Reader users,
such as additional hidden
information.
<button class="btn btn-primary">
A button with a badge
<span class="badge">
4
<span class="sr-only">
Messages
</span>
</span>
</button>
Dropdowns
Front End Frameworks - are they accessible
Front End Frameworks - are they accessible
<div class="dropdown">
<button id="dropdownMenu1" data-
toggle="dropdown" aria-haspopup="true" aria-
expanded="true">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-
labelledby="dropdownMenu1">
<li><a href="#">Action</a></li>
<li><a href="#">Another</a></li>
<li><a href="#">Something</a></li>
<li><a href="#">Separated</a></li>
</ul>
</div>
The Bootstrap dropdown module
allows developers to use
dropdown functions attached to
button elements.
These dropdowns can present a
wide range of issues for Screen
Reader and Keyboard-only users.
What’s the issue?
Problem 1:
For Screen Reader users, there is
often no assistance given to
explain what they are being asked
to do (such as choose from a
range of options) when they arrive
at the button.
Solution:
Provide some additional context
inside the button so Screen Reader
users understand the purpose of
the dropdown.
<div class="dropdown">
<button id="dropdownMenu1" data-
toggle="dropdown" aria-haspopup="true" aria-
expanded="true">
Dropdown
<span class=“caret"></span>
<span class="sr-only">
Additonal information
</span>
</button>
</div>
What’s the issue?
Problem 2:
These elements are announced as
buttons, so Screen Reader users
often assume these are action
orientated.
What’s the issue?
However, when these buttons are
activated, Screen Reader users are
then presented with silence. There
is nothing to tell them that the
dropdown has now visually opened
and options are now available.
Solution:
When the button is activated, focus
can be shifted to the list so that the
list is announced.
What’s the issue?
Problem 3:
For keyboard-only users, these
dropdowns look similar to select
menus, however the dropdown
options cannot be accessed by
standard select menu keystrokes -
like the ARROW keys.
Solution:
Possibly add ARROW key
functionality to these elements so
they can be accessed using the
ARROW keys as well?
What’s the issue?
Problem 4:
When Keyboard-only users
activate the dropdown, then tab
through the dropdown, the
dropdown remains “open” even
after they leave. These dropdowns
only close via the button element.
Solution:
Add functionality that closes the
dropdown when users tab out of
the dropdown options.
What’s the issue?
Problem 5:
One problem for ALL users is that
when users choose an item from
the dropdown list, this choice is not
reflected in the button. So, there is
no feedback for users as to what
choice they have made.
Solution:
This could possibly be resolved by
changing the button value using JS
and displaying the choice the user
has made.
Popovers
Front End Frameworks - are they accessible
Popovers are often used by
developers who want to provide
extra information to elements.
These are similar to tooltips but
often have much more detailed, on
often more important, information.
These popovers can be triggered
via focus, hover or click events.
Unfortunately, the bulk of the
popover information is added via
the data-content attribute.
Popover titles are added via the
title attribute.
<button type="button" class="btn btn-primary
btn-lg" data-container="body" data-
toggle="popover" title="Popover title" data-
content="Popover content">
Popover
</button>
What’s the issue?
The popover content is often not
available to Screen Reader
users.
Solution:
This information could be added in
a different location in the page
(possibly hidden), and linked to the
popover element using the aria-
describedby attribute.
<button type="button" aria-
describedby="popover1" class="btn btn-primary
btn-lg" data-container="body" data-
toggle="popover" title="Popover title" data-
content="Popover content">
Popover
</button>
<p id="popover1">
Popover content
</p>
Modals
Front End Frameworks - are they accessible
While Bootstrap modals are quite
accessible, many other modals in
frameworks are far less accessible.
Some common issues include:
What’s the issue?
Problem 1:
Some modals allow TAB keystrokes
to proceed outside the modal (into
the page behind). This can be
extremely confusing for both
Screen Reader and Keyboard-only
users.
Solution:
Keystrokes such as the TAB
keystroke should be trapped inside
the modal so that users cannot
TAB onto the the page below.
What’s the issue?
Problem 2:
Some modals failing announce the
modal purpose when the modal is
fired.This can be confusing for
Screen Reader users who may not
know that a modal has been fired,
or the purpose of the modal.
Solution:
Part 1:
Modals should be announced
using the role and aria-labelledby
attributes.
<div class="modal fade" id="myModal"
tabindex="-1" role="dialog" aria-
labelledby="myModalLabel">
<h4 id="myModalLabel">
Modal title
</h4>
</div>
Solution:
Part 2:
The aria-labelledby attribute should
be linked to relevant content such
as the modal heading via the ID
attribute.
<div class="modal fade" id="myModal"
tabindex="-1" role="dialog" aria-
labelledby="myModalLabel">
<h4 id="myModalLabel">
Modal title
</h4>
</div>
What’s the issue?
Problem 3:
Some modals don’t provide
descriptive information about
closing the modal. This can be
confusing for Screen Reader users
who may not understand how to
close/escape the modal.
Solution:
Modal close buttons should be
placed first in tab order, and
provide clear instructions as to
what the purpose is.
Copy &
paste
Bootstrap provides a range of
ARIA attributes with some of the
more complex modules such as
dropdowns and modals - to make
them more accessible.
However, some developers simply
copy and paste the Bootstrap
example modules and do not edit
the ARIA attributes.
This can mean that ARIA attributes
point to non-existent elements,
or to the wrong elements.
What’s the issue?
This can sometimes confuse
Screen Reader users as they are
provided with incorrect or
inaccurate labels for elements.
Solution:
Make sure developers understand
what these ARIA attributes do and
that they must be unique and
correct for each instance of the
module.
Repeating
content
Bootstrap, like most frameworks,
provides developers with powerful
class names that allow developers
to adjust the column layout at
different screen sizes.
This means a layout could appear
as four columns at wide screen,
two columns at medium screen
and one column at extra-small.
<div class="col-xs-12 col-6-md col-3-lg">
Column1
</div>
<div class="col-xs-12 col-6-md col-3-lg">
Column2
</div>
<div class="col-xs-12 col-6-md col-3-lg">
Column3
</div>
<div class="col-xs-12 col-6-md col-3-lg">
Column4
</div>
Column1 Column2 Column3 Column4
Column1 Column2
Column3 Column4
Column1
Column2
Column3
Column4
There are also classes that allow
developers to hide chunks of
content at different screen sizes.
<div class="hidden-xs col-6-md col-3-lg">
Hidden at XS
</div>
Unfortunately, these “hidden-”
classes allow developers to add
two sets of content into the
layout.
For example, the layout may have
complex information presented
at wide screen, and a simplified
version of the same content
presented at small screen.
<div class="hidden-xs col-6-md col-3-lg">
Wide screen content
</div>
<div class="hidden-sm hidden-md hidden-lg">
Narrow screen content
</div>
What’s the issue?
For Screen Reader users, this
content is announced twice, in two
slightly different forms, which can
be extremely confusing.
Solution:
Try to use other methods to provide
modified content for different
screen sizes - even modifying
within the one block of content if
needed.
<h2>
Heading
<span class="hidden-xs">
with additional info
</span>
</h2>
<p>
Paragraph
<span class="hidden-xs">
with additional info
</span>
</p>
Conclusion
Developers often have a tough job.
They are being asked to develop
sites and applications at an ever-
increasing speed.
They are also being asked to learn
new technologies at an ever
increasing rate.
So, it is often hard to focus on
things that may seem non-critical -
like accessibility.
However, in many cases
accessibility could be included in
the development cycle without too
much additional work.
Developers need to be made
aware of the accessibility
features that are available in
many frameworks.
They also need to understand how
these inbuilt features work - how to
use them and not break them.
And finally, they need to know
where these accessibility
features fall short, and additional
work may be needed.
How? Well, it is the job of anyone
who is passionate about
accessibility - to help spread the
word.
Like you!
Russ Weakley
Max Design
Site: maxdesign.com.au
Twitter: twitter.com/russmaxdesign
Slideshare: slideshare.net/maxdesign
Linkedin: linkedin.com/in/russweakley
1 of 110

Recommended

Building accessible web components without tears by
Building accessible web components without tearsBuilding accessible web components without tears
Building accessible web components without tearsRuss Weakley
6.1K views260 slides
aria-live: the good, the bad and the ugly by
aria-live: the good, the bad and the uglyaria-live: the good, the bad and the ugly
aria-live: the good, the bad and the uglyRuss Weakley
17.9K views145 slides
Building Accessible Web Components by
Building Accessible Web ComponentsBuilding Accessible Web Components
Building Accessible Web ComponentsRuss Weakley
1.9K views258 slides
Accessible modal windows by
Accessible modal windowsAccessible modal windows
Accessible modal windowsRuss Weakley
9.3K views188 slides
Creating Acessible floating labels by
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labelsRuss Weakley
2.8K views138 slides
What are accessible names and why should you care? by
What are accessible names and why should you care?What are accessible names and why should you care?
What are accessible names and why should you care?Russ Weakley
1.4K views175 slides

More Related Content

What's hot

Accessible states in Design Systems by
Accessible states in Design SystemsAccessible states in Design Systems
Accessible states in Design SystemsRuss Weakley
1.3K views168 slides
Android app development guide for freshers by ace web academy by
Android app development guide for freshers  by ace web academyAndroid app development guide for freshers  by ace web academy
Android app development guide for freshers by ace web academyAce Web Academy -Career Development Center
220 views15 slides
Wp quality bar tedy by
Wp quality bar   tedyWp quality bar   tedy
Wp quality bar tedyAgate Studio
546 views33 slides
Vodafone 360-Open Heuristic Evaluation by
Vodafone 360-Open Heuristic EvaluationVodafone 360-Open Heuristic Evaluation
Vodafone 360-Open Heuristic EvaluationJames Griffin
1.7K views29 slides
Force com getting_started_trial by
Force com getting_started_trialForce com getting_started_trial
Force com getting_started_trialronmechling
949 views24 slides
Introduction to facebook platform by
Introduction to facebook platformIntroduction to facebook platform
Introduction to facebook platformVenkatesh Narayanan
555 views38 slides

What's hot(20)

Accessible states in Design Systems by Russ Weakley
Accessible states in Design SystemsAccessible states in Design Systems
Accessible states in Design Systems
Russ Weakley1.3K views
Vodafone 360-Open Heuristic Evaluation by James Griffin
Vodafone 360-Open Heuristic EvaluationVodafone 360-Open Heuristic Evaluation
Vodafone 360-Open Heuristic Evaluation
James Griffin1.7K views
Force com getting_started_trial by ronmechling
Force com getting_started_trialForce com getting_started_trial
Force com getting_started_trial
ronmechling949 views
Lundquist final project storyboard 2 by werlocka
Lundquist final project storyboard 2Lundquist final project storyboard 2
Lundquist final project storyboard 2
werlocka738 views
Creating a content managed facebook app by OS-Cubed, Inc.
Creating a content managed facebook appCreating a content managed facebook app
Creating a content managed facebook app
OS-Cubed, Inc.2.7K views
How Usable is Wordpress? by nicolibrarian
How Usable is Wordpress?How Usable is Wordpress?
How Usable is Wordpress?
nicolibrarian252 views
EASI Webinar: Twitter And Web Accessibility by Dennis Lembree
EASI Webinar: Twitter And Web AccessibilityEASI Webinar: Twitter And Web Accessibility
EASI Webinar: Twitter And Web Accessibility
Dennis Lembree1.4K views
Ext Js In Action January 2010 (Meap Edition) by Goran Kljajic
Ext Js In Action January 2010 (Meap Edition)Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)
Goran Kljajic368 views
Abap sap 101_beginners_2_04 by IT
Abap sap 101_beginners_2_04Abap sap 101_beginners_2_04
Abap sap 101_beginners_2_04
IT 1.7K views
Sap short cuts by Rajesh Dhan
Sap short cutsSap short cuts
Sap short cuts
Rajesh Dhan2.9K views
Tat learning applications en by Toni Setyawan
Tat learning applications enTat learning applications en
Tat learning applications en
Toni Setyawan808 views
A Comprehensive Guideline for Designing Most Efficient Web Forms: On Structur... by Katy Slemon
A Comprehensive Guideline for Designing Most Efficient Web Forms: On Structur...A Comprehensive Guideline for Designing Most Efficient Web Forms: On Structur...
A Comprehensive Guideline for Designing Most Efficient Web Forms: On Structur...
Katy Slemon44 views
Facebook Apps Vs Google Open Social by Rachel Vacek
Facebook Apps Vs Google Open SocialFacebook Apps Vs Google Open Social
Facebook Apps Vs Google Open Social
Rachel Vacek1.4K views
Flash Tutorial by Adil Jafri
Flash TutorialFlash Tutorial
Flash Tutorial
Adil Jafri215 views

Similar to Front End Frameworks - are they accessible

Scopic UX Design Test Task.pdf by
Scopic UX Design Test Task.pdfScopic UX Design Test Task.pdf
Scopic UX Design Test Task.pdfAtiqur Rahaman
315 views36 slides
Creating accessible modals and autocompletes by
Creating accessible modals and autocompletesCreating accessible modals and autocompletes
Creating accessible modals and autocompletesRuss Weakley
1.6K views276 slides
Interface usability-adding-schweppervescence-ver3-8 by
Interface usability-adding-schweppervescence-ver3-8Interface usability-adding-schweppervescence-ver3-8
Interface usability-adding-schweppervescence-ver3-8SSW
792 views192 slides
Accessibility in Design systems - the pain and glory by
Accessibility in Design systems - the pain and gloryAccessibility in Design systems - the pain and glory
Accessibility in Design systems - the pain and gloryRuss Weakley
1.8K views141 slides
Controls Use in Windows Presentation Foundation (WPF) by
Controls Use in Windows Presentation Foundation (WPF)Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)iFour Technolab Pvt. Ltd.
199 views42 slides
Interface Usability - Adding Schweppervescence by
Interface Usability - Adding SchweppervescenceInterface Usability - Adding Schweppervescence
Interface Usability - Adding SchweppervescenceSSW
670 views191 slides

Similar to Front End Frameworks - are they accessible(20)

Scopic UX Design Test Task.pdf by Atiqur Rahaman
Scopic UX Design Test Task.pdfScopic UX Design Test Task.pdf
Scopic UX Design Test Task.pdf
Atiqur Rahaman315 views
Creating accessible modals and autocompletes by Russ Weakley
Creating accessible modals and autocompletesCreating accessible modals and autocompletes
Creating accessible modals and autocompletes
Russ Weakley1.6K views
Interface usability-adding-schweppervescence-ver3-8 by SSW
Interface usability-adding-schweppervescence-ver3-8Interface usability-adding-schweppervescence-ver3-8
Interface usability-adding-schweppervescence-ver3-8
SSW792 views
Accessibility in Design systems - the pain and glory by Russ Weakley
Accessibility in Design systems - the pain and gloryAccessibility in Design systems - the pain and glory
Accessibility in Design systems - the pain and glory
Russ Weakley1.8K views
Interface Usability - Adding Schweppervescence by SSW
Interface Usability - Adding SchweppervescenceInterface Usability - Adding Schweppervescence
Interface Usability - Adding Schweppervescence
SSW670 views
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ... by Sencha
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
SenchaCon 2016: Accessibility, Teamwork & Ext JS: A Customer Success Story - ...
Sencha677 views
Web usability a complete list of ux ui best practices by Olatunji Adetunji
Web usability a complete list of ux ui best practicesWeb usability a complete list of ux ui best practices
Web usability a complete list of ux ui best practices
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk... by Patrick Lauke
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...
Patrick Lauke128 views
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip... by Patrick Lauke
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...
Patrick Lauke156 views
Accessibility in pattern libraries by Russ Weakley
Accessibility in pattern librariesAccessibility in pattern libraries
Accessibility in pattern libraries
Russ Weakley1.6K views
From Use to User Interface by abcd82
From Use     to User InterfaceFrom Use     to User Interface
From Use to User Interface
abcd821.5K views
Accessibility In Adobe Flex by Effective
Accessibility In Adobe FlexAccessibility In Adobe Flex
Accessibility In Adobe Flex
Effective1.3K views
Accessibility in Flex by EffectiveUI
Accessibility in FlexAccessibility in Flex
Accessibility in Flex
EffectiveUI882 views
Accessibility in Flex by fugaciousness
Accessibility in FlexAccessibility in Flex
Accessibility in Flex
fugaciousness3.4K views
Interface Design by gavhays
Interface DesignInterface Design
Interface Design
gavhays463 views

More from Russ Weakley

Accessible chat windows by
Accessible chat windowsAccessible chat windows
Accessible chat windowsRuss Weakley
200 views158 slides
Accessible names & descriptions by
Accessible names & descriptionsAccessible names & descriptions
Accessible names & descriptionsRuss Weakley
16 views154 slides
A deep dive into accessible names by
A deep dive into accessible namesA deep dive into accessible names
A deep dive into accessible namesRuss Weakley
24 views122 slides
What is WCAG 2 and why should we care? by
What is WCAG 2 and why should we care?What is WCAG 2 and why should we care?
What is WCAG 2 and why should we care?Russ Weakley
312 views63 slides
Building an accessible progressive loader by
Building an accessible progressive loaderBuilding an accessible progressive loader
Building an accessible progressive loaderRuss Weakley
2.4K views65 slides
Accessible Inline errors messages by
Accessible Inline errors messagesAccessible Inline errors messages
Accessible Inline errors messagesRuss Weakley
1.7K views106 slides

More from Russ Weakley(18)

Accessible chat windows by Russ Weakley
Accessible chat windowsAccessible chat windows
Accessible chat windows
Russ Weakley200 views
Accessible names & descriptions by Russ Weakley
Accessible names & descriptionsAccessible names & descriptions
Accessible names & descriptions
Russ Weakley16 views
A deep dive into accessible names by Russ Weakley
A deep dive into accessible namesA deep dive into accessible names
A deep dive into accessible names
Russ Weakley24 views
What is WCAG 2 and why should we care? by Russ Weakley
What is WCAG 2 and why should we care?What is WCAG 2 and why should we care?
What is WCAG 2 and why should we care?
Russ Weakley312 views
Building an accessible progressive loader by Russ Weakley
Building an accessible progressive loaderBuilding an accessible progressive loader
Building an accessible progressive loader
Russ Weakley2.4K views
Accessible Inline errors messages by Russ Weakley
Accessible Inline errors messagesAccessible Inline errors messages
Accessible Inline errors messages
Russ Weakley1.7K views
Accessible Form Hints and Errors by Russ Weakley
Accessible Form Hints and ErrorsAccessible Form Hints and Errors
Accessible Form Hints and Errors
Russ Weakley1.8K views
What is accessibility? by Russ Weakley
What is accessibility?What is accessibility?
What is accessibility?
Russ Weakley5.3K views
Accessibility in Pattern Libraries by Russ Weakley
Accessibility in Pattern LibrariesAccessibility in Pattern Libraries
Accessibility in Pattern Libraries
Russ Weakley1.6K views
Building an accessible auto-complete - #ID24 by Russ Weakley
Building an accessible auto-complete - #ID24Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24
Russ Weakley1.4K views
Building an accessible auto-complete by Russ Weakley
Building an accessible auto-completeBuilding an accessible auto-complete
Building an accessible auto-complete
Russ Weakley9.9K views
Creating an Accessible button dropdown by Russ Weakley
Creating an Accessible button dropdownCreating an Accessible button dropdown
Creating an Accessible button dropdown
Russ Weakley3.6K views
Creating a Simple, Accessible On/Off Switch by Russ Weakley
Creating a Simple, Accessible On/Off SwitchCreating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off Switch
Russ Weakley2.4K views
Deep Dive into Line-Height by Russ Weakley
Deep Dive into Line-HeightDeep Dive into Line-Height
Deep Dive into Line-Height
Russ Weakley3.8K views
Understanding the mysteries of the CSS property value syntax by Russ Weakley
Understanding the mysteries of the CSS property value syntaxUnderstanding the mysteries of the CSS property value syntax
Understanding the mysteries of the CSS property value syntax
Russ Weakley5K views
Specialise or cross-skill by Russ Weakley
Specialise or cross-skillSpecialise or cross-skill
Specialise or cross-skill
Russ Weakley6.8K views
CSS pattern libraries by Russ Weakley
CSS pattern librariesCSS pattern libraries
CSS pattern libraries
Russ Weakley83.8K views
Responsive Web Design - more than just a buzzword by Russ Weakley
Responsive Web Design - more than just a buzzwordResponsive Web Design - more than just a buzzword
Responsive Web Design - more than just a buzzword
Russ Weakley7.1K views

Recently uploaded

7 NOVEL DRUG DELIVERY SYSTEM.pptx by
7 NOVEL DRUG DELIVERY SYSTEM.pptx7 NOVEL DRUG DELIVERY SYSTEM.pptx
7 NOVEL DRUG DELIVERY SYSTEM.pptxSachin Nitave
61 views35 slides
CONTENTS.pptx by
CONTENTS.pptxCONTENTS.pptx
CONTENTS.pptxiguerendiain
57 views17 slides
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptx by
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptxPharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptx
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptxMs. Pooja Bhandare
93 views51 slides
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdf by
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdfCWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdfSukhwinderSingh895865
536 views6 slides
AI Tools for Business and Startups by
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and StartupsSvetlin Nakov
111 views39 slides
11.30.23 Poverty and Inequality in America.pptx by
11.30.23 Poverty and Inequality in America.pptx11.30.23 Poverty and Inequality in America.pptx
11.30.23 Poverty and Inequality in America.pptxmary850239
167 views33 slides

Recently uploaded(20)

7 NOVEL DRUG DELIVERY SYSTEM.pptx by Sachin Nitave
7 NOVEL DRUG DELIVERY SYSTEM.pptx7 NOVEL DRUG DELIVERY SYSTEM.pptx
7 NOVEL DRUG DELIVERY SYSTEM.pptx
Sachin Nitave61 views
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptx by Ms. Pooja Bhandare
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptxPharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptx
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptx
AI Tools for Business and Startups by Svetlin Nakov
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
Svetlin Nakov111 views
11.30.23 Poverty and Inequality in America.pptx by mary850239
11.30.23 Poverty and Inequality in America.pptx11.30.23 Poverty and Inequality in America.pptx
11.30.23 Poverty and Inequality in America.pptx
mary850239167 views
Structure and Functions of Cell.pdf by Nithya Murugan
Structure and Functions of Cell.pdfStructure and Functions of Cell.pdf
Structure and Functions of Cell.pdf
Nithya Murugan701 views
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx by ISSIP
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
ISSIP379 views
Monthly Information Session for MV Asterix (November) by Esquimalt MFRC
Monthly Information Session for MV Asterix (November)Monthly Information Session for MV Asterix (November)
Monthly Information Session for MV Asterix (November)
Esquimalt MFRC58 views
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively by PECB
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks EffectivelyISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively
PECB 598 views
Ch. 7 Political Participation and Elections.pptx by Rommel Regala
Ch. 7 Political Participation and Elections.pptxCh. 7 Political Participation and Elections.pptx
Ch. 7 Political Participation and Elections.pptx
Rommel Regala105 views
Drama KS5 Breakdown by WestHatch
Drama KS5 BreakdownDrama KS5 Breakdown
Drama KS5 Breakdown
WestHatch87 views
Psychology KS5 by WestHatch
Psychology KS5Psychology KS5
Psychology KS5
WestHatch103 views
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant... by Ms. Pooja Bhandare
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...
Ms. Pooja Bhandare109 views
Classification of crude drugs.pptx by GayatriPatra14
Classification of crude drugs.pptxClassification of crude drugs.pptx
Classification of crude drugs.pptx
GayatriPatra1492 views
Create a Structure in VBNet.pptx by Breach_P
Create a Structure in VBNet.pptxCreate a Structure in VBNet.pptx
Create a Structure in VBNet.pptx
Breach_P75 views

Front End Frameworks - are they accessible

  • 2. Over the last 5 years or so there has been a rapid rise in the use of HTML/CSS and/or JavaScript frameworks.
  • 3. Developers often choose to use frameworks as they have many benefits:
  • 4. • They save re-invention • They are ready-to-use • They provide cross browser stability • They allow quick prototyping • They promote consistency
  • 5. However, this reliance on frameworks has some downsides.
  • 6. 1. Many developers who have grown up only using frameworks have a total lack of understanding about the fundamentals of HTML such as valid and semantic markup.
  • 7. This is of great concern as semantic markup is one of the core principles of an accessible web.
  • 8. 2. There is a widespread assumption that most of these frameworks are “accessible out of the box” and don’t need any further work.
  • 9. 3. Even when frameworks do have inbuilt accessibility, many developers do not understand how to implement these accessibility features.
  • 10. We’re now going to look at some examples using the Bootstrap Framework. (And this is not to say that Bootstrap is inaccessible)
  • 13. The Bootstrap button classes allow developers to make any element appear like a button even if these elements have no semantic meaning.
  • 14. <span class="btn btn-default" role="button"> Button using a span </span> <a class="btn btn-default" href="#" role="button"> Button using a link </a> <button class="btn btn-default btn-lg" type="button"> Button using a button </button>
  • 15. Some developers have a tendency to throw the role=“button” attribute onto span and link elements, assuming that this makes it alright.
  • 16. <span class="btn btn-default" role="button"> Button using a span </span> <a class="btn btn-default" href="#" role="button"> Button using a link </a> <button class="btn btn-default btn-lg" type="button"> Button using a button </button>
  • 17. What’s the issue? Using button classes on <span> elements can cause all sorts of issues for Assistive Technologies. These “fake” buttons are announced as buttons when reading through the page, but they are sometimes not actionable.
  • 18. Solution: Avoid applying button classes to non-semantic elements such as <span> elements.
  • 21. When using these button classes, developers are often confused about when to use a link or a button as the base element.
  • 22. What’s the issue? When the incorrect element is used, this can confuse Assistive Technology users who expect links and buttons to behave in specific ways.
  • 23. Solution: Use a link when you want to send the user to a new location (visit a new page). Use a button when you want the user to perform some sort of action (click, submit, open etc.)
  • 26. Bootstrap allows developers to add classes to any elements and make them appear like a heading.
  • 27. This is quite common in complex layouts, such as application interfaces, where developers ignore heading hierarchy and apply “visual headings” to span or paragraph elements instead.
  • 28. <span class="h1"> Heading here </span> <p class="h1"> Heading here </p>
  • 29. What’s the issue? Many Assistive Technologies rely on heading levels to move around pages quickly. Heading levels also allow users to understand the importance and hierarchy of information.
  • 30. Solution: Where possible, avoid styling non- heading elements to appear like headings if a heading would be more appropriate.
  • 31. Solution: Even in complex layouts, try to maintain a basic heading hierarchy to allow users to understand content flow and importance.
  • 34. Badges allow developers to insert specially-styled number values into links, buttons and other elements.
  • 35. <button class="btn btn-primary"> A button with a badge <span class="badge">4</span> </button>
  • 36. These numbers are often used to indicate a dynamic number value such as the number of messages in an inbox.
  • 37. For sighted users, there is often some context associated with these badge numbers - visual clues that let users know what these numbers mean.
  • 38. What’s the issue? For Screen Reader users, these badge numbers can sometimes be confusing as they seem to be random numbers that do not have any additional context.
  • 39. Solution: Try to provide some additional context for Screen Reader users, such as additional hidden information.
  • 40. <button class="btn btn-primary"> A button with a badge <span class="badge"> 4 <span class="sr-only"> Messages </span> </span> </button>
  • 44. <div class="dropdown"> <button id="dropdownMenu1" data- toggle="dropdown" aria-haspopup="true" aria- expanded="true"> Dropdown <span class="caret"></span> </button> <ul class="dropdown-menu" aria- labelledby="dropdownMenu1"> <li><a href="#">Action</a></li> <li><a href="#">Another</a></li> <li><a href="#">Something</a></li> <li><a href="#">Separated</a></li> </ul> </div>
  • 45. The Bootstrap dropdown module allows developers to use dropdown functions attached to button elements.
  • 46. These dropdowns can present a wide range of issues for Screen Reader and Keyboard-only users.
  • 47. What’s the issue? Problem 1: For Screen Reader users, there is often no assistance given to explain what they are being asked to do (such as choose from a range of options) when they arrive at the button.
  • 48. Solution: Provide some additional context inside the button so Screen Reader users understand the purpose of the dropdown.
  • 49. <div class="dropdown"> <button id="dropdownMenu1" data- toggle="dropdown" aria-haspopup="true" aria- expanded="true"> Dropdown <span class=“caret"></span> <span class="sr-only"> Additonal information </span> </button> </div>
  • 50. What’s the issue? Problem 2: These elements are announced as buttons, so Screen Reader users often assume these are action orientated.
  • 51. What’s the issue? However, when these buttons are activated, Screen Reader users are then presented with silence. There is nothing to tell them that the dropdown has now visually opened and options are now available.
  • 52. Solution: When the button is activated, focus can be shifted to the list so that the list is announced.
  • 53. What’s the issue? Problem 3: For keyboard-only users, these dropdowns look similar to select menus, however the dropdown options cannot be accessed by standard select menu keystrokes - like the ARROW keys.
  • 54. Solution: Possibly add ARROW key functionality to these elements so they can be accessed using the ARROW keys as well?
  • 55. What’s the issue? Problem 4: When Keyboard-only users activate the dropdown, then tab through the dropdown, the dropdown remains “open” even after they leave. These dropdowns only close via the button element.
  • 56. Solution: Add functionality that closes the dropdown when users tab out of the dropdown options.
  • 57. What’s the issue? Problem 5: One problem for ALL users is that when users choose an item from the dropdown list, this choice is not reflected in the button. So, there is no feedback for users as to what choice they have made.
  • 58. Solution: This could possibly be resolved by changing the button value using JS and displaying the choice the user has made.
  • 61. Popovers are often used by developers who want to provide extra information to elements. These are similar to tooltips but often have much more detailed, on often more important, information.
  • 62. These popovers can be triggered via focus, hover or click events.
  • 63. Unfortunately, the bulk of the popover information is added via the data-content attribute. Popover titles are added via the title attribute.
  • 64. <button type="button" class="btn btn-primary btn-lg" data-container="body" data- toggle="popover" title="Popover title" data- content="Popover content"> Popover </button>
  • 65. What’s the issue? The popover content is often not available to Screen Reader users.
  • 66. Solution: This information could be added in a different location in the page (possibly hidden), and linked to the popover element using the aria- describedby attribute.
  • 67. <button type="button" aria- describedby="popover1" class="btn btn-primary btn-lg" data-container="body" data- toggle="popover" title="Popover title" data- content="Popover content"> Popover </button> <p id="popover1"> Popover content </p>
  • 70. While Bootstrap modals are quite accessible, many other modals in frameworks are far less accessible. Some common issues include:
  • 71. What’s the issue? Problem 1: Some modals allow TAB keystrokes to proceed outside the modal (into the page behind). This can be extremely confusing for both Screen Reader and Keyboard-only users.
  • 72. Solution: Keystrokes such as the TAB keystroke should be trapped inside the modal so that users cannot TAB onto the the page below.
  • 73. What’s the issue? Problem 2: Some modals failing announce the modal purpose when the modal is fired.This can be confusing for Screen Reader users who may not know that a modal has been fired, or the purpose of the modal.
  • 74. Solution: Part 1: Modals should be announced using the role and aria-labelledby attributes.
  • 75. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria- labelledby="myModalLabel"> <h4 id="myModalLabel"> Modal title </h4> </div>
  • 76. Solution: Part 2: The aria-labelledby attribute should be linked to relevant content such as the modal heading via the ID attribute.
  • 77. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria- labelledby="myModalLabel"> <h4 id="myModalLabel"> Modal title </h4> </div>
  • 78. What’s the issue? Problem 3: Some modals don’t provide descriptive information about closing the modal. This can be confusing for Screen Reader users who may not understand how to close/escape the modal.
  • 79. Solution: Modal close buttons should be placed first in tab order, and provide clear instructions as to what the purpose is.
  • 81. Bootstrap provides a range of ARIA attributes with some of the more complex modules such as dropdowns and modals - to make them more accessible.
  • 82. However, some developers simply copy and paste the Bootstrap example modules and do not edit the ARIA attributes.
  • 83. This can mean that ARIA attributes point to non-existent elements, or to the wrong elements.
  • 84. What’s the issue? This can sometimes confuse Screen Reader users as they are provided with incorrect or inaccurate labels for elements.
  • 85. Solution: Make sure developers understand what these ARIA attributes do and that they must be unique and correct for each instance of the module.
  • 87. Bootstrap, like most frameworks, provides developers with powerful class names that allow developers to adjust the column layout at different screen sizes.
  • 88. This means a layout could appear as four columns at wide screen, two columns at medium screen and one column at extra-small.
  • 89. <div class="col-xs-12 col-6-md col-3-lg"> Column1 </div> <div class="col-xs-12 col-6-md col-3-lg"> Column2 </div> <div class="col-xs-12 col-6-md col-3-lg"> Column3 </div> <div class="col-xs-12 col-6-md col-3-lg"> Column4 </div>
  • 93. There are also classes that allow developers to hide chunks of content at different screen sizes.
  • 94. <div class="hidden-xs col-6-md col-3-lg"> Hidden at XS </div>
  • 95. Unfortunately, these “hidden-” classes allow developers to add two sets of content into the layout.
  • 96. For example, the layout may have complex information presented at wide screen, and a simplified version of the same content presented at small screen.
  • 97. <div class="hidden-xs col-6-md col-3-lg"> Wide screen content </div> <div class="hidden-sm hidden-md hidden-lg"> Narrow screen content </div>
  • 98. What’s the issue? For Screen Reader users, this content is announced twice, in two slightly different forms, which can be extremely confusing.
  • 99. Solution: Try to use other methods to provide modified content for different screen sizes - even modifying within the one block of content if needed.
  • 100. <h2> Heading <span class="hidden-xs"> with additional info </span> </h2> <p> Paragraph <span class="hidden-xs"> with additional info </span> </p>
  • 102. Developers often have a tough job. They are being asked to develop sites and applications at an ever- increasing speed.
  • 103. They are also being asked to learn new technologies at an ever increasing rate.
  • 104. So, it is often hard to focus on things that may seem non-critical - like accessibility.
  • 105. However, in many cases accessibility could be included in the development cycle without too much additional work.
  • 106. Developers need to be made aware of the accessibility features that are available in many frameworks.
  • 107. They also need to understand how these inbuilt features work - how to use them and not break them.
  • 108. And finally, they need to know where these accessibility features fall short, and additional work may be needed.
  • 109. How? Well, it is the job of anyone who is passionate about accessibility - to help spread the word. Like you!
  • 110. Russ Weakley Max Design Site: maxdesign.com.au Twitter: twitter.com/russmaxdesign Slideshare: slideshare.net/maxdesign Linkedin: linkedin.com/in/russweakley