SlideShare une entreprise Scribd logo
1  sur  52
Accessible & Usable Web Forms.
Your How To Guide!
Rabab Gomaa
@RubysDo
Confoo.ca. March 11th
, 2017
http://bit.do/webforms
2
Objective
To explore coding techniques that make web forms
accessible and usable for all users and in particular for
people who use screen readers or keyboards.
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
3
Table of Contents
• What is an “accessible & usable” web form?
• Keyboard users examples
• What is WAI-ARIA & how screen readers navigate
web forms?
• Coding Techniques
1. Labeling & Grouping Controls
2. Form Instructions
3. Validating Input & User Notifications
4. Multi-page Forms
5. Dialog boxes
• Summary
• Questions (10 mins)
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
4
What is an “accessible and usable”
web form?
• A web form that users with disability can
understand, perceive, interact with without
barriers
• A web form that is designed to be easy to
use!
References:
W3C (2015, May 21). Notes on Using ARIA in HTML. Retrieved from https://www.w3.org/TR/aria-in-html/
WAI-ARIA Overview (2016, Jan 15). Retrieved from https://www.w3.org/WAI/intro/aria
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
5
Keyboard Users
Examples (1/2)
• Blind users
{use of screen reader e.g. JAWS, NVDA, Voice Over, etc.}
• Motor / physical disability
{Parkinson disease, hand tremor, heart attack consequence}
Snapshot sources:
Keyguard retrieved from from https://www.youtube.com/watch?v=zFv2myGVhl8
Mouse stick and head Wand retrieved from from http://webaim.org/articles/motor/assistive
Mouse stick user snapshot retrieved from https://www.w3.org/WAI/perspectives/keyboard.html
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
Keyguard is raised above the keyboard to guide
him to the specific key without making mistakes
Mouse stick Rubber tip to give better traction on keyboard, and
end to insert into the mouth.
Head Wand: A person moves the head to make the head wand
type characters, navigate through web pages
6
Keyboard Users
Examples (2/2)
• Temporary limited mobility
{broken arm}
• Computer problem
{Mouse is not functional}
• Preference / situations
{Use of laptop on the bed, standing up in metro or airport, carry
a baby with one hand}
References:
snapshot of keyguard from https://www.youtube.com/watch?v=zFv2myGVhl8
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
7
Using WAI-ARIA (1)
Accessible Rich Internet Applications (WAI-ARIA)
• WAI-ARIA defines a way to make Web
content and Web applications more
accessible to people with disabilities.
• Example:
References:
W3C (2015, May 21). Notes on Using ARIA in HTML. Retrieved from https://www.w3.org/TR/aria-in-html/
WAI-ARIA Overview (2016, Jan 15). Retrieved from https://www.w3.org/WAI/intro/aria
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
8
Using WAI-ARIA (2)
Accessible Rich Internet Applications (WAI-ARIA)
User Agent Support for WAI-ARIA:
•“User Agent support for WAI-ARIA varies, but overall support for WAI-
ARIA is improving” (W3C, ARIA Techniques for WCAG 2.0.)
First rule of using ARIA:
•Use a native HTML element instead of ARIA as long as it
is possibleReferences:
W3C (2015, May 21). Notes on Using ARIA in HTML. Retrieved from https://www.w3.org/TR/aria-in-html/
W3C, ARIA Techniques for WCAG 2.0. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/aria
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
Reliability Trend for aria-describedby
Last updated October 16, 2016
Source: https://goo.gl/GRBTo7
9
Using WAI-ARIA (3)
Keyboard Demo
<button> vs. <a role="button“> when pressing "spacebar" key
https://youtu.be/KCyC9CUFiDw
Notice:
Pressing “Spacebar” key on a link makes the page scroll down. The link is not activated.
•<button> can be activated using “Enter” or Spacebar” keyboard keys .
•<a>, <a role=“button”> can be activated using “Enter” key only.
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
<button> vs <a role=“button”>
10
Using WAI-ARIA (4)
Repurposing a <div> to radio group
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
• Many considerations for keyboard interaction
• Many WAI-ARIA roles, states and properties
involved
Learn More on required effort:
https://www.w3.org/TR/wai-aria-practices-1.1/#radiobutton
When possible use native HTML element e.g. radio group instead of repurposing
<div> to function as a radio group.
Why?
11
Using WAI-ARIA (3)
Under what circumstances?
• “If the feature is available in HTML [HTML5.1] but it
is not implemented or it is implemented, but
accessibility support is not.
• If the visual design constraints rule out the use of a
particular native element, because the element
cannot be styled as required.
• If the feature is not currently available in HTML.”
(W3C, Notes on Using ARIA in HTML)
Reference:
W3C (2015, May 21). Notes on Using ARIA in HTML. Retrieved from https://www.w3.org/TR/aria-in-html/
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
12
How screen readers
navigate web forms?
• Screen readers inform users when they
have entered into a form “Forms Mode” by
playing a sound
• In “Forms Mode” :
• User can edit input fields and interact with form
elements
• User generally navigate through a form using the TAB
key for next control and SHIFT+TAB for previous
control
• Demos of today are done using JAWS 17
Reference:
Freedom Scientific. Using Forms with JAWS and MAGic L. Retrieved from http://www.freedomscientific.com/Training/Surfs-Up/Forms.htm
WebAIM. Creating Accessible Forms. Retrieved from http://webaim.org/techniques/forms/
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
13
Screen readers navigate web forms
How does this matter?
Scenario of Failure : Jaws user fails to interact with a form
Non-accessible
Mimic of form element coded using <div>s and
<span>s
Accessible
Form element coded using HTML form controls
<label>& <select>
Snapshot 1 captured from JIRA Issue Tracking v7.1
• Developer used <div>s and <span>s and on-hover event (and not on
focus) to edit assignee name instead of select element
• Jaws user hears no switch to forms mode and missed the edit feature
(1)
(2)
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
14
Labeling Controls
• “Associating labels with form controls allows
assistive technology to recognize the label and
present it to the user”WCAG WG, EOWG (2015, March 2)
• Possible ways of associating labels and form
controls:
1. <label> & for/id attributes (recommended)
2. aria-labelledby attribute
3. wrapping <label> around text and control
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
15
Association of labels
1. <label> & for/id
• A <label> is attached to a specific form control
through the use of for and id attributes.
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
16
Association of labels
2. aria-labelledby
• With aria-labelledby, the form field indicates which
element labels it by referencing its id attribute
Reference:
W3C (2014). ARIA9: Using aria-labelledby to concatenate a label from several text nodes. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/ARIA9.html
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
17
Association of Labels
3. Associating labels implicitly
• When form controls cannot be labelled explicitly, the
label element is used as a container for both the
form control and the label text, so that the two are
associated implicitly.
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
18
Association of Labels
Screen Reader Demo
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Association of labels demo - https://youtu.be/PjKAusofvP0
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
19
Invisible Labels
• Label is visually hidden to avoid redundancy for users who can
derive the purpose from the visual cues
Warning! Screen readers hide elements from their users when they are
styled using display: none; and visibility: hidden;Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
WET 4
class
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
20
Placeholder Attribute
A placeholder attribute can't be a replacement for a label.
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Reference:
W3C (October, 2014). A vocabulary and associated APIs for HTML and XHTML. Retrieved from https://www.w3.org/TR/html5/forms.html#the-placeholder-attribute
“Use of the placeholder attribute as a replacement for a label can reduce the
accessibility and usability of the control for a range of users including older
users and users with cognitive, mobility, fine motor skill or vision impairments.”
(W3C, placeholder-attribute)
BAD PRACTISE
Notice: The placeholder text disappears as soon as the user enters a value.
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
21
Placeholder Attribute
A placeholder can be used to display short hint while keeping a
visible label.Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Screenshot source: Government of Canada – Open data website
Notice: Each form control has a visible label!
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
22
Visual Position of Label text
Best practises
• Which is best for accessibility and usability?
Placing labels above OR beside the form fields
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
23
Visual Position of Label text
Best practises
• Placing labels above the form fields and position
labels to the right of radio buttons and checkboxes.Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
GOODLearn More!
W3C. G162: Positioning labels to maximize predictability of relationships. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/G162.html
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
24
Grouping Controls
• “Grouping related form controls makes forms more
understandable for all users, as related controls are
easier to identify. It also makes it easier for people to
focus on smaller and more manageable groups
rather than try to grasp the entire form at once.”WCAG
WG, EOWG (2015, March 2)
• Possible ways of grouping form controls include:
1. <fieldset> and <legend> elements
2. <optgroup> to group items inside a
selection list
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
25
Grouping Controls
1.<fieldset> & <legend> (1)
• <fieldset> has a <legend> that is the label of the
group
• Important for related radio buttons and checkboxes
Reference:
W3C. WCAG H71: Providing a description for groups of form controls using fieldset and legend elements. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/H71
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
26
Grouping Controls
1.<fieldset> & <legend> (2)
• Important for related radio buttons and checkboxes
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Reference:
W3C. WCAG H71: Providing a description for groups of form controls using fieldset and legend elements. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/H71
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
27
Grouping Controls
1.<fieldset> & <legend> (3)
Heading H1-H6 now allowed inside a <legend> (HTML 5.2 Working Draft)
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Reference: W3C, HTML 5.2 <legend>. Retrieved from https://www.w3.org/TR/html52/
Remember !
- To do a screen reader test before
to determine the level of support.
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
28
Grouping Controls
2.<optgroup> inside a selection list
• Group <option> in a selection list using <optgroup>
• Label <optgroup> with label attribute for users to
know what to expect inside the group
Reference:
W3C. H85: Using OPTGROUP to group OPTION elements inside a SELECT. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/H85
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
29
Form Instructions
• “Provide instructions to help users understand how
to complete the form and use individual form
controls. ”WCAG WG, EOWG (2015, March 2)
• Types of Instructions:
1. Overall Instruction
(instructions that apply to the entire form)
2. In-line instructions (specific to a form element)
(example of input , instructions on filling a field)
• 2.1 Instruction within <label>
• 2.2 Instruction associated with control using
<aria-describedby“
3. Instruction between form controls
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
30
Form Instructions
1. Overall Instruction
• “Where relevant, provide such instructions that apply to the entire form
before the <form> element to ensure that it is read aloud by screen
readers before they switch to “Forms Mode”.WCAG WG, EOWG (2015, March 2)
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
31
Form Instructions
2.1 Instruction within <label>
• Within <label> for simple use cases indicating:
• required form controls
• expected data format and example
References:
W3C. H90: Indicating required form controls using label or legend. Retrieved from https://www.w3.org/TR/2014/NOTE-WCAG20-TECHS-20140916/H90
W3C. G89: Providing expected data format and example. Retrieved from https://www.w3.org/TR/2014/NOTE-WCAG20-TECHS-20140916/G89
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
32
Form Instructions
2.2.arai-describedby (1)
• Use aria-describedby to associate instructions with
form fields while there is a form label.
• Instructions will be available to users when the form
control has focus
Reference:
W3C, ARIA1: Using the aria-describedby property to provide a descriptive label for user interface controls. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/ARIA1.html
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
W3C, WCAG 3.3.2 Labels or Instructions. Retrieved from http://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-cues.html
WEBAIM, Creating Accessible Forms. Retrieved from http://webaim.org/techniques/forms/advanced
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
33
Form Instructions
2.2.arai-describedby (2)
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Instruction
Government of Canada - Statistic Canada,
2016 Census
Screenshot Reference:
Government of Canada - Statistic Canada, 2016 Census - Start questionnaire. Retrieved from https://www133.statcan.gc.ca/census-recensement/en/login-connexion/open-ouvrir
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
34
Form Instructions
2.2.arai-describedby (3)
Reference:
W3C, ARIA1: Using the aria-describedby property to provide a descriptive label for user interface controls. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/ARIA1.html
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
W3C, WCAG 3.3.2 Labels or Instructions. Retrieved from http://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-cues.html
WEBAIM, Creating Accessible Forms. Retrieved from http://webaim.org/techniques/forms/advanced
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
35
Form Instructions
Screen Reader demo
Form instructions demo - https://youtu.be/9rIT595KrZQ
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
36
Form Instructions
3. Instruction between form elements
• Add tabindex=“0“ to instruction between form
elements to receive focus and be included in the
natural tab order
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
<p tabindex=“0”>Once Click offers
you convenient features to modify your
online content</p>
<p tabindex=“0”>Please ensure
accuracy of input before submitting
the form</p>
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
37
Validating Input &
User Notification
• Validating Input
• User Notifications
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
38
Validating Input & User Notification
Validating Input
1) Validating required input fields
•Indicate required fields in the label text
•Add required attribute to form controls to indicate that user input is required before
submission
W3C. ARIA2: Identifying a required field with the aria-required property. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/ARIA2.html
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
required=“required”
When user clicks submit without filling
a mandatory field, user agent indicates
to the user that input is required before
submission “Please fill out this field”
aria-required=“true”
provided redundantly to support web browsers that don’t
communicate the required attribute to assistive technology to inform
assistive technologies about required controls so that they are
appropriately announced to the users (as opposed to validating the
input)
39
Validating Input & User Notification
Validating Input
2) Validating common input for input fields
•HTML5 validates common types for an <input> element such as tel, email, urlLabeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
40
Validating Input & User Notification
User Notifications
Provide feedback to users about the results of their form submission.
Error messages need to be informative - should provide guidance on how
to correct mistakes.
•Notification summary of errors:
Overall feedback with list of errors that occurred provided after user
submission of the form provided at the top of the page
•Notification on form control:
Inline specific feedback provided at or near the form controls
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
W3C. Error Identification: Understanding SC 3.3.1. https://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-identified.html
Screenshot inspired from : Form validation Working examples - Web Experience Toolkit http://wet-boew.github.io/v4.0-ci/demos/formvalid/formvalid-en.html
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
41
Validating Input & User Notification
Form Validation Demo
Example uses WET 4 validation of input and error message handling (http://wet-boew.github.io/v4.0-ci/demos/index-en.html)
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Notification on form control:
•Error message placed within
the <label> to not be missed
•Error message provides
guidance on how to correct
mistakes
Notification summary of
errors:
•Focus moved from the submit
button to list of errors
•Notification placed at the top
of the form and list all errors
•Each error linked to the
relevant control
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
42
Validating Input & User Notification
Form Validation Demo
Web Experience Toolkit (WET 4) “Form validation” provides
example on validation of input and error message handling
Screenshot source:
WET 4 Working examples - Web Experience Toolkit. Retrieved from http://wet-boew.github.io/v4.0-ci/demos/index-en.html
Hint: Google “WET 4 examples” to
find this page!
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
43
Multi-page Form
• Divide long forms into multiple smaller forms that
constitute a series of logical steps or stages, and
• Inform users about their progress.
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
44
Multi-page Form
Example
Reference:
W3C. WCAG G98: Providing the ability for the user to review and correct answers before submitting. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/G98.html
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Repeat overall
instructions on
every page before
<form>
Indicating
progress in
each step
(title, h1,
nav)
The ability to review
and correct answers
before submitting
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
45
Multi-page Form
Indicating progress (1)
• “Each step should inform the user about the
progress they are making” WCAG WG, EOWG (2015, March 2)
• Possible techniques include using:
1. Page <title>
2. The main heading <h1>
3. HTML5 <progress> element
4. Step-by-step indicator
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
46
Multi-page Form
Indicating progress (2)
1. Page <title>
(The progress information should precede other information
provided in the title)
2. The main heading <h1>
(Include progress in prominent heading)
<h1>Billing Address (step 2 of 4)</h1>
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
<title>Step 2 of 4 : Billing Address - Camp Registration</title>
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
47
Multi-page Form
Indicating progress (3)
3.1 HTML5 <progress> element
(Inform users about the progress such as in a survey)
Note: Some browsers do not support <progress> functionality natively which requires
a polyfill to emulate the same functionality using generic HTML and WAI-ARIA.
•<div role="progressbar" aria-valuenow="29" aria-valuemin="0" aria-
valuemax="100">29 %</div>
3.2 Custom progress bar (personal preference!)
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
Screenshot Source: WCAG WG, EOWG (2015, March 2). Forms Concepts
<div><span class="wb-inv">Progress:</span>
<span id="ProgressText">29</span>% <span
class="wb-inv"> complete</span></div>
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
48
Multi-page Form
Indicating progress (3)
4. Step-by-step indicator
(known number of steps to be completed)
<ol class="breadcrumb">
<li class="h5"><a href="childinfo.html"> <span class="glyphicon glyphicon-ok"> </span>
<span class="wb-inv">Completed:</span> Child Information</a></li>
<li class="h5"><span class="glyphicon glyphicon-unchecked"> </span>
<span class="wb-inv">Current:</span> Billing Address</li>
<li>Review Registration</li>
<li>Complete Registration</li>
</ol>
Reference:
WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
49
Dialog Boxes (before and after)
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
Non-accessible dialog box issues
https://youtu.be/cFW4VVzcec4?t=25s
•User has access to background
page
•Dialog box has not title
When developing a dialog box, ensure that:
The dialog box receives focus
User knows that he is in a dialog box
Dialog box has a title
User does not have access to the background page.
Example of a non-accessible dialog box:
50
Dialog Boxes (before and after)
Labeling Controls
. Association of labels
. Invisible labels
. Visual position
Grouping Controls
Form Instructions
Validating Input &
User Notifications
Multi-page Forms
Dialog Boxes
Summary
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
HTML snippet:
<div role="dialog" aria-labelledby="login">
<h1 id="login">Log in to Kangaroo
Kilometers</h1>
<!-- input fields -->
</div>
 The dialog box receives focus
 User knows that he is in a dialog box
 Dialog box has a title
JS pseudo code:
// When dialog box is opened
//Select the background page main wrapper and give it aria hidden="true"
document.querySelector('.wrapper').setAttribute('aria-hidden', true);
// When dialog box is closed
//change the background page main wrapper to aria-hidden="false"
document.querySelector('.wrapper').setAttribute('aria-hidden', false);
 User does not have access to the background page.
A role="dialog" interrupts the current
processing in order to prompt the
user to enter information or require a
response
Accessible Dialog box example https://www.youtube.com/watch?
v=nLjAqr6YDZE
51
Summary
With the techniques of labeling & grouping controls,
Form instructions , validating Input, user notifications
and multi-page forms your web forms will be easier to
understand and more accessible for all users.
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
52
Questions Period
Resources
•Google Accessibility Course (Lesson 5 – ARIA)
https://www.udacity.com/course/web-accessibility--ud89
•Creating Accessible Forms
http://webaim.org/techniques/forms/
•Forms Concepts
http://www.w3.org/WAI/tutorials/forms/
•User Agent Support Notes for HTML and XHTML Techniques
https://www.w3.org/WAI/WCAG20/Techniques/ua-notes/
Thank you for your attention!
Rabab Gomaa
@RubysDo
http://bit.do/webforms
•Notes on Using ARIA in HTML
https://www.w3.org/TR/aria-in-html/
•WAI-ARIA Authoring Practices 1.1
https://www.w3.org/TR/wai-aria-practices-1.1/
•Buttons, Submits, and Divs, Oh Hell
http://adrianroselli.com/2016/01/links-buttons-submits-and-divs-
oh-hell.html
•JAWS Screen reader Demos
https://www.youtube.com/channel/UCVoa-B5tR08-
T2c1ku5mhfA
•How to Meet WCAG 2.0
https://www.w3.org/WAI/WCAG20/quickref/
@RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms

Contenu connexe

Tendances

Practical Accessibility Testing
Practical Accessibility TestingPractical Accessibility Testing
Practical Accessibility TestingGlenda Sims
 
Wrangling Large Scale Frontend Web Applications
Wrangling Large Scale Frontend Web ApplicationsWrangling Large Scale Frontend Web Applications
Wrangling Large Scale Frontend Web ApplicationsRyan Roemer
 
HTML5--The 30,000' View (A fast-paced overview of HTML5)
HTML5--The 30,000' View (A fast-paced overview of HTML5)HTML5--The 30,000' View (A fast-paced overview of HTML5)
HTML5--The 30,000' View (A fast-paced overview of HTML5)Peter Lubbers
 
Web Frameworks of the Future
Web Frameworks of the FutureWeb Frameworks of the Future
Web Frameworks of the Futureelliando dias
 
Attacking and Defending Mobile Applications
Attacking and Defending Mobile ApplicationsAttacking and Defending Mobile Applications
Attacking and Defending Mobile ApplicationsJerod Brennen
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Todaydavyjones
 
The Future of the Web: HTML5
The Future of the Web: HTML5The Future of the Web: HTML5
The Future of the Web: HTML5Derek Bender
 
HTML5 and web platform
HTML5 and web platformHTML5 and web platform
HTML5 and web platformdynamis
 
HTML5 & Web Platform
HTML5 & Web PlatformHTML5 & Web Platform
HTML5 & Web PlatformSwapSkills
 
Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications? Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications? Carin Campanario
 
Sandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedSandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedMinded Security
 
SharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & AccessibilitySharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & AccessibilityMavention
 
Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Aaron Gustafson
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWebDave Bouwman
 
Innovation vs. Impatience - keynote at JSOpenDay London 2015
Innovation vs. Impatience - keynote at JSOpenDay London 2015Innovation vs. Impatience - keynote at JSOpenDay London 2015
Innovation vs. Impatience - keynote at JSOpenDay London 2015Christian Heilmann
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An OverviewNagendra Um
 

Tendances (20)

Practical Accessibility Testing
Practical Accessibility TestingPractical Accessibility Testing
Practical Accessibility Testing
 
Wrangling Large Scale Frontend Web Applications
Wrangling Large Scale Frontend Web ApplicationsWrangling Large Scale Frontend Web Applications
Wrangling Large Scale Frontend Web Applications
 
HTML5--The 30,000' View (A fast-paced overview of HTML5)
HTML5--The 30,000' View (A fast-paced overview of HTML5)HTML5--The 30,000' View (A fast-paced overview of HTML5)
HTML5--The 30,000' View (A fast-paced overview of HTML5)
 
HTML5 Report Card
HTML5 Report CardHTML5 Report Card
HTML5 Report Card
 
Looking into HTML5
Looking into HTML5Looking into HTML5
Looking into HTML5
 
Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3Introduction to HTML5 & CSS3
Introduction to HTML5 & CSS3
 
Web Frameworks of the Future
Web Frameworks of the FutureWeb Frameworks of the Future
Web Frameworks of the Future
 
Attacking and Defending Mobile Applications
Attacking and Defending Mobile ApplicationsAttacking and Defending Mobile Applications
Attacking and Defending Mobile Applications
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
The Future of the Web: HTML5
The Future of the Web: HTML5The Future of the Web: HTML5
The Future of the Web: HTML5
 
HTML5 and web platform
HTML5 and web platformHTML5 and web platform
HTML5 and web platform
 
HTML5 & Web Platform
HTML5 & Web PlatformHTML5 & Web Platform
HTML5 & Web Platform
 
Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications? Augmented Reality (AR) - The Future of Mobile Applications?
Augmented Reality (AR) - The Future of Mobile Applications?
 
Sandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession LearnedSandboxing JS and HTML. A lession Learned
Sandboxing JS and HTML. A lession Learned
 
SharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & AccessibilitySharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & Accessibility
 
Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]Web Standards: Fueling Innovation [Web Design World Boston '08]
Web Standards: Fueling Innovation [Web Design World Boston '08]
 
Usability in the GeoWeb
Usability in the GeoWebUsability in the GeoWeb
Usability in the GeoWeb
 
Access by Default
Access by DefaultAccess by Default
Access by Default
 
Innovation vs. Impatience - keynote at JSOpenDay London 2015
Innovation vs. Impatience - keynote at JSOpenDay London 2015Innovation vs. Impatience - keynote at JSOpenDay London 2015
Innovation vs. Impatience - keynote at JSOpenDay London 2015
 
HTML5: An Overview
HTML5: An OverviewHTML5: An Overview
HTML5: An Overview
 

En vedette

Monitoring system with Grafana and StatsD
Monitoring system with Grafana and StatsDMonitoring system with Grafana and StatsD
Monitoring system with Grafana and StatsDArtur Prado
 
The Progressive Web and its New Challenges - Confoo Montréal 2017
The Progressive Web and its New Challenges - Confoo Montréal 2017The Progressive Web and its New Challenges - Confoo Montréal 2017
The Progressive Web and its New Challenges - Confoo Montréal 2017Christian Heilmann
 
Design in Tech Report 2017
Design in Tech Report 2017Design in Tech Report 2017
Design in Tech Report 2017John Maeda
 
The Soul in The Machine - Developing for Humans
The Soul in The Machine - Developing for HumansThe Soul in The Machine - Developing for Humans
The Soul in The Machine - Developing for HumansChristian Heilmann
 
Securing MicroServices - ConFoo 2017
Securing MicroServices - ConFoo 2017Securing MicroServices - ConFoo 2017
Securing MicroServices - ConFoo 2017Majid Fatemian
 
WAI-ARIAの考え方と使い方を整理しよう
WAI-ARIAの考え方と使い方を整理しようWAI-ARIAの考え方と使い方を整理しよう
WAI-ARIAの考え方と使い方を整理しようNozomi Sawada
 
London Growth Marketing Power Session @ London Startup Growth Meetup - 27 Jan...
London Growth Marketing Power Session @ London Startup Growth Meetup - 27 Jan...London Growth Marketing Power Session @ London Startup Growth Meetup - 27 Jan...
London Growth Marketing Power Session @ London Startup Growth Meetup - 27 Jan...Growth Tribe
 
Channel Marketing Scorecard
Channel Marketing ScorecardChannel Marketing Scorecard
Channel Marketing ScorecardAveretek
 
Programme d'Emmanuel Macron
Programme d'Emmanuel MacronProgramme d'Emmanuel Macron
Programme d'Emmanuel MacronEmmanuel Macron
 
Notes are not enough! Why relying on your notes will lead you down the garden...
Notes are not enough! Why relying on your notes will lead you down the garden...Notes are not enough! Why relying on your notes will lead you down the garden...
Notes are not enough! Why relying on your notes will lead you down the garden...Ash Donaldson
 
政府債務の償還と財源の通貨発行権(借換債と交付債)
政府債務の償還と財源の通貨発行権(借換債と交付債)政府債務の償還と財源の通貨発行権(借換債と交付債)
政府債務の償還と財源の通貨発行権(借換債と交付債)Kenji Katsuragi
 
Google AMP 1 an après : quel bilan, quelles perspectives ?
Google AMP 1 an après : quel bilan, quelles perspectives ?Google AMP 1 an après : quel bilan, quelles perspectives ?
Google AMP 1 an après : quel bilan, quelles perspectives ?Virginie Clève - largow ☕️
 
うちではこうやっています UI構築のルールとPlaymakerを使った画面遷移
うちではこうやっています UI構築のルールとPlaymakerを使った画面遷移うちではこうやっています UI構築のルールとPlaymakerを使った画面遷移
うちではこうやっています UI構築のルールとPlaymakerを使った画面遷移まべ☆てっく運営
 
Spark Summit - Stratio Streaming
Spark Summit - Stratio Streaming Spark Summit - Stratio Streaming
Spark Summit - Stratio Streaming Stratio
 
サーバーレスでシステムを開発する時に⼤切な事
サーバーレスでシステムを開発する時に⼤切な事サーバーレスでシステムを開発する時に⼤切な事
サーバーレスでシステムを開発する時に⼤切な事Hiroyuki Hiki
 
Content Creation Process
Content Creation ProcessContent Creation Process
Content Creation ProcessSujan Patel
 

En vedette (18)

Monitoring system with Grafana and StatsD
Monitoring system with Grafana and StatsDMonitoring system with Grafana and StatsD
Monitoring system with Grafana and StatsD
 
The Progressive Web and its New Challenges - Confoo Montréal 2017
The Progressive Web and its New Challenges - Confoo Montréal 2017The Progressive Web and its New Challenges - Confoo Montréal 2017
The Progressive Web and its New Challenges - Confoo Montréal 2017
 
Design in Tech Report 2017
Design in Tech Report 2017Design in Tech Report 2017
Design in Tech Report 2017
 
Microservices
MicroservicesMicroservices
Microservices
 
The Soul in The Machine - Developing for Humans
The Soul in The Machine - Developing for HumansThe Soul in The Machine - Developing for Humans
The Soul in The Machine - Developing for Humans
 
Securing MicroServices - ConFoo 2017
Securing MicroServices - ConFoo 2017Securing MicroServices - ConFoo 2017
Securing MicroServices - ConFoo 2017
 
WAI-ARIAの考え方と使い方を整理しよう
WAI-ARIAの考え方と使い方を整理しようWAI-ARIAの考え方と使い方を整理しよう
WAI-ARIAの考え方と使い方を整理しよう
 
London Growth Marketing Power Session @ London Startup Growth Meetup - 27 Jan...
London Growth Marketing Power Session @ London Startup Growth Meetup - 27 Jan...London Growth Marketing Power Session @ London Startup Growth Meetup - 27 Jan...
London Growth Marketing Power Session @ London Startup Growth Meetup - 27 Jan...
 
Channel Marketing Scorecard
Channel Marketing ScorecardChannel Marketing Scorecard
Channel Marketing Scorecard
 
Programme d'Emmanuel Macron
Programme d'Emmanuel MacronProgramme d'Emmanuel Macron
Programme d'Emmanuel Macron
 
Notes are not enough! Why relying on your notes will lead you down the garden...
Notes are not enough! Why relying on your notes will lead you down the garden...Notes are not enough! Why relying on your notes will lead you down the garden...
Notes are not enough! Why relying on your notes will lead you down the garden...
 
政府債務の償還と財源の通貨発行権(借換債と交付債)
政府債務の償還と財源の通貨発行権(借換債と交付債)政府債務の償還と財源の通貨発行権(借換債と交付債)
政府債務の償還と財源の通貨発行権(借換債と交付債)
 
Google AMP 1 an après : quel bilan, quelles perspectives ?
Google AMP 1 an après : quel bilan, quelles perspectives ?Google AMP 1 an après : quel bilan, quelles perspectives ?
Google AMP 1 an après : quel bilan, quelles perspectives ?
 
Creative & Digital Business Briefing - March 2017
Creative & Digital Business Briefing - March 2017Creative & Digital Business Briefing - March 2017
Creative & Digital Business Briefing - March 2017
 
うちではこうやっています UI構築のルールとPlaymakerを使った画面遷移
うちではこうやっています UI構築のルールとPlaymakerを使った画面遷移うちではこうやっています UI構築のルールとPlaymakerを使った画面遷移
うちではこうやっています UI構築のルールとPlaymakerを使った画面遷移
 
Spark Summit - Stratio Streaming
Spark Summit - Stratio Streaming Spark Summit - Stratio Streaming
Spark Summit - Stratio Streaming
 
サーバーレスでシステムを開発する時に⼤切な事
サーバーレスでシステムを開発する時に⼤切な事サーバーレスでシステムを開発する時に⼤切な事
サーバーレスでシステムを開発する時に⼤切な事
 
Content Creation Process
Content Creation ProcessContent Creation Process
Content Creation Process
 

Similaire à Accessible & Usable Web Forms. Your How To Guide!

jQuery: Accessibility, Mobile und Responsive
jQuery: Accessibility, Mobile und ResponsivejQuery: Accessibility, Mobile und Responsive
jQuery: Accessibility, Mobile und ResponsivePeter Rozek
 
Accessibility Testing Using Screen Readers
Accessibility Testing Using Screen ReadersAccessibility Testing Using Screen Readers
Accessibility Testing Using Screen ReadersRabab Gomaa
 
Seth Duffy Accessibility97035
Seth Duffy   Accessibility97035Seth Duffy   Accessibility97035
Seth Duffy Accessibility97035FNian
 
Website Accessibility: The Internet is for Everyone
Website Accessibility: The Internet is for EveryoneWebsite Accessibility: The Internet is for Everyone
Website Accessibility: The Internet is for EveryoneCarie Fisher, MS, CPWA
 
HTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm SoftwareHTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm SoftwareRomin Irani
 
A Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With DisabilitiesA Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With DisabilitiesAayush Shrestha
 
Getting Down and Dirty with Accessibility and Usability workshop at TCUK12
Getting Down and Dirty with Accessibility and Usability workshop at TCUK12Getting Down and Dirty with Accessibility and Usability workshop at TCUK12
Getting Down and Dirty with Accessibility and Usability workshop at TCUK12Karen Mardahl
 
Four Principles of Accessibility UK Version
Four Principles of Accessibility UK Version Four Principles of Accessibility UK Version
Four Principles of Accessibility UK Version Homer Gaines
 
Testing For Web Accessibility
Testing For Web AccessibilityTesting For Web Accessibility
Testing For Web AccessibilityHagai Asaban
 
Rapid Introduction to Web Accessibility
Rapid Introduction to Web AccessibilityRapid Introduction to Web Accessibility
Rapid Introduction to Web AccessibilityAll Things Open
 
Accessibility Workshop
Accessibility WorkshopAccessibility Workshop
Accessibility WorkshopLar Veale
 
Web accessibility 101: Intersectional Inclusion in the Digital World
Web accessibility 101: Intersectional Inclusion in the Digital WorldWeb accessibility 101: Intersectional Inclusion in the Digital World
Web accessibility 101: Intersectional Inclusion in the Digital WorldLeonardo Graterol
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the webIvano Malavolta
 
Twitter and Web Accessibility (EASI Webinar)
Twitter and Web Accessibility (EASI Webinar)Twitter and Web Accessibility (EASI Webinar)
Twitter and Web Accessibility (EASI Webinar)Dennis Lembree
 
Accessibility (WCAG) Draft 1
Accessibility (WCAG) Draft 1Accessibility (WCAG) Draft 1
Accessibility (WCAG) Draft 1Jaime Brown
 

Similaire à Accessible & Usable Web Forms. Your How To Guide! (20)

jQuery: Accessibility, Mobile und Responsive
jQuery: Accessibility, Mobile und ResponsivejQuery: Accessibility, Mobile und Responsive
jQuery: Accessibility, Mobile und Responsive
 
Accessibility Testing Using Screen Readers
Accessibility Testing Using Screen ReadersAccessibility Testing Using Screen Readers
Accessibility Testing Using Screen Readers
 
Seth Duffy Accessibility97035
Seth Duffy   Accessibility97035Seth Duffy   Accessibility97035
Seth Duffy Accessibility97035
 
Website Accessibility: The Internet is for Everyone
Website Accessibility: The Internet is for EveryoneWebsite Accessibility: The Internet is for Everyone
Website Accessibility: The Internet is for Everyone
 
HTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm SoftwareHTML5 Webinar - Mind Storm Software
HTML5 Webinar - Mind Storm Software
 
A Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With DisabilitiesA Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With Disabilities
 
Getting Down and Dirty with Accessibility and Usability workshop at TCUK12
Getting Down and Dirty with Accessibility and Usability workshop at TCUK12Getting Down and Dirty with Accessibility and Usability workshop at TCUK12
Getting Down and Dirty with Accessibility and Usability workshop at TCUK12
 
Accessibility part 2
Accessibility part 2Accessibility part 2
Accessibility part 2
 
Four Principles of Accessibility UK Version
Four Principles of Accessibility UK Version Four Principles of Accessibility UK Version
Four Principles of Accessibility UK Version
 
Accessibility and JS: side-by-side
Accessibility and JS: side-by-sideAccessibility and JS: side-by-side
Accessibility and JS: side-by-side
 
Testing For Web Accessibility
Testing For Web AccessibilityTesting For Web Accessibility
Testing For Web Accessibility
 
Rapid Introduction to Web Accessibility
Rapid Introduction to Web AccessibilityRapid Introduction to Web Accessibility
Rapid Introduction to Web Accessibility
 
Web2.0-IFF
Web2.0-IFFWeb2.0-IFF
Web2.0-IFF
 
Web2.0-IFF
Web2.0-IFFWeb2.0-IFF
Web2.0-IFF
 
Accessibility Workshop
Accessibility WorkshopAccessibility Workshop
Accessibility Workshop
 
Web accessibility 101: Intersectional Inclusion in the Digital World
Web accessibility 101: Intersectional Inclusion in the Digital WorldWeb accessibility 101: Intersectional Inclusion in the Digital World
Web accessibility 101: Intersectional Inclusion in the Digital World
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
 
Twitter and Web Accessibility (EASI Webinar)
Twitter and Web Accessibility (EASI Webinar)Twitter and Web Accessibility (EASI Webinar)
Twitter and Web Accessibility (EASI Webinar)
 
Interface design
Interface designInterface design
Interface design
 
Accessibility (WCAG) Draft 1
Accessibility (WCAG) Draft 1Accessibility (WCAG) Draft 1
Accessibility (WCAG) Draft 1
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Dernier (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Accessible & Usable Web Forms. Your How To Guide!

  • 1. Accessible & Usable Web Forms. Your How To Guide! Rabab Gomaa @RubysDo Confoo.ca. March 11th , 2017 http://bit.do/webforms
  • 2. 2 Objective To explore coding techniques that make web forms accessible and usable for all users and in particular for people who use screen readers or keyboards. @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 3. 3 Table of Contents • What is an “accessible & usable” web form? • Keyboard users examples • What is WAI-ARIA & how screen readers navigate web forms? • Coding Techniques 1. Labeling & Grouping Controls 2. Form Instructions 3. Validating Input & User Notifications 4. Multi-page Forms 5. Dialog boxes • Summary • Questions (10 mins) @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 4. 4 What is an “accessible and usable” web form? • A web form that users with disability can understand, perceive, interact with without barriers • A web form that is designed to be easy to use! References: W3C (2015, May 21). Notes on Using ARIA in HTML. Retrieved from https://www.w3.org/TR/aria-in-html/ WAI-ARIA Overview (2016, Jan 15). Retrieved from https://www.w3.org/WAI/intro/aria @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 5. 5 Keyboard Users Examples (1/2) • Blind users {use of screen reader e.g. JAWS, NVDA, Voice Over, etc.} • Motor / physical disability {Parkinson disease, hand tremor, heart attack consequence} Snapshot sources: Keyguard retrieved from from https://www.youtube.com/watch?v=zFv2myGVhl8 Mouse stick and head Wand retrieved from from http://webaim.org/articles/motor/assistive Mouse stick user snapshot retrieved from https://www.w3.org/WAI/perspectives/keyboard.html @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms Keyguard is raised above the keyboard to guide him to the specific key without making mistakes Mouse stick Rubber tip to give better traction on keyboard, and end to insert into the mouth. Head Wand: A person moves the head to make the head wand type characters, navigate through web pages
  • 6. 6 Keyboard Users Examples (2/2) • Temporary limited mobility {broken arm} • Computer problem {Mouse is not functional} • Preference / situations {Use of laptop on the bed, standing up in metro or airport, carry a baby with one hand} References: snapshot of keyguard from https://www.youtube.com/watch?v=zFv2myGVhl8 @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 7. 7 Using WAI-ARIA (1) Accessible Rich Internet Applications (WAI-ARIA) • WAI-ARIA defines a way to make Web content and Web applications more accessible to people with disabilities. • Example: References: W3C (2015, May 21). Notes on Using ARIA in HTML. Retrieved from https://www.w3.org/TR/aria-in-html/ WAI-ARIA Overview (2016, Jan 15). Retrieved from https://www.w3.org/WAI/intro/aria @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 8. 8 Using WAI-ARIA (2) Accessible Rich Internet Applications (WAI-ARIA) User Agent Support for WAI-ARIA: •“User Agent support for WAI-ARIA varies, but overall support for WAI- ARIA is improving” (W3C, ARIA Techniques for WCAG 2.0.) First rule of using ARIA: •Use a native HTML element instead of ARIA as long as it is possibleReferences: W3C (2015, May 21). Notes on Using ARIA in HTML. Retrieved from https://www.w3.org/TR/aria-in-html/ W3C, ARIA Techniques for WCAG 2.0. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/aria @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms Reliability Trend for aria-describedby Last updated October 16, 2016 Source: https://goo.gl/GRBTo7
  • 9. 9 Using WAI-ARIA (3) Keyboard Demo <button> vs. <a role="button“> when pressing "spacebar" key https://youtu.be/KCyC9CUFiDw Notice: Pressing “Spacebar” key on a link makes the page scroll down. The link is not activated. •<button> can be activated using “Enter” or Spacebar” keyboard keys . •<a>, <a role=“button”> can be activated using “Enter” key only. @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms <button> vs <a role=“button”>
  • 10. 10 Using WAI-ARIA (4) Repurposing a <div> to radio group @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms • Many considerations for keyboard interaction • Many WAI-ARIA roles, states and properties involved Learn More on required effort: https://www.w3.org/TR/wai-aria-practices-1.1/#radiobutton When possible use native HTML element e.g. radio group instead of repurposing <div> to function as a radio group. Why?
  • 11. 11 Using WAI-ARIA (3) Under what circumstances? • “If the feature is available in HTML [HTML5.1] but it is not implemented or it is implemented, but accessibility support is not. • If the visual design constraints rule out the use of a particular native element, because the element cannot be styled as required. • If the feature is not currently available in HTML.” (W3C, Notes on Using ARIA in HTML) Reference: W3C (2015, May 21). Notes on Using ARIA in HTML. Retrieved from https://www.w3.org/TR/aria-in-html/ @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 12. 12 How screen readers navigate web forms? • Screen readers inform users when they have entered into a form “Forms Mode” by playing a sound • In “Forms Mode” : • User can edit input fields and interact with form elements • User generally navigate through a form using the TAB key for next control and SHIFT+TAB for previous control • Demos of today are done using JAWS 17 Reference: Freedom Scientific. Using Forms with JAWS and MAGic L. Retrieved from http://www.freedomscientific.com/Training/Surfs-Up/Forms.htm WebAIM. Creating Accessible Forms. Retrieved from http://webaim.org/techniques/forms/ @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 13. 13 Screen readers navigate web forms How does this matter? Scenario of Failure : Jaws user fails to interact with a form Non-accessible Mimic of form element coded using <div>s and <span>s Accessible Form element coded using HTML form controls <label>& <select> Snapshot 1 captured from JIRA Issue Tracking v7.1 • Developer used <div>s and <span>s and on-hover event (and not on focus) to edit assignee name instead of select element • Jaws user hears no switch to forms mode and missed the edit feature (1) (2) Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 14. 14 Labeling Controls • “Associating labels with form controls allows assistive technology to recognize the label and present it to the user”WCAG WG, EOWG (2015, March 2) • Possible ways of associating labels and form controls: 1. <label> & for/id attributes (recommended) 2. aria-labelledby attribute 3. wrapping <label> around text and control Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 15. 15 Association of labels 1. <label> & for/id • A <label> is attached to a specific form control through the use of for and id attributes. Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 16. 16 Association of labels 2. aria-labelledby • With aria-labelledby, the form field indicates which element labels it by referencing its id attribute Reference: W3C (2014). ARIA9: Using aria-labelledby to concatenate a label from several text nodes. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/ARIA9.html Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 17. 17 Association of Labels 3. Associating labels implicitly • When form controls cannot be labelled explicitly, the label element is used as a container for both the form control and the label text, so that the two are associated implicitly. Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 18. 18 Association of Labels Screen Reader Demo Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Association of labels demo - https://youtu.be/PjKAusofvP0 @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 19. 19 Invisible Labels • Label is visually hidden to avoid redundancy for users who can derive the purpose from the visual cues Warning! Screen readers hide elements from their users when they are styled using display: none; and visibility: hidden;Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary WET 4 class @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 20. 20 Placeholder Attribute A placeholder attribute can't be a replacement for a label. Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Reference: W3C (October, 2014). A vocabulary and associated APIs for HTML and XHTML. Retrieved from https://www.w3.org/TR/html5/forms.html#the-placeholder-attribute “Use of the placeholder attribute as a replacement for a label can reduce the accessibility and usability of the control for a range of users including older users and users with cognitive, mobility, fine motor skill or vision impairments.” (W3C, placeholder-attribute) BAD PRACTISE Notice: The placeholder text disappears as soon as the user enters a value. @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 21. 21 Placeholder Attribute A placeholder can be used to display short hint while keeping a visible label.Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Screenshot source: Government of Canada – Open data website Notice: Each form control has a visible label! @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 22. 22 Visual Position of Label text Best practises • Which is best for accessibility and usability? Placing labels above OR beside the form fields Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 23. 23 Visual Position of Label text Best practises • Placing labels above the form fields and position labels to the right of radio buttons and checkboxes.Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary GOODLearn More! W3C. G162: Positioning labels to maximize predictability of relationships. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/G162.html @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 24. 24 Grouping Controls • “Grouping related form controls makes forms more understandable for all users, as related controls are easier to identify. It also makes it easier for people to focus on smaller and more manageable groups rather than try to grasp the entire form at once.”WCAG WG, EOWG (2015, March 2) • Possible ways of grouping form controls include: 1. <fieldset> and <legend> elements 2. <optgroup> to group items inside a selection list Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 25. 25 Grouping Controls 1.<fieldset> & <legend> (1) • <fieldset> has a <legend> that is the label of the group • Important for related radio buttons and checkboxes Reference: W3C. WCAG H71: Providing a description for groups of form controls using fieldset and legend elements. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/H71 Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 26. 26 Grouping Controls 1.<fieldset> & <legend> (2) • Important for related radio buttons and checkboxes Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Reference: W3C. WCAG H71: Providing a description for groups of form controls using fieldset and legend elements. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/H71 @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 27. 27 Grouping Controls 1.<fieldset> & <legend> (3) Heading H1-H6 now allowed inside a <legend> (HTML 5.2 Working Draft) Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Reference: W3C, HTML 5.2 <legend>. Retrieved from https://www.w3.org/TR/html52/ Remember ! - To do a screen reader test before to determine the level of support. @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 28. 28 Grouping Controls 2.<optgroup> inside a selection list • Group <option> in a selection list using <optgroup> • Label <optgroup> with label attribute for users to know what to expect inside the group Reference: W3C. H85: Using OPTGROUP to group OPTION elements inside a SELECT. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/H85 Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 29. 29 Form Instructions • “Provide instructions to help users understand how to complete the form and use individual form controls. ”WCAG WG, EOWG (2015, March 2) • Types of Instructions: 1. Overall Instruction (instructions that apply to the entire form) 2. In-line instructions (specific to a form element) (example of input , instructions on filling a field) • 2.1 Instruction within <label> • 2.2 Instruction associated with control using <aria-describedby“ 3. Instruction between form controls Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 30. 30 Form Instructions 1. Overall Instruction • “Where relevant, provide such instructions that apply to the entire form before the <form> element to ensure that it is read aloud by screen readers before they switch to “Forms Mode”.WCAG WG, EOWG (2015, March 2) Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 31. 31 Form Instructions 2.1 Instruction within <label> • Within <label> for simple use cases indicating: • required form controls • expected data format and example References: W3C. H90: Indicating required form controls using label or legend. Retrieved from https://www.w3.org/TR/2014/NOTE-WCAG20-TECHS-20140916/H90 W3C. G89: Providing expected data format and example. Retrieved from https://www.w3.org/TR/2014/NOTE-WCAG20-TECHS-20140916/G89 Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 32. 32 Form Instructions 2.2.arai-describedby (1) • Use aria-describedby to associate instructions with form fields while there is a form label. • Instructions will be available to users when the form control has focus Reference: W3C, ARIA1: Using the aria-describedby property to provide a descriptive label for user interface controls. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/ARIA1.html WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ W3C, WCAG 3.3.2 Labels or Instructions. Retrieved from http://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-cues.html WEBAIM, Creating Accessible Forms. Retrieved from http://webaim.org/techniques/forms/advanced Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 33. 33 Form Instructions 2.2.arai-describedby (2) Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Instruction Government of Canada - Statistic Canada, 2016 Census Screenshot Reference: Government of Canada - Statistic Canada, 2016 Census - Start questionnaire. Retrieved from https://www133.statcan.gc.ca/census-recensement/en/login-connexion/open-ouvrir @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 34. 34 Form Instructions 2.2.arai-describedby (3) Reference: W3C, ARIA1: Using the aria-describedby property to provide a descriptive label for user interface controls. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/ARIA1.html WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ W3C, WCAG 3.3.2 Labels or Instructions. Retrieved from http://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-cues.html WEBAIM, Creating Accessible Forms. Retrieved from http://webaim.org/techniques/forms/advanced Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 35. 35 Form Instructions Screen Reader demo Form instructions demo - https://youtu.be/9rIT595KrZQ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 36. 36 Form Instructions 3. Instruction between form elements • Add tabindex=“0“ to instruction between form elements to receive focus and be included in the natural tab order Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary <p tabindex=“0”>Once Click offers you convenient features to modify your online content</p> <p tabindex=“0”>Please ensure accuracy of input before submitting the form</p> @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 37. 37 Validating Input & User Notification • Validating Input • User Notifications Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 38. 38 Validating Input & User Notification Validating Input 1) Validating required input fields •Indicate required fields in the label text •Add required attribute to form controls to indicate that user input is required before submission W3C. ARIA2: Identifying a required field with the aria-required property. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/ARIA2.html Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms required=“required” When user clicks submit without filling a mandatory field, user agent indicates to the user that input is required before submission “Please fill out this field” aria-required=“true” provided redundantly to support web browsers that don’t communicate the required attribute to assistive technology to inform assistive technologies about required controls so that they are appropriately announced to the users (as opposed to validating the input)
  • 39. 39 Validating Input & User Notification Validating Input 2) Validating common input for input fields •HTML5 validates common types for an <input> element such as tel, email, urlLabeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 40. 40 Validating Input & User Notification User Notifications Provide feedback to users about the results of their form submission. Error messages need to be informative - should provide guidance on how to correct mistakes. •Notification summary of errors: Overall feedback with list of errors that occurred provided after user submission of the form provided at the top of the page •Notification on form control: Inline specific feedback provided at or near the form controls Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ W3C. Error Identification: Understanding SC 3.3.1. https://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-identified.html Screenshot inspired from : Form validation Working examples - Web Experience Toolkit http://wet-boew.github.io/v4.0-ci/demos/formvalid/formvalid-en.html @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 41. 41 Validating Input & User Notification Form Validation Demo Example uses WET 4 validation of input and error message handling (http://wet-boew.github.io/v4.0-ci/demos/index-en.html) Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Notification on form control: •Error message placed within the <label> to not be missed •Error message provides guidance on how to correct mistakes Notification summary of errors: •Focus moved from the submit button to list of errors •Notification placed at the top of the form and list all errors •Each error linked to the relevant control @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 42. 42 Validating Input & User Notification Form Validation Demo Web Experience Toolkit (WET 4) “Form validation” provides example on validation of input and error message handling Screenshot source: WET 4 Working examples - Web Experience Toolkit. Retrieved from http://wet-boew.github.io/v4.0-ci/demos/index-en.html Hint: Google “WET 4 examples” to find this page! Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 43. 43 Multi-page Form • Divide long forms into multiple smaller forms that constitute a series of logical steps or stages, and • Inform users about their progress. Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 44. 44 Multi-page Form Example Reference: W3C. WCAG G98: Providing the ability for the user to review and correct answers before submitting. Retrieved from https://www.w3.org/TR/WCAG20-TECHS/G98.html Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Repeat overall instructions on every page before <form> Indicating progress in each step (title, h1, nav) The ability to review and correct answers before submitting @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 45. 45 Multi-page Form Indicating progress (1) • “Each step should inform the user about the progress they are making” WCAG WG, EOWG (2015, March 2) • Possible techniques include using: 1. Page <title> 2. The main heading <h1> 3. HTML5 <progress> element 4. Step-by-step indicator Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 46. 46 Multi-page Form Indicating progress (2) 1. Page <title> (The progress information should precede other information provided in the title) 2. The main heading <h1> (Include progress in prominent heading) <h1>Billing Address (step 2 of 4)</h1> Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary <title>Step 2 of 4 : Billing Address - Camp Registration</title> @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 47. 47 Multi-page Form Indicating progress (3) 3.1 HTML5 <progress> element (Inform users about the progress such as in a survey) Note: Some browsers do not support <progress> functionality natively which requires a polyfill to emulate the same functionality using generic HTML and WAI-ARIA. •<div role="progressbar" aria-valuenow="29" aria-valuemin="0" aria- valuemax="100">29 %</div> 3.2 Custom progress bar (personal preference!) Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary Screenshot Source: WCAG WG, EOWG (2015, March 2). Forms Concepts <div><span class="wb-inv">Progress:</span> <span id="ProgressText">29</span>% <span class="wb-inv"> complete</span></div> @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 48. 48 Multi-page Form Indicating progress (3) 4. Step-by-step indicator (known number of steps to be completed) <ol class="breadcrumb"> <li class="h5"><a href="childinfo.html"> <span class="glyphicon glyphicon-ok"> </span> <span class="wb-inv">Completed:</span> Child Information</a></li> <li class="h5"><span class="glyphicon glyphicon-unchecked"> </span> <span class="wb-inv">Current:</span> Billing Address</li> <li>Review Registration</li> <li>Complete Registration</li> </ol> Reference: WCAG WG, EOWG (2015, March 2). Forms Concepts. Retrieved from http://www.w3.org/WAI/tutorials/forms/ Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 49. 49 Dialog Boxes (before and after) Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms Non-accessible dialog box issues https://youtu.be/cFW4VVzcec4?t=25s •User has access to background page •Dialog box has not title When developing a dialog box, ensure that: The dialog box receives focus User knows that he is in a dialog box Dialog box has a title User does not have access to the background page. Example of a non-accessible dialog box:
  • 50. 50 Dialog Boxes (before and after) Labeling Controls . Association of labels . Invisible labels . Visual position Grouping Controls Form Instructions Validating Input & User Notifications Multi-page Forms Dialog Boxes Summary @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms HTML snippet: <div role="dialog" aria-labelledby="login"> <h1 id="login">Log in to Kangaroo Kilometers</h1> <!-- input fields --> </div>  The dialog box receives focus  User knows that he is in a dialog box  Dialog box has a title JS pseudo code: // When dialog box is opened //Select the background page main wrapper and give it aria hidden="true" document.querySelector('.wrapper').setAttribute('aria-hidden', true); // When dialog box is closed //change the background page main wrapper to aria-hidden="false" document.querySelector('.wrapper').setAttribute('aria-hidden', false);  User does not have access to the background page. A role="dialog" interrupts the current processing in order to prompt the user to enter information or require a response Accessible Dialog box example https://www.youtube.com/watch? v=nLjAqr6YDZE
  • 51. 51 Summary With the techniques of labeling & grouping controls, Form instructions , validating Input, user notifications and multi-page forms your web forms will be easier to understand and more accessible for all users. @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms
  • 52. 52 Questions Period Resources •Google Accessibility Course (Lesson 5 – ARIA) https://www.udacity.com/course/web-accessibility--ud89 •Creating Accessible Forms http://webaim.org/techniques/forms/ •Forms Concepts http://www.w3.org/WAI/tutorials/forms/ •User Agent Support Notes for HTML and XHTML Techniques https://www.w3.org/WAI/WCAG20/Techniques/ua-notes/ Thank you for your attention! Rabab Gomaa @RubysDo http://bit.do/webforms •Notes on Using ARIA in HTML https://www.w3.org/TR/aria-in-html/ •WAI-ARIA Authoring Practices 1.1 https://www.w3.org/TR/wai-aria-practices-1.1/ •Buttons, Submits, and Divs, Oh Hell http://adrianroselli.com/2016/01/links-buttons-submits-and-divs- oh-hell.html •JAWS Screen reader Demos https://www.youtube.com/channel/UCVoa-B5tR08- T2c1ku5mhfA •How to Meet WCAG 2.0 https://www.w3.org/WAI/WCAG20/quickref/ @RubysDo “Accessible & Usable Web Forms. Your How To Guide!” http://bit.do/webforms

Notes de l'éditeur

  1. In case you wonder what those cute cows are, this just happened to be the template of the Agency and the purpose of this session is completely different!