SlideShare a Scribd company logo
1 of 188
Download to read offline
Accessible
modal
windows
What is a modal
window?
A modal window is a window
that forces the user to interact
with it before they can go back to
using the parent page.
Generally, modal windows are
designed to sit over the top of
the parent page. In some cases,
the parent page is greyed out so
that users can visually focus on the
modal dialog only.
Diļ¬€erent types of
modal window
Modal windows can be used for
all sorts of different roles such
as:
Modal alerts
Modal dialogs
Modal lightboxes
Modeless windows
Modal windows should not be
mistaken for modeless windows.
Modeless windows are secondary
windows that stay active on the
user's screen until dismissed.
Modeless windows can be
minimised or hidden behind other
windows.
Unlike a modal window, a
modeless window will allow the
user to continue working with
the application while the modeless
window is still open.
What makes an
accessible modal
window?
Keyboard only
Users must be able to navigate
through the modal window as
needed using keyboard-only.
Users should be able to close the
modal window using keyboard-
only.
Users should not be able to TAB
outside of the modal window
until the modal window has been
closed.
There should be no hidden
keystrokes as users move through
the modal window.
Screen reader
All relevant components should be
identified to screen reader users
as they are accessed.
Screen readers should be notified
of changes as they occur.
Focus should be placed on
relevant areas as changes occur.
General user
The process should be easy to
understand for any type of user -
keyboard only user, screen reader
user, general user.
Informing users
before modal
window spawning
If a modal window spawns from a
focusable element, screen reader
users should be given additional
information to let them know
what will happen.
This can be done using a range of
different methods, depending on
the element that is used.
Hyperlinks
For hyperlinks, we could add
additional information using the
ā€œtitleā€, aria-labelledby, or ā€œaria-
labelā€ attributes. Or we could
place the addition information
inside the link and then hide it.
<!-- title attribute -->!
<a href="#id-name" !
! title="Added info">!
! Add bank account!
</a>!
<!-- aria-label attribute -->!
<a href="#id-name" !
! aria-label="Add bank account - Added
info">!
! Add bank account!
</a>!
<!-- aria-labelledby attribute -->!
<a href="#id-name" !
! aria-labelledby="info1">!
! Add bank account!
</a>!
<p id="info1" class="hidden">!
! Added info!
</p>!
<!-- hidden info -->!
<a href="#id-name">!
! Add bank account!
! <span class="hidden">Added info</span>!
</a>!
Buttons
For <button> elements, we
could use any of these same
techniques.
<!-- title attribute -->!
<button id="id-name" !
! title="Added info">!
! Add bank account!
</button>!
<!-- aria-label attribute -->!
<button id="id-name" !
! aria-label="Add bank account - Added
info">!
! Add bank account!
</button>!
<!-- aria-labelledby attribute -->!
<button id="id-name" !
! aria-labelledby="info1">!
! Add bank account!
</button>!
<p id="info1" class="hidden">!
! Added info!
</p>!
<!-- hidden info -->!
<button id="id-name">!
! Add bank account!
! <span class="hidden">Added info</span>!
</button>!
Inputs
For <input> elements, we could
use any of these same techniques -
except the hidden method as we
cannot place HTML markup inside
input elements.
Images
For <img> elements, we could
use any of the above techniques or
even add info into the ā€œaltā€
attribute.
<!-- alt attribute -->!
<a href="#id-name">!
! <img src="a.gif" !
! alt="Add bank account - Added info">!
</a>!
Hiding and
showing modal
windows
1. Hiding the modal
window
Initially, we need to hide the
modal dialog content so that is
not seen by sighted users or heard
by screen reader users.
<!-- hiding modal window -->!
<div!
! style="display:none">!
! ...!
</div>!
2. Showing the modal
window
When a user triggers the modal
window, we need to use
JavaScript to switch the values
within these two attributes.
The ā€œdisplayā€ value needs to
change from ā€œnoneā€ to ā€œblockā€.
<!-- aria-hidden -->!
<div!
! style="display:block">!
! ...!
</div>!
When the modal window becomes
active, the rest of the page -
everything apart from the modal
window container, could then be
set with aria-hidden=ā€œtrueā€.
<!-- all other content -->!
<div!
! aria-hidden="true">!
! ...!
</div>!
!
<!-- modal window -->!
<div!
! style="display:block">!
! ...!
</div>!
!
Notifying screen
readers when
arriving at modal
window
When a modal window is
spawned, we need to provide a
range of information to screen
reader users.
1. Setting focus on the
modal window
The first thing we need to do
when a modal window spawns is
set the initial focus to the modal
window element itself.
Initial focus
This is important because we are
going to give the window a label
as well as potentially adding
additional descriptive information.
If we set focus on an element
inside the window, such as the
first form control, the label and
additional information will not
be heard by screen reader users.
Initial focus
2. Addā€œdialogā€role
We need to inform screen reader
users that this modal window is a
ā€œmodal dialogā€. We can do this by
adding role=ā€œdialogā€.
<!-- adding aria role -->!
<div!
! style="display:block"!
! aria-hidden="false"!
! role="dialog">!
! ...!
</div>
3. Adding a label
We need to provide a label for
the modal dialog, so screen
reader users know its purpose.
We can do this by linking the
modal dialog container to the
primary <hn> element using
ā€œaria-labeledbyā€.
<!-- adding aria labelledby -->!
<div!
! style="display:block"!
! aria-hidden="false"!
! role="dialog"!
! aria-labelledby="modal-label">!
! <h1 id="modal-label">!
! ! Choose account!
! </h1>!
</div>!
Now the heading will be
announced to screen reader
users when the modal dialog is
spawned.
4. Adding optional
additional information
In some circumstances, such as
complex modal dialogs, we may
need to provide a more detailed
description of the purpose of the
modal dialog.
We can provide additional
information by linking the modal
dialog container to some
descriptive content using ā€œaria-
describedbyā€.
<!-- adding aria labelledby -->!
<div!
! style="display:block"!
! aria-hidden="false"!
! role="dialog"!
! aria-labelledby="modal-label"!
! aria-describedby="modal-description">!
! <h1 id="modal-label">!
! ! Choose account!
! </h1>!
! <p id="modal-description">!
! ! Description here!
! </p>!
</div>!
Ideally, this content should be
hidden or placed at the end of
the modal dialog content, after
all other content in the source.
Otherwise it can be read-aloud
twice in quick succession by
screen readers, which can be
confusing for some users.
5. Working with older
Assistive Technologies?
What about older assistive
technologies that may not
support some of the more
advanced ARIA attributes?
If this is an issue, other simpler
options may need to be
considered.
One simple option would be to
provide a special focusable
element, such as a link, that
comes before all others.
This could be presented as a
simple ā€œInformationā€ icon that
sits in the top left corner of the
window.
We could then add a description
of the modal window to this link.
<!-- help info -->!
<a href="#id-name">!
! <img src="a.gif" alt="Help">!
! <span class="tooltip">Added info</span>!
</a>!
!
This method could be useful for
both screen reader users and
general users, as the information
could be made visible as a
tooltip on focus.
Actions outside
the modal window
Users should not be able to
mouse-click on any focusable
element outside the modal
window while it is open.
CLICK
Users should not be able to use
TAB keystrokes to focus on any
focusable element outside the
modal window while it is open.
TAB
Actions inside
modal window
Mouse
Users should be able to mouse-
click to enable any focusable
element inside the modal window
while it is open.
CLICK
CLICK
CLICK
CLICK
CLICK
CLICK
CLICK
TAB keystroke
Users should be able to use TAB
keystrokes to navigate to any
focusable element inside the
modal window while it is open.
TAB
TAB
TAB
TAB
TAB
TAB
TAB
SHIFT + TAB keystroke
Users should be able to use
SHIFT + TAB keystrokes to
navigate backwards to any
focusable element inside the
modal window while it is open.
SHIFT + TAB
SHIFT + TAB
SHIFT + TAB
SHIFT + TAB
SHIFT + TAB
SHIFT + TAB
SHIFT + TAB
ENTER and SPACE
keystrokes
Users should be able to use
ENTER or SPACE keystrokes on
relevant elements while inside the
modal window - especially if they
are button elements.
ENTER
ENTER
SPACE
SPACE
ARROW keystrokes
When inside form controls,
ARROW keys are generally used to
allow users to navigate user-
entered text within the form
control.
An example might be a user
entering data into a <textarea>
element. The user can navigate
within their entered text using
ARROW keys to move to previous
and next characters, next line etc.
However, some form controls use
ARROW keys to allow users to
choose options within a set of
choices.
For example, radio buttons and
select menus allow users to
navigate through choices using
ARROW keys.
So, users should be able to use
ARROW keystrokes to change
radio button options.
TAB
ARROW
Users should be able to use
ARROW keystrokes to change
select menu options.
Option 1 - apples
ARROW
Option 2 - pears
ARROW
Option 3 - bananas
ARROW
ESC keystroke
Users should be able to use the
ESC key to close modal.
ESC
Modal windows
and screen reader
ā€œreadā€ mode
Screen readers generally operate
in one of two modes: ā€˜readā€™ mode
and ā€˜formā€™ mode.
In ā€œreadā€ mode, users can read
and navigate the page. Users
cannot interact with form controls
In ā€œformā€ mode, users can interact
with form controls. Users cannot
read and navigate the page.
In some cases, modal windows
may include important content
that is not form-related. In these
cases, screen reader users need to
be able to operate in ā€œreadā€ mode.
This means that screen reader
users must be able to navigate
though content using all of the
standard ā€œreadā€ mode keys.
In these cases, we could wrap a
new element around all the
content within the window and
set it with role=ā€œdocumentā€.
The ā€œdocumentā€ role informs
screen readers of the need to
augment browser keyboard
support so that users can navigate
and read any content within the
ā€œdocumentā€ region.
<!-- adding aria role -->!
<div!
! style="display:block"!
! aria-hidden="false"!
! role="dialog"!
! aria-labelledby="modal-label"!
! aria-describedby="modal-description">!
! <div role="document">!
! ! <h1 id="modal-label">!
! ! ! Choose account!
! ! </h1>!
! ! <p id="modal-description">!
! ! ! Description here!
! ! </p>!
! </div>!
Adding meaning to
important actions
For some important actions inside
the modal window, screen reader
users should be given additional
information to let them know
what will happen.
Submit
As screen reader users are
submitting form data, they
should be informed that:
1. they will be taken back to the
parent page.
2. where this data will be
submitted when they return to
the parent page.
ENTER
ā€œSubmit and return to bank
balance information. Your
data will be added to the
Balance tableā€
Close window
As screen reader users focus on
the ā€œCloseā€ function, they should
be informed that closing will
take them back to the parent
page.
ENTER
ā€œLeave form and return to
bank balance informationā€
A question on tab
order
Is it better to present to ā€œCloseā€
button before any form controls in
tab order, or after any form
controls.
A lot will depend on the
complexity and amount of
content inside the modal window.
Simple modal windows
For simple modal windows, it may
be easier to place the ā€œCloseā€
button last in tab order.
1
2
3
Complex modal windows
For complex modal windows,
where users may want to go back
to the parent page quickly without
having to TAB through the whole
window, it may be better to place
the ā€œCloseā€ button first in tab
order.
1
2
3
4
5
6
On sites where there are
numerous different modal dialogs,
the most important thing is
consistency. Decided on a method
and use it for all modal windows
so that it becomes predictable.
After modal dialog
closes
When the modal window is closed,
if users are being taken back to
the parent page:
1. Focus should be placed on the
relevant component of the parent
page. The most common practice
is to move focus back to the
element that invoked the dialog.
The user should not be thrown
back to the top of the parent
page unless there is a good
reason!
2. The user should be informed
where they are and what change
has occurred.
ENTER
Lorem ipsum dolor sit amet consect etuer adipi scing elit sed diam
nonummy nibh euismod tinunt ut laoreet dolore magna aliquam
erat volut. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip vel eum iriure dolor in
hendrerit in vulputate.
Accumsan et iusto odio dignissim qui blandit praesent luptatum
zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum
dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
nibh euismod tincidunt ut laoreet dolore magna aliquam erat.
Heading here
Another thing here
Add your bank balance
Another heading
$1,200.34
Focus
ā€œBank balance $1200.34 added
to bank information tableā€
Thanks toā€¦
A huge thanks to Roger Hudson,
Steve Faulkner and James
Edwards for their advice and
feedback on these slides.
Russ Weakley
Max Design
!
Site: maxdesign.com.au
Twitter: twitter.com/russmaxdesign
Slideshare: slideshare.net/maxdesign
Linkedin: linkedin.com/in/russweakley

More Related Content

What's hot

Javascript event handler
Javascript event handlerJavascript event handler
Javascript event handlerJesus Obenita Jr.
Ā 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTMLAarti P
Ā 
Š£Ń€Š¾Šŗ 26. Š•Š»ŠµŠ¼ŠµŠ½Ń‚Šø ŠŗŠµŃ€ŃƒŠ²Š°Š½Š½Ń ā€œŠŗŠ½Š¾ŠæŠŗŠ°ā€. ŠŸŠ¾Š½ŃŃ‚Ń‚Ń Š¾Š±ā€™Ń”Šŗту тŠ° Š¹Š¾Š³Š¾ Š²Š»Š°ŃŃ‚ŠøŠ²Š¾ŃŃ‚ŠµŠ¹ і ...
Š£Ń€Š¾Šŗ 26. Š•Š»ŠµŠ¼ŠµŠ½Ń‚Šø ŠŗŠµŃ€ŃƒŠ²Š°Š½Š½Ń ā€œŠŗŠ½Š¾ŠæŠŗŠ°ā€. ŠŸŠ¾Š½ŃŃ‚Ń‚Ń Š¾Š±ā€™Ń”Šŗту тŠ° Š¹Š¾Š³Š¾ Š²Š»Š°ŃŃ‚ŠøŠ²Š¾ŃŃ‚ŠµŠ¹ і ...Š£Ń€Š¾Šŗ 26. Š•Š»ŠµŠ¼ŠµŠ½Ń‚Šø ŠŗŠµŃ€ŃƒŠ²Š°Š½Š½Ń ā€œŠŗŠ½Š¾ŠæŠŗŠ°ā€. ŠŸŠ¾Š½ŃŃ‚Ń‚Ń Š¾Š±ā€™Ń”Šŗту тŠ° Š¹Š¾Š³Š¾ Š²Š»Š°ŃŃ‚ŠøŠ²Š¾ŃŃ‚ŠµŠ¹ і ...
Š£Ń€Š¾Šŗ 26. Š•Š»ŠµŠ¼ŠµŠ½Ń‚Šø ŠŗŠµŃ€ŃƒŠ²Š°Š½Š½Ń ā€œŠŗŠ½Š¾ŠæŠŗŠ°ā€. ŠŸŠ¾Š½ŃŃ‚Ń‚Ń Š¾Š±ā€™Ń”Šŗту тŠ° Š¹Š¾Š³Š¾ Š²Š»Š°ŃŃ‚ŠøŠ²Š¾ŃŃ‚ŠµŠ¹ і ...Š’Š°ŃŠøŠ»ŃŒ Š¢ŠµŃ€ŠµŃ…Š¾Š²ŃŃŒŠŗŠøŠ¹
Ā 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptWalid Ashraf
Ā 
HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examplesAlfredo Torre
Ā 
Lesson 1 sharing and maintaining documents
Lesson 1  sharing and maintaining documentsLesson 1  sharing and maintaining documents
Lesson 1 sharing and maintaining documentsbrendanjd
Ā 
Java - Tutorial Ventanas
Java - Tutorial VentanasJava - Tutorial Ventanas
Java - Tutorial Ventanaselsemieni
Ā 
Bootstrap 4 ppt
Bootstrap 4 pptBootstrap 4 ppt
Bootstrap 4 pptEPAM Systems
Ā 
JavaScript - Chapter 15 - Debugging Techniques
 JavaScript - Chapter 15 - Debugging Techniques JavaScript - Chapter 15 - Debugging Techniques
JavaScript - Chapter 15 - Debugging TechniquesWebStackAcademy
Ā 
aria-live: the good, the bad and the ugly
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
Ā 
Learning Html
Learning HtmlLearning Html
Learning HtmlDamian Gonz
Ā 
Constructs (Programming Methodology)
Constructs (Programming Methodology)Constructs (Programming Methodology)
Constructs (Programming Methodology)Jyoti Bhardwaj
Ā 
BasicHTML
BasicHTMLBasicHTML
BasicHTMLrcsampang
Ā 
Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1Vikas Chauhan
Ā 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and FunctionsJussi Pohjolainen
Ā 
CSS Font & Text style
CSS Font & Text style CSS Font & Text style
CSS Font & Text style Yaowaluck Promdee
Ā 

What's hot (20)

Javascript event handler
Javascript event handlerJavascript event handler
Javascript event handler
Ā 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
Ā 
Š£Ń€Š¾Šŗ 26. Š•Š»ŠµŠ¼ŠµŠ½Ń‚Šø ŠŗŠµŃ€ŃƒŠ²Š°Š½Š½Ń ā€œŠŗŠ½Š¾ŠæŠŗŠ°ā€. ŠŸŠ¾Š½ŃŃ‚Ń‚Ń Š¾Š±ā€™Ń”Šŗту тŠ° Š¹Š¾Š³Š¾ Š²Š»Š°ŃŃ‚ŠøŠ²Š¾ŃŃ‚ŠµŠ¹ і ...
Š£Ń€Š¾Šŗ 26. Š•Š»ŠµŠ¼ŠµŠ½Ń‚Šø ŠŗŠµŃ€ŃƒŠ²Š°Š½Š½Ń ā€œŠŗŠ½Š¾ŠæŠŗŠ°ā€. ŠŸŠ¾Š½ŃŃ‚Ń‚Ń Š¾Š±ā€™Ń”Šŗту тŠ° Š¹Š¾Š³Š¾ Š²Š»Š°ŃŃ‚ŠøŠ²Š¾ŃŃ‚ŠµŠ¹ і ...Š£Ń€Š¾Šŗ 26. Š•Š»ŠµŠ¼ŠµŠ½Ń‚Šø ŠŗŠµŃ€ŃƒŠ²Š°Š½Š½Ń ā€œŠŗŠ½Š¾ŠæŠŗŠ°ā€. ŠŸŠ¾Š½ŃŃ‚Ń‚Ń Š¾Š±ā€™Ń”Šŗту тŠ° Š¹Š¾Š³Š¾ Š²Š»Š°ŃŃ‚ŠøŠ²Š¾ŃŃ‚ŠµŠ¹ і ...
Š£Ń€Š¾Šŗ 26. Š•Š»ŠµŠ¼ŠµŠ½Ń‚Šø ŠŗŠµŃ€ŃƒŠ²Š°Š½Š½Ń ā€œŠŗŠ½Š¾ŠæŠŗŠ°ā€. ŠŸŠ¾Š½ŃŃ‚Ń‚Ń Š¾Š±ā€™Ń”Šŗту тŠ° Š¹Š¾Š³Š¾ Š²Š»Š°ŃŃ‚ŠøŠ²Š¾ŃŃ‚ŠµŠ¹ і ...
Ā 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
Ā 
HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examples
Ā 
Lesson 1 sharing and maintaining documents
Lesson 1  sharing and maintaining documentsLesson 1  sharing and maintaining documents
Lesson 1 sharing and maintaining documents
Ā 
PHP filter
PHP filterPHP filter
PHP filter
Ā 
Java - Tutorial Ventanas
Java - Tutorial VentanasJava - Tutorial Ventanas
Java - Tutorial Ventanas
Ā 
Bootstrap 4 ppt
Bootstrap 4 pptBootstrap 4 ppt
Bootstrap 4 ppt
Ā 
JavaScript - Chapter 15 - Debugging Techniques
 JavaScript - Chapter 15 - Debugging Techniques JavaScript - Chapter 15 - Debugging Techniques
JavaScript - Chapter 15 - Debugging Techniques
Ā 
aria-live: the good, the bad and the ugly
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 ugly
Ā 
CSS
CSSCSS
CSS
Ā 
Learning Html
Learning HtmlLearning Html
Learning Html
Ā 
Constructs (Programming Methodology)
Constructs (Programming Methodology)Constructs (Programming Methodology)
Constructs (Programming Methodology)
Ā 
Controls in asp.net
Controls in asp.netControls in asp.net
Controls in asp.net
Ā 
Html
HtmlHtml
Html
Ā 
BasicHTML
BasicHTMLBasicHTML
BasicHTML
Ā 
Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1Laravel Beginners Tutorial 1
Laravel Beginners Tutorial 1
Ā 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and Functions
Ā 
CSS Font & Text style
CSS Font & Text style CSS Font & Text style
CSS Font & Text style
Ā 

Similar to Accessible modal windows

Front End Frameworks - are they accessible
Front End Frameworks - are they accessibleFront End Frameworks - are they accessible
Front End Frameworks - are they accessibleRuss Weakley
Ā 
Building Accessible Web Components
Building Accessible Web ComponentsBuilding Accessible Web Components
Building Accessible Web ComponentsRuss Weakley
Ā 
Creating an Accessible button dropdown
Creating an Accessible button dropdownCreating an Accessible button dropdown
Creating an Accessible button dropdownRuss Weakley
Ā 
Creating accessible modals and autocompletes
Creating accessible modals and autocompletesCreating accessible modals and autocompletes
Creating accessible modals and autocompletesRuss Weakley
Ā 
Building accessible web components without tears
Building accessible web components without tearsBuilding accessible web components without tears
Building accessible web components without tearsRuss Weakley
Ā 
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018Patrick Lauke
Ā 
Accessibility in Design systems - the pain and glory
Accessibility in Design systems - the pain and gloryAccessibility in Design systems - the pain and glory
Accessibility in Design systems - the pain and gloryRuss Weakley
Ā 
Accessible code-patterns
Accessible code-patternsAccessible code-patterns
Accessible code-patternsFrancesco Bedussi
Ā 
Web accessibility - WAI-ARIA a small introduction
Web accessibility - WAI-ARIA a small introductionWeb accessibility - WAI-ARIA a small introduction
Web accessibility - WAI-ARIA a small introductionGeoffroy Baylaender
Ā 
ARIA and JavaScript Accessibility
ARIA and JavaScript AccessibilityARIA and JavaScript Accessibility
ARIA and JavaScript AccessibilityPaul Bohman
Ā 
Semantic accessibility
Semantic accessibilitySemantic accessibility
Semantic accessibilityIan Stuart
Ā 
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...
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...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...
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...Patrick Lauke
Ā 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labelsRuss Weakley
Ā 
jQuery mobile UX
jQuery mobile UXjQuery mobile UX
jQuery mobile UXInbal Geffen
Ā 
Bootstrap cheat-sheet-websitesetup.org
Bootstrap cheat-sheet-websitesetup.org Bootstrap cheat-sheet-websitesetup.org
Bootstrap cheat-sheet-websitesetup.org Ali Bakhtiari
Ā 
Creating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off SwitchCreating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off SwitchRuss Weakley
Ā 
Making modal dialogs accessible
Making modal dialogs accessibleMaking modal dialogs accessible
Making modal dialogs accessibleVinod Tiwari
Ā 
Show & tell - A more accessible accordion
Show & tell - A more accessible accordionShow & tell - A more accessible accordion
Show & tell - A more accessible accordionDan Dineen
Ā 

Similar to Accessible modal windows (20)

Front End Frameworks - are they accessible
Front End Frameworks - are they accessibleFront End Frameworks - are they accessible
Front End Frameworks - are they accessible
Ā 
Building Accessible Web Components
Building Accessible Web ComponentsBuilding Accessible Web Components
Building Accessible Web Components
Ā 
Creating an Accessible button dropdown
Creating an Accessible button dropdownCreating an Accessible button dropdown
Creating an Accessible button dropdown
Ā 
Creating accessible modals and autocompletes
Creating accessible modals and autocompletesCreating accessible modals and autocompletes
Creating accessible modals and autocompletes
Ā 
Building accessible web components without tears
Building accessible web components without tearsBuilding accessible web components without tears
Building accessible web components without tears
Ā 
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
WAI-ARIA An introduction to Accessible Rich Internet Applications / AccessU 2018
Ā 
Accessibility in Design systems - the pain and glory
Accessibility in Design systems - the pain and gloryAccessibility in Design systems - the pain and glory
Accessibility in Design systems - the pain and glory
Ā 
Accessible code-patterns
Accessible code-patternsAccessible code-patterns
Accessible code-patterns
Ā 
Web accessibility - WAI-ARIA a small introduction
Web accessibility - WAI-ARIA a small introductionWeb accessibility - WAI-ARIA a small introduction
Web accessibility - WAI-ARIA a small introduction
Ā 
ARIA and JavaScript Accessibility
ARIA and JavaScript AccessibilityARIA and JavaScript Accessibility
ARIA and JavaScript Accessibility
Ā 
Semantic accessibility
Semantic accessibilitySemantic accessibility
Semantic accessibility
Ā 
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...
WAI-ARIA An introduction to Accessible Rich Internet Applications / JavaScrip...
Ā 
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...
WAI-ARIA An introduction to Accessible Rich Internet Applications / CSS Minsk...
Ā 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labels
Ā 
jQuery mobile UX
jQuery mobile UXjQuery mobile UX
jQuery mobile UX
Ā 
Bootstrap cheat-sheet-websitesetup.org
Bootstrap cheat-sheet-websitesetup.org Bootstrap cheat-sheet-websitesetup.org
Bootstrap cheat-sheet-websitesetup.org
Ā 
Creating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off SwitchCreating a Simple, Accessible On/Off Switch
Creating a Simple, Accessible On/Off Switch
Ā 
Making modal dialogs accessible
Making modal dialogs accessibleMaking modal dialogs accessible
Making modal dialogs accessible
Ā 
Show & tell - A more accessible accordion
Show & tell - A more accessible accordionShow & tell - A more accessible accordion
Show & tell - A more accessible accordion
Ā 
Pruexx User's guide for beta testing
Pruexx User's guide for beta testingPruexx User's guide for beta testing
Pruexx User's guide for beta testing
Ā 

More from Russ Weakley

Accessible chat windows
Accessible chat windowsAccessible chat windows
Accessible chat windowsRuss Weakley
Ā 
Accessible names & descriptions
Accessible names & descriptionsAccessible names & descriptions
Accessible names & descriptionsRuss Weakley
Ā 
A deep dive into accessible names
A deep dive into accessible namesA deep dive into accessible names
A deep dive into accessible namesRuss Weakley
Ā 
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?
What are accessible names and why should you care?Russ Weakley
Ā 
How to build accessible UI components
How to build accessible UI componentsHow to build accessible UI components
How to build accessible UI componentsRuss 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?
What is WCAG 2 and why should we care?Russ Weakley
Ā 
Accessible states in Design Systems
Accessible states in Design SystemsAccessible states in Design Systems
Accessible states in Design SystemsRuss Weakley
Ā 
Building an accessible progressive loader
Building an accessible progressive loaderBuilding an accessible progressive loader
Building an accessible progressive loaderRuss Weakley
Ā 
Accessible Inline errors messages
Accessible Inline errors messagesAccessible Inline errors messages
Accessible Inline errors messagesRuss Weakley
Ā 
Accessible Form Hints and Errors
Accessible Form Hints and ErrorsAccessible Form Hints and Errors
Accessible Form Hints and ErrorsRuss Weakley
Ā 
What is accessibility?
What is accessibility?What is accessibility?
What is accessibility?Russ Weakley
Ā 
Accessibility in Pattern Libraries
Accessibility in Pattern LibrariesAccessibility in Pattern Libraries
Accessibility in Pattern LibrariesRuss Weakley
Ā 
Accessibility in pattern libraries
Accessibility in pattern librariesAccessibility in pattern libraries
Accessibility in pattern librariesRuss Weakley
Ā 
Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24Russ Weakley
Ā 
Building an accessible auto-complete
Building an accessible auto-completeBuilding an accessible auto-complete
Building an accessible auto-completeRuss Weakley
Ā 
Accessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesAccessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesRuss Weakley
Ā 
Deep Dive into Line-Height
Deep Dive into Line-HeightDeep Dive into Line-Height
Deep Dive into Line-HeightRuss Weakley
Ā 
Understanding the mysteries of the CSS property value syntax
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 syntaxRuss Weakley
Ā 
Specialise or cross-skill
Specialise or cross-skillSpecialise or cross-skill
Specialise or cross-skillRuss Weakley
Ā 
CSS pattern libraries
CSS pattern librariesCSS pattern libraries
CSS pattern librariesRuss Weakley
Ā 

More from Russ Weakley (20)

Accessible chat windows
Accessible chat windowsAccessible chat windows
Accessible chat windows
Ā 
Accessible names & descriptions
Accessible names & descriptionsAccessible names & descriptions
Accessible names & descriptions
Ā 
A deep dive into accessible names
A deep dive into accessible namesA deep dive into accessible names
A deep dive into accessible names
Ā 
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?
What are accessible names and why should you care?
Ā 
How to build accessible UI components
How to build accessible UI componentsHow to build accessible UI components
How to build accessible UI components
Ā 
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?
What is WCAG 2 and why should we care?
Ā 
Accessible states in Design Systems
Accessible states in Design SystemsAccessible states in Design Systems
Accessible states in Design Systems
Ā 
Building an accessible progressive loader
Building an accessible progressive loaderBuilding an accessible progressive loader
Building an accessible progressive loader
Ā 
Accessible Inline errors messages
Accessible Inline errors messagesAccessible Inline errors messages
Accessible Inline errors messages
Ā 
Accessible Form Hints and Errors
Accessible Form Hints and ErrorsAccessible Form Hints and Errors
Accessible Form Hints and Errors
Ā 
What is accessibility?
What is accessibility?What is accessibility?
What is accessibility?
Ā 
Accessibility in Pattern Libraries
Accessibility in Pattern LibrariesAccessibility in Pattern Libraries
Accessibility in Pattern Libraries
Ā 
Accessibility in pattern libraries
Accessibility in pattern librariesAccessibility in pattern libraries
Accessibility in pattern libraries
Ā 
Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24
Ā 
Building an accessible auto-complete
Building an accessible auto-completeBuilding an accessible auto-complete
Building an accessible auto-complete
Ā 
Accessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesAccessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxes
Ā 
Deep Dive into Line-Height
Deep Dive into Line-HeightDeep Dive into Line-Height
Deep Dive into Line-Height
Ā 
Understanding the mysteries of the CSS property value syntax
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
Ā 
Specialise or cross-skill
Specialise or cross-skillSpecialise or cross-skill
Specialise or cross-skill
Ā 
CSS pattern libraries
CSS pattern librariesCSS pattern libraries
CSS pattern libraries
Ā 

Recently uploaded

Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
Ā 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
Ā 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
Ā 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
Ā 
Hį»ŒC Tį»T TIįŗ¾NG ANH 11 THEO CHĘÆĘ NG TRƌNH GLOBAL SUCCESS ĐƁP ƁN CHI TIįŗ¾T - Cįŗ¢ NĂ...
Hį»ŒC Tį»T TIįŗ¾NG ANH 11 THEO CHĘÆĘ NG TRƌNH GLOBAL SUCCESS ĐƁP ƁN CHI TIįŗ¾T - Cįŗ¢ NĂ...Hį»ŒC Tį»T TIįŗ¾NG ANH 11 THEO CHĘÆĘ NG TRƌNH GLOBAL SUCCESS ĐƁP ƁN CHI TIįŗ¾T - Cįŗ¢ NĂ...
Hį»ŒC Tį»T TIįŗ¾NG ANH 11 THEO CHĘÆĘ NG TRƌNH GLOBAL SUCCESS ĐƁP ƁN CHI TIįŗ¾T - Cįŗ¢ NĂ...Nguyen Thanh Tu Collection
Ā 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
Ā 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
Ā 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
Ā 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
Ā 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
Ā 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
Ā 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
Ā 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
Ā 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
Ā 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
Ā 
call girls in Kamla Market (DELHI) šŸ” >ą¼’9953330565šŸ” genuine Escort Service šŸ”āœ”ļøāœ”ļø
call girls in Kamla Market (DELHI) šŸ” >ą¼’9953330565šŸ” genuine Escort Service šŸ”āœ”ļøāœ”ļøcall girls in Kamla Market (DELHI) šŸ” >ą¼’9953330565šŸ” genuine Escort Service šŸ”āœ”ļøāœ”ļø
call girls in Kamla Market (DELHI) šŸ” >ą¼’9953330565šŸ” genuine Escort Service šŸ”āœ”ļøāœ”ļø9953056974 Low Rate Call Girls In Saket, Delhi NCR
Ā 

Recently uploaded (20)

Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
Ā 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
Ā 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
Ā 
Model Call Girl in Tilak Nagar Delhi reach out to us at šŸ”9953056974šŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at šŸ”9953056974šŸ”Model Call Girl in Tilak Nagar Delhi reach out to us at šŸ”9953056974šŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at šŸ”9953056974šŸ”
Ā 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Ā 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
Ā 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
Ā 
Hį»ŒC Tį»T TIįŗ¾NG ANH 11 THEO CHĘÆĘ NG TRƌNH GLOBAL SUCCESS ĐƁP ƁN CHI TIįŗ¾T - Cįŗ¢ NĂ...
Hį»ŒC Tį»T TIįŗ¾NG ANH 11 THEO CHĘÆĘ NG TRƌNH GLOBAL SUCCESS ĐƁP ƁN CHI TIįŗ¾T - Cįŗ¢ NĂ...Hį»ŒC Tį»T TIįŗ¾NG ANH 11 THEO CHĘÆĘ NG TRƌNH GLOBAL SUCCESS ĐƁP ƁN CHI TIįŗ¾T - Cįŗ¢ NĂ...
Hį»ŒC Tį»T TIįŗ¾NG ANH 11 THEO CHĘÆĘ NG TRƌNH GLOBAL SUCCESS ĐƁP ƁN CHI TIįŗ¾T - Cįŗ¢ NĂ...
Ā 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
Ā 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
Ā 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
Ā 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
Ā 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
Ā 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
Ā 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
Ā 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
Ā 
Model Call Girl in Bikash Puri Delhi reach out to us at šŸ”9953056974šŸ”
Model Call Girl in Bikash Puri  Delhi reach out to us at šŸ”9953056974šŸ”Model Call Girl in Bikash Puri  Delhi reach out to us at šŸ”9953056974šŸ”
Model Call Girl in Bikash Puri Delhi reach out to us at šŸ”9953056974šŸ”
Ā 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Ā 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
Ā 
call girls in Kamla Market (DELHI) šŸ” >ą¼’9953330565šŸ” genuine Escort Service šŸ”āœ”ļøāœ”ļø
call girls in Kamla Market (DELHI) šŸ” >ą¼’9953330565šŸ” genuine Escort Service šŸ”āœ”ļøāœ”ļøcall girls in Kamla Market (DELHI) šŸ” >ą¼’9953330565šŸ” genuine Escort Service šŸ”āœ”ļøāœ”ļø
call girls in Kamla Market (DELHI) šŸ” >ą¼’9953330565šŸ” genuine Escort Service šŸ”āœ”ļøāœ”ļø
Ā 

Accessible modal windows

  • 2. What is a modal window?
  • 3. A modal window is a window that forces the user to interact with it before they can go back to using the parent page.
  • 4. Generally, modal windows are designed to sit over the top of the parent page. In some cases, the parent page is greyed out so that users can visually focus on the modal dialog only.
  • 5.
  • 7. Modal windows can be used for all sorts of different roles such as:
  • 12. Modal windows should not be mistaken for modeless windows.
  • 13. Modeless windows are secondary windows that stay active on the user's screen until dismissed. Modeless windows can be minimised or hidden behind other windows.
  • 14. Unlike a modal window, a modeless window will allow the user to continue working with the application while the modeless window is still open.
  • 15. What makes an accessible modal window?
  • 17. Users must be able to navigate through the modal window as needed using keyboard-only.
  • 18. Users should be able to close the modal window using keyboard- only.
  • 19. Users should not be able to TAB outside of the modal window until the modal window has been closed.
  • 20. There should be no hidden keystrokes as users move through the modal window.
  • 22. All relevant components should be identified to screen reader users as they are accessed.
  • 23. Screen readers should be notified of changes as they occur.
  • 24. Focus should be placed on relevant areas as changes occur.
  • 26. The process should be easy to understand for any type of user - keyboard only user, screen reader user, general user.
  • 28. If a modal window spawns from a focusable element, screen reader users should be given additional information to let them know what will happen.
  • 29. This can be done using a range of different methods, depending on the element that is used.
  • 31. For hyperlinks, we could add additional information using the ā€œtitleā€, aria-labelledby, or ā€œaria- labelā€ attributes. Or we could place the addition information inside the link and then hide it.
  • 32. <!-- title attribute -->! <a href="#id-name" ! ! title="Added info">! ! Add bank account! </a>!
  • 33. <!-- aria-label attribute -->! <a href="#id-name" ! ! aria-label="Add bank account - Added info">! ! Add bank account! </a>!
  • 34. <!-- aria-labelledby attribute -->! <a href="#id-name" ! ! aria-labelledby="info1">! ! Add bank account! </a>! <p id="info1" class="hidden">! ! Added info! </p>!
  • 35. <!-- hidden info -->! <a href="#id-name">! ! Add bank account! ! <span class="hidden">Added info</span>! </a>!
  • 37. For <button> elements, we could use any of these same techniques.
  • 38. <!-- title attribute -->! <button id="id-name" ! ! title="Added info">! ! Add bank account! </button>!
  • 39. <!-- aria-label attribute -->! <button id="id-name" ! ! aria-label="Add bank account - Added info">! ! Add bank account! </button>!
  • 40. <!-- aria-labelledby attribute -->! <button id="id-name" ! ! aria-labelledby="info1">! ! Add bank account! </button>! <p id="info1" class="hidden">! ! Added info! </p>!
  • 41. <!-- hidden info -->! <button id="id-name">! ! Add bank account! ! <span class="hidden">Added info</span>! </button>!
  • 43. For <input> elements, we could use any of these same techniques - except the hidden method as we cannot place HTML markup inside input elements.
  • 45. For <img> elements, we could use any of the above techniques or even add info into the ā€œaltā€ attribute.
  • 46. <!-- alt attribute -->! <a href="#id-name">! ! <img src="a.gif" ! ! alt="Add bank account - Added info">! </a>!
  • 48. 1. Hiding the modal window
  • 49. Initially, we need to hide the modal dialog content so that is not seen by sighted users or heard by screen reader users.
  • 50. <!-- hiding modal window -->! <div! ! style="display:none">! ! ...! </div>!
  • 51. 2. Showing the modal window
  • 52. When a user triggers the modal window, we need to use JavaScript to switch the values within these two attributes.
  • 53. The ā€œdisplayā€ value needs to change from ā€œnoneā€ to ā€œblockā€.
  • 54. <!-- aria-hidden -->! <div! ! style="display:block">! ! ...! </div>!
  • 55. When the modal window becomes active, the rest of the page - everything apart from the modal window container, could then be set with aria-hidden=ā€œtrueā€.
  • 56. <!-- all other content -->! <div! ! aria-hidden="true">! ! ...! </div>! ! <!-- modal window -->! <div! ! style="display:block">! ! ...! </div>! !
  • 58. When a modal window is spawned, we need to provide a range of information to screen reader users.
  • 59. 1. Setting focus on the modal window
  • 60. The first thing we need to do when a modal window spawns is set the initial focus to the modal window element itself.
  • 62. This is important because we are going to give the window a label as well as potentially adding additional descriptive information.
  • 63. If we set focus on an element inside the window, such as the first form control, the label and additional information will not be heard by screen reader users.
  • 66. We need to inform screen reader users that this modal window is a ā€œmodal dialogā€. We can do this by adding role=ā€œdialogā€.
  • 67. <!-- adding aria role -->! <div! ! style="display:block"! ! aria-hidden="false"! ! role="dialog">! ! ...! </div>
  • 68. 3. Adding a label
  • 69. We need to provide a label for the modal dialog, so screen reader users know its purpose.
  • 70. We can do this by linking the modal dialog container to the primary <hn> element using ā€œaria-labeledbyā€.
  • 71. <!-- adding aria labelledby -->! <div! ! style="display:block"! ! aria-hidden="false"! ! role="dialog"! ! aria-labelledby="modal-label">! ! <h1 id="modal-label">! ! ! Choose account! ! </h1>! </div>!
  • 72. Now the heading will be announced to screen reader users when the modal dialog is spawned.
  • 74. In some circumstances, such as complex modal dialogs, we may need to provide a more detailed description of the purpose of the modal dialog.
  • 75. We can provide additional information by linking the modal dialog container to some descriptive content using ā€œaria- describedbyā€.
  • 76. <!-- adding aria labelledby -->! <div! ! style="display:block"! ! aria-hidden="false"! ! role="dialog"! ! aria-labelledby="modal-label"! ! aria-describedby="modal-description">! ! <h1 id="modal-label">! ! ! Choose account! ! </h1>! ! <p id="modal-description">! ! ! Description here! ! </p>! </div>!
  • 77. Ideally, this content should be hidden or placed at the end of the modal dialog content, after all other content in the source.
  • 78. Otherwise it can be read-aloud twice in quick succession by screen readers, which can be confusing for some users.
  • 79. 5. Working with older Assistive Technologies?
  • 80. What about older assistive technologies that may not support some of the more advanced ARIA attributes?
  • 81. If this is an issue, other simpler options may need to be considered.
  • 82. One simple option would be to provide a special focusable element, such as a link, that comes before all others.
  • 83. This could be presented as a simple ā€œInformationā€ icon that sits in the top left corner of the window.
  • 84.
  • 85. We could then add a description of the modal window to this link.
  • 86. <!-- help info -->! <a href="#id-name">! ! <img src="a.gif" alt="Help">! ! <span class="tooltip">Added info</span>! </a>! !
  • 87. This method could be useful for both screen reader users and general users, as the information could be made visible as a tooltip on focus.
  • 88.
  • 90. Users should not be able to mouse-click on any focusable element outside the modal window while it is open.
  • 91. CLICK
  • 92. Users should not be able to use TAB keystrokes to focus on any focusable element outside the modal window while it is open.
  • 93. TAB
  • 95. Mouse
  • 96. Users should be able to mouse- click to enable any focusable element inside the modal window while it is open.
  • 97. CLICK
  • 98. CLICK
  • 99. CLICK
  • 100. CLICK
  • 101. CLICK
  • 102. CLICK
  • 103. CLICK
  • 105. Users should be able to use TAB keystrokes to navigate to any focusable element inside the modal window while it is open.
  • 106. TAB
  • 107. TAB
  • 108. TAB
  • 109. TAB
  • 110. TAB
  • 111. TAB
  • 112. TAB
  • 113. SHIFT + TAB keystroke
  • 114. Users should be able to use SHIFT + TAB keystrokes to navigate backwards to any focusable element inside the modal window while it is open.
  • 123. Users should be able to use ENTER or SPACE keystrokes on relevant elements while inside the modal window - especially if they are button elements.
  • 124. ENTER
  • 125. ENTER
  • 126. SPACE
  • 127. SPACE
  • 129. When inside form controls, ARROW keys are generally used to allow users to navigate user- entered text within the form control.
  • 130. An example might be a user entering data into a <textarea> element. The user can navigate within their entered text using ARROW keys to move to previous and next characters, next line etc.
  • 131. However, some form controls use ARROW keys to allow users to choose options within a set of choices.
  • 132. For example, radio buttons and select menus allow users to navigate through choices using ARROW keys.
  • 133. So, users should be able to use ARROW keystrokes to change radio button options.
  • 134. TAB
  • 135. ARROW
  • 136. Users should be able to use ARROW keystrokes to change select menu options.
  • 137. Option 1 - apples ARROW
  • 138. Option 2 - pears ARROW
  • 139. Option 3 - bananas ARROW
  • 141. Users should be able to use the ESC key to close modal.
  • 142. ESC
  • 143. Modal windows and screen reader ā€œreadā€ mode
  • 144. Screen readers generally operate in one of two modes: ā€˜readā€™ mode and ā€˜formā€™ mode.
  • 145. In ā€œreadā€ mode, users can read and navigate the page. Users cannot interact with form controls
  • 146. In ā€œformā€ mode, users can interact with form controls. Users cannot read and navigate the page.
  • 147. In some cases, modal windows may include important content that is not form-related. In these cases, screen reader users need to be able to operate in ā€œreadā€ mode.
  • 148. This means that screen reader users must be able to navigate though content using all of the standard ā€œreadā€ mode keys.
  • 149. In these cases, we could wrap a new element around all the content within the window and set it with role=ā€œdocumentā€.
  • 150. The ā€œdocumentā€ role informs screen readers of the need to augment browser keyboard support so that users can navigate and read any content within the ā€œdocumentā€ region.
  • 151. <!-- adding aria role -->! <div! ! style="display:block"! ! aria-hidden="false"! ! role="dialog"! ! aria-labelledby="modal-label"! ! aria-describedby="modal-description">! ! <div role="document">! ! ! <h1 id="modal-label">! ! ! ! Choose account! ! ! </h1>! ! ! <p id="modal-description">! ! ! ! Description here! ! ! </p>! ! </div>!
  • 153. For some important actions inside the modal window, screen reader users should be given additional information to let them know what will happen.
  • 154. Submit
  • 155. As screen reader users are submitting form data, they should be informed that:
  • 156. 1. they will be taken back to the parent page.
  • 157. 2. where this data will be submitted when they return to the parent page.
  • 158. ENTER ā€œSubmit and return to bank balance information. Your data will be added to the Balance tableā€
  • 160. As screen reader users focus on the ā€œCloseā€ function, they should be informed that closing will take them back to the parent page.
  • 161. ENTER ā€œLeave form and return to bank balance informationā€
  • 162. A question on tab order
  • 163. Is it better to present to ā€œCloseā€ button before any form controls in tab order, or after any form controls.
  • 164. A lot will depend on the complexity and amount of content inside the modal window.
  • 166. For simple modal windows, it may be easier to place the ā€œCloseā€ button last in tab order.
  • 167. 1
  • 168. 2
  • 169. 3
  • 171. For complex modal windows, where users may want to go back to the parent page quickly without having to TAB through the whole window, it may be better to place the ā€œCloseā€ button first in tab order.
  • 172. 1
  • 173. 2
  • 174. 3
  • 175. 4
  • 176. 5
  • 177. 6
  • 178. On sites where there are numerous different modal dialogs, the most important thing is consistency. Decided on a method and use it for all modal windows so that it becomes predictable.
  • 180. When the modal window is closed, if users are being taken back to the parent page:
  • 181. 1. Focus should be placed on the relevant component of the parent page. The most common practice is to move focus back to the element that invoked the dialog.
  • 182. The user should not be thrown back to the top of the parent page unless there is a good reason!
  • 183. 2. The user should be informed where they are and what change has occurred.
  • 184. ENTER
  • 185. Lorem ipsum dolor sit amet consect etuer adipi scing elit sed diam nonummy nibh euismod tinunt ut laoreet dolore magna aliquam erat volut. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip vel eum iriure dolor in hendrerit in vulputate. Accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat. Heading here Another thing here Add your bank balance Another heading $1,200.34 Focus ā€œBank balance $1200.34 added to bank information tableā€
  • 187. A huge thanks to Roger Hudson, Steve Faulkner and James Edwards for their advice and feedback on these slides.
  • 188. Russ Weakley Max Design ! Site: maxdesign.com.au Twitter: twitter.com/russmaxdesign Slideshare: slideshare.net/maxdesign Linkedin: linkedin.com/in/russweakley