SlideShare a Scribd company logo
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.
Accessible modal windows
Different 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.
!
<a href="#id-name" !
! title="Added info">!
! Add bank account!
</a>!
!
<a href="#id-name" !
! aria-label="Add bank account - Added
info">!
! Add bank account!
</a>!
!
<a href="#id-name" !
! aria-labelledby="info1">!
! Add bank account!
</a>!
<p id="info1" class="hidden">!
! Added info!
</p>!
!
<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.
!
<button id="id-name" !
! title="Added info">!
! Add bank account!
</button>!
!
<button id="id-name" !
! aria-label="Add bank account - Added
info">!
! Add bank account!
</button>!
!
<button id="id-name" !
! aria-labelledby="info1">!
! Add bank account!
</button>!
<p id="info1" class="hidden">!
! Added info!
</p>!
!
<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.
!
<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.
!
<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”.
!
<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”.
!
<div!
! aria-hidden="true">!
! ...!
</div>!
!
!
<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”.
!
<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”.
!
<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”.
!
<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.
Accessible modal windows
We could then add a description
of the modal window to this link.
!
<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.
Accessible modal windows
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.
!
<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

Learn Adobe analytics basics - Traffic variables
Learn Adobe analytics basics - Traffic variables Learn Adobe analytics basics - Traffic variables
Learn Adobe analytics basics - Traffic variables
Arunkumar Sundaram
 
Wireframe
WireframeWireframe
10 Usability Heuristics explained
10 Usability Heuristics explained10 Usability Heuristics explained
10 Usability Heuristics explained
Craft Design
 
Web accessibility
Web accessibilityWeb accessibility
Web accessibility
AGILEDROP
 
What is Dynamic Creative Optimisation (DCO)?
What is Dynamic Creative Optimisation (DCO)?What is Dynamic Creative Optimisation (DCO)?
What is Dynamic Creative Optimisation (DCO)?
Harsh Wardhan Dave
 
Understanding and Supporting Web Accessibility
Understanding and Supporting Web AccessibilityUnderstanding and Supporting Web Accessibility
Understanding and Supporting Web Accessibility
Rachel Cherry
 
Reusable acceptance criteria and test cases for accessibility
Reusable acceptance criteria and test cases for accessibilityReusable acceptance criteria and test cases for accessibility
Reusable acceptance criteria and test cases for accessibility
Intopia
 
User Flows
User FlowsUser Flows
User Flows
designtwg
 
How to build a design system
How to build a design systemHow to build a design system
How to build a design system
Faizur Rehman
 
Accesibilidad práctica con HTML5, CSS3 y WAI-ARIA
Accesibilidad práctica con HTML5, CSS3 y WAI-ARIAAccesibilidad práctica con HTML5, CSS3 y WAI-ARIA
Accesibilidad práctica con HTML5, CSS3 y WAI-ARIA
Manuel Razzari
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
David Gelb
 
Usability Testing Methods
Usability Testing MethodsUsability Testing Methods
Usability Testing Methods
dillarja
 
Calendario en Oracle Forms 6i
Calendario en Oracle Forms 6iCalendario en Oracle Forms 6i
Calendario en Oracle Forms 6i
Erick Cruz
 
CSUN 2023 Analytics.pptx
CSUN 2023 Analytics.pptxCSUN 2023 Analytics.pptx
CSUN 2023 Analytics.pptx
Ted Gies
 
Information architecture
Information architectureInformation architecture
Information architecture
Dr. V Vorvoreanu
 
Adobe analytics - playbook
Adobe analytics - playbookAdobe analytics - playbook
Adobe analytics - playbook
Baijnath Gupta
 
A quick introduction to Trello
A quick introduction to TrelloA quick introduction to Trello
A quick introduction to Trello
Belgium Atlassian User Group
 
Don't Make me Think - Book Summary
Don't Make me Think - Book Summary Don't Make me Think - Book Summary
Don't Make me Think - Book Summary
Adam Guerguis
 
Adobe analytics implementation secret hacks
Adobe analytics implementation secret hacksAdobe analytics implementation secret hacks
Adobe analytics implementation secret hacks
Alban Gérôme
 
User interface-design
User interface-designUser interface-design
User interface-design
DarkHorse Technologies Pvt Ltd
 

What's hot (20)

Learn Adobe analytics basics - Traffic variables
Learn Adobe analytics basics - Traffic variables Learn Adobe analytics basics - Traffic variables
Learn Adobe analytics basics - Traffic variables
 
Wireframe
WireframeWireframe
Wireframe
 
10 Usability Heuristics explained
10 Usability Heuristics explained10 Usability Heuristics explained
10 Usability Heuristics explained
 
Web accessibility
Web accessibilityWeb accessibility
Web accessibility
 
What is Dynamic Creative Optimisation (DCO)?
What is Dynamic Creative Optimisation (DCO)?What is Dynamic Creative Optimisation (DCO)?
What is Dynamic Creative Optimisation (DCO)?
 
Understanding and Supporting Web Accessibility
Understanding and Supporting Web AccessibilityUnderstanding and Supporting Web Accessibility
Understanding and Supporting Web Accessibility
 
Reusable acceptance criteria and test cases for accessibility
Reusable acceptance criteria and test cases for accessibilityReusable acceptance criteria and test cases for accessibility
Reusable acceptance criteria and test cases for accessibility
 
User Flows
User FlowsUser Flows
User Flows
 
How to build a design system
How to build a design systemHow to build a design system
How to build a design system
 
Accesibilidad práctica con HTML5, CSS3 y WAI-ARIA
Accesibilidad práctica con HTML5, CSS3 y WAI-ARIAAccesibilidad práctica con HTML5, CSS3 y WAI-ARIA
Accesibilidad práctica con HTML5, CSS3 y WAI-ARIA
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 
Usability Testing Methods
Usability Testing MethodsUsability Testing Methods
Usability Testing Methods
 
Calendario en Oracle Forms 6i
Calendario en Oracle Forms 6iCalendario en Oracle Forms 6i
Calendario en Oracle Forms 6i
 
CSUN 2023 Analytics.pptx
CSUN 2023 Analytics.pptxCSUN 2023 Analytics.pptx
CSUN 2023 Analytics.pptx
 
Information architecture
Information architectureInformation architecture
Information architecture
 
Adobe analytics - playbook
Adobe analytics - playbookAdobe analytics - playbook
Adobe analytics - playbook
 
A quick introduction to Trello
A quick introduction to TrelloA quick introduction to Trello
A quick introduction to Trello
 
Don't Make me Think - Book Summary
Don't Make me Think - Book Summary Don't Make me Think - Book Summary
Don't Make me Think - Book Summary
 
Adobe analytics implementation secret hacks
Adobe analytics implementation secret hacksAdobe analytics implementation secret hacks
Adobe analytics implementation secret hacks
 
User interface-design
User interface-designUser interface-design
User interface-design
 

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 accessible
Russ Weakley
 
Building Accessible Web Components
Building Accessible Web ComponentsBuilding Accessible Web Components
Building Accessible Web Components
Russ Weakley
 
Creating accessible modals and autocompletes
Creating accessible modals and autocompletesCreating accessible modals and autocompletes
Creating accessible modals and autocompletes
Russ Weakley
 
Building accessible web components without tears
Building accessible web components without tearsBuilding accessible web components without tears
Building accessible web components without tears
Russ 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 2018
Patrick 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 glory
Russ Weakley
 
Accessible code-patterns
Accessible code-patternsAccessible code-patterns
Accessible code-patterns
Francesco 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 introduction
Geoffroy Baylaender
 
ARIA and JavaScript Accessibility
ARIA and JavaScript AccessibilityARIA and JavaScript Accessibility
ARIA and JavaScript Accessibility
Paul Bohman
 
Semantic accessibility
Semantic accessibilitySemantic accessibility
Semantic accessibility
Ian 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 labels
Russ Weakley
 
jQuery mobile UX
jQuery mobile UXjQuery mobile UX
jQuery mobile UX
Inbal 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 Switch
Russ Weakley
 
Making modal dialogs accessible
Making modal dialogs accessibleMaking modal dialogs accessible
Making modal dialogs accessible
Vinod Tiwari
 
Show & tell - A more accessible accordion
Show & tell - A more accessible accordionShow & tell - A more accessible accordion
Show & tell - A more accessible accordion
Dan Dineen
 
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
PRUEXX Policy Documentation
 
Controls Use in Windows Presentation Foundation (WPF)
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.
 

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 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
 
Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)Controls Use in Windows Presentation Foundation (WPF)
Controls Use in Windows Presentation Foundation (WPF)
 

More from Russ Weakley

Accessible chat windows
Accessible chat windowsAccessible chat windows
Accessible chat windows
Russ Weakley
 
Accessible names & descriptions
Accessible names & descriptionsAccessible names & descriptions
Accessible names & descriptions
Russ Weakley
 
A deep dive into accessible names
A deep dive into accessible namesA deep dive into accessible names
A deep dive into accessible names
Russ 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 components
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?
What is WCAG 2 and why should we care?
Russ Weakley
 
Building an accessible progressive loader
Building an accessible progressive loaderBuilding an accessible progressive loader
Building an accessible progressive loader
Russ Weakley
 
Accessible Inline errors messages
Accessible Inline errors messagesAccessible Inline errors messages
Accessible Inline errors messages
Russ 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 Libraries
Russ Weakley
 
Accessibility in pattern libraries
Accessibility in pattern librariesAccessibility in pattern libraries
Accessibility in pattern libraries
Russ Weakley
 
Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24Building an accessible auto-complete - #ID24
Building an accessible auto-complete - #ID24
Russ Weakley
 
Building an accessible auto-complete
Building an accessible auto-completeBuilding an accessible auto-complete
Building an accessible auto-complete
Russ Weakley
 
Accessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesAccessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxes
Russ Weakley
 
Deep Dive into Line-Height
Deep Dive into Line-HeightDeep Dive into Line-Height
Deep Dive into Line-Height
Russ 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 syntax
Russ Weakley
 
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
Russ Weakley
 
Specialise or cross-skill
Specialise or cross-skillSpecialise or cross-skill
Specialise or cross-skill
Russ Weakley
 
CSS pattern libraries
CSS pattern librariesCSS pattern libraries
CSS pattern libraries
Russ Weakley
 
Responsive Web Design - more than just a buzzword
Responsive Web Design - more than just a buzzwordResponsive Web Design - more than just a buzzword
Responsive Web Design - more than just a buzzword
Russ 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?
 
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
 
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
 
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
 
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
 
Responsive Web Design - more than just a buzzword
Responsive Web Design - more than just a buzzwordResponsive Web Design - more than just a buzzword
Responsive Web Design - more than just a buzzword
 

Recently uploaded

How to Create Sequence Numbers in Odoo 17
How to Create Sequence Numbers in Odoo 17How to Create Sequence Numbers in Odoo 17
How to Create Sequence Numbers in Odoo 17
Celine George
 
AI_in_HR_Presentation Part 1 2024 0703.pdf
AI_in_HR_Presentation Part 1 2024 0703.pdfAI_in_HR_Presentation Part 1 2024 0703.pdf
AI_in_HR_Presentation Part 1 2024 0703.pdf
SrimanigandanMadurai
 
2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference
KlettWorldLanguages
 
Delegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use CasesDelegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use Cases
Celine George
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
Nguyen Thanh Tu Collection
 
NLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacherNLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacher
AngelicaLubrica
 
National Learning Camp( Reading Intervention for grade1)
National Learning Camp( Reading Intervention for grade1)National Learning Camp( Reading Intervention for grade1)
National Learning Camp( Reading Intervention for grade1)
SaadaGrijaldo1
 
(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening
MJDuyan
 
Views in Odoo - Advanced Views - Pivot View in Odoo 17
Views in Odoo - Advanced Views - Pivot View in Odoo 17Views in Odoo - Advanced Views - Pivot View in Odoo 17
Views in Odoo - Advanced Views - Pivot View in Odoo 17
Celine George
 
How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17
Celine George
 
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
PECB
 
Principles of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptxPrinciples of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptx
ibtesaam huma
 
Front Desk Management in the Odoo 17 ERP
Front Desk  Management in the Odoo 17 ERPFront Desk  Management in the Odoo 17 ERP
Front Desk Management in the Odoo 17 ERP
Celine George
 
The basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptxThe basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptx
heathfieldcps1
 
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUMENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
HappieMontevirgenCas
 
Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?
Rakesh Jalan
 
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptx
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptxUnlocking Educational Synergy-DIKSHA & Google Classroom.pptx
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptx
bipin95
 
No, it's not a robot: prompt writing for investigative journalism
No, it's not a robot: prompt writing for investigative journalismNo, it's not a robot: prompt writing for investigative journalism
No, it's not a robot: prompt writing for investigative journalism
Paul Bradshaw
 
Howe Writing Center - Orientation Summer 2024
Howe Writing Center - Orientation Summer 2024Howe Writing Center - Orientation Summer 2024
Howe Writing Center - Orientation Summer 2024
Elizabeth Walsh
 

Recently uploaded (20)

How to Create Sequence Numbers in Odoo 17
How to Create Sequence Numbers in Odoo 17How to Create Sequence Numbers in Odoo 17
How to Create Sequence Numbers in Odoo 17
 
AI_in_HR_Presentation Part 1 2024 0703.pdf
AI_in_HR_Presentation Part 1 2024 0703.pdfAI_in_HR_Presentation Part 1 2024 0703.pdf
AI_in_HR_Presentation Part 1 2024 0703.pdf
 
2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference
 
Delegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use CasesDelegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use Cases
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
 
NLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacherNLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacher
 
National Learning Camp( Reading Intervention for grade1)
National Learning Camp( Reading Intervention for grade1)National Learning Camp( Reading Intervention for grade1)
National Learning Camp( Reading Intervention for grade1)
 
(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening
 
Views in Odoo - Advanced Views - Pivot View in Odoo 17
Views in Odoo - Advanced Views - Pivot View in Odoo 17Views in Odoo - Advanced Views - Pivot View in Odoo 17
Views in Odoo - Advanced Views - Pivot View in Odoo 17
 
“A NOSSA CA(U)SA”. .
“A NOSSA CA(U)SA”.                      .“A NOSSA CA(U)SA”.                      .
“A NOSSA CA(U)SA”. .
 
How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17
 
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
 
Principles of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptxPrinciples of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptx
 
Front Desk Management in the Odoo 17 ERP
Front Desk  Management in the Odoo 17 ERPFront Desk  Management in the Odoo 17 ERP
Front Desk Management in the Odoo 17 ERP
 
The basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptxThe basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptx
 
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUMENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
 
Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?
 
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptx
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptxUnlocking Educational Synergy-DIKSHA & Google Classroom.pptx
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptx
 
No, it's not a robot: prompt writing for investigative journalism
No, it's not a robot: prompt writing for investigative journalismNo, it's not a robot: prompt writing for investigative journalism
No, it's not a robot: prompt writing for investigative journalism
 
Howe Writing Center - Orientation Summer 2024
Howe Writing Center - Orientation Summer 2024Howe Writing Center - Orientation Summer 2024
Howe Writing Center - Orientation Summer 2024
 

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.
  • 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.
  • 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.
  • 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