From 1f8b9c0e4b4ce98f5f6845a92ce45e60670d233f Mon Sep 17 00:00:00 2001
From: Jon Gunderson
NOTE: This is a proposed draft of a new section.
- Please provide feedback in
+ Please provide feedback in
issue 482.
- Functionally, ARIA roles, states, and properties are sort of like CSS for assistive technologies.
- In the case of screen readers, ARIA controls the rendering of the non-visual experience.
+ Functionally, ARIA roles, states, and properties are sort of like CSS for assistive technologies.
+ In the case of screen readers, ARIA controls the rendering of the non-visual experience.
Incorrect ARIA misrepresents visual experiences, with potentially devastating effects on the corresponding non-visual experiences.
Before using ARIA or any of the guidance in this document, please take time to understand the following two essential principles.
- This is the power of ARIA.
+ This is the power of ARIA.
It enables authors to describe nearly any user interface component in ways that assistive technologies can reliably interpret, thus making components accessible to assistive technology users.
- This is also the danger of ARIA.
+ This is also the danger of ARIA.
Authors can inadvertently override accessibility semantics.
- This guide illustrates appropriate use of ARIA 1.1 as defined in the ARIA specification.
+ This guide illustrates appropriate use of ARIA 1.1 as defined in the ARIA specification.
The design patterns, reference examples, and sample code intentionally do not implement code to fix problems that are caused by gaps in support for ARIA 1.1 in browsers or assistive technologies.
Browser and assistive technology developers can thus utilize code in this guide to help assess the quality of their support for ARIA 1.1.
- Similarly, JavaScript and CSS in this guide is written to be compatible with the most recent version of Chrome, Firefox, Internet Explorer, and Safari at the time of writing.
+ Similarly, JavaScript and CSS in this guide is written to be compatible with the most recent version of Chrome, Firefox, Internet Explorer, and Safari at the time of writing.
In particular, some JavaScript and CSS may not function correctly in Internet Explorer version 10 or earlier.
- In other words, except in cases where the ARIA Working Group and other contributors have overlooked an error,
+ In other words, except in cases where the ARIA Working Group and other contributors have overlooked an error,
examples in this guide that do not function well in a particular browser or with a specific assistive technology are demonstrating browser or assistive technology bugs.
- Currently, this guide does not indicate which examples are compatible with mobile browsers or touch interfaces.
+ Currently, this guide does not indicate which examples are compatible with mobile browsers or touch interfaces.
While some of the examples include specific features that enhance mobile and touch support, some ARIA features are not supported in any mobile browser.
In addition, there is not yet a standardized approach for providing touch interactions that work across mobile browsers.
Introduction
Read Me First
No ARIA is better than Bad ARIA
Principle 2: ARIA Can Both Cloak and Enhance, Creating Both Power and Danger
<button aria-pressed="false">Press Me</button>
@@ -147,23 +147,23 @@
Principle 2: ARIA Can Both Cloak and Enhance, Creating Both Power and Danger
Browser and Assistive Technology Support
Mobile and Touch Support
Combo Box
issue 464.
- A combobox is a widget made up of the combination of two distinct elements: + A combobox is a widget made up of the combination of two distinct elements: 1) a single-line textbox, and 2) an associated pop-up element for helping users set the value of the textbox. - The popup may be a listbox, - grid, - tree, or + The popup may be a listbox, + grid, + tree, or dialog. - Many implementations also include a third optional element -- a graphical button adjacent to the textbox, indicating the availability of the popup. + Many implementations also include a third optional element -- a graphical button adjacent to the textbox, indicating the availability of the popup. Activating the button displays the popup if suggestions are available.
@@ -582,22 +582,22 @@
Combobox widgets are useful for setting the value of a single-line textbox in one of two types of scenarios:
- The nature of the suggested values and the way the suggestions are presented is called the autocomplete behavior. - Comboboxes can have one of four forms of autocomplete: + The nature of the suggested values and the way the suggestions are presented is called the autocomplete behavior. + Comboboxes can have one of four forms of autocomplete:
- With any form of list autocomplete, the popup may appear and disappear as the user types. - For example, if the user types a two character string that triggers five suggestions to be displayed but then types a third character that forms a string that does not have any matching suggestions, + With any form of list autocomplete, the popup may appear and disappear as the user types. + For example, if the user types a two character string that triggers five suggestions to be displayed but then types a third character that forms a string that does not have any matching suggestions, the popup may close and, if present, the inline completion string disappears.
When constructing a compact widget that asks users to choose one value from a known set of discrete values, often either a listbox or menu button is simpler to implement and use. - One feature of combobox that distinguishes it from both listbox and menu button is that the value of the combobox is presented in an edit field. + One feature of combobox that distinguishes it from both listbox and menu button is that the value of the combobox is presented in an edit field. Thus, the combobox gives users one function that both listbox and menu button lack, namely the ability to select some or all of the value for copying to the clipboard. A feature that distinguishes both combobox and menu button from listbox is that they can enable users can navigate the set of allowed values and, at any point, decide to keep the current value by pressing escape. In contrast, navigating a listbox immediately changes its value, and escape does not provide an undo mechanism. @@ -630,10 +630,10 @@
The options for a combobox to popup a grid, tree, or dialog were introduced in ARIA 1.1. Changes made in the ARIA 1.1 specification also add support for a code pattern that enables assistive technologies to present the textbox and popup as separately perceivable elements. - While the ARIA 1.1 pattern is recommended, both patterns are described in the following sections, + While the ARIA 1.1 pattern is recommended, both patterns are described in the following sections, and there are no plans to deprecate the ARIA 1.0 pattern.
- +When focus is in the textbox:
listbox
, the element with role combobox
has aria-haspopup set to a value that corresponds to the popup type.
- That is, aria-haspopup
is set to grid
, tree
, or dialog
.
+ That is, aria-haspopup
is set to grid
, tree
, or dialog
.
Note that elements with role combobox
have an implicit aria-haspopup
value of listbox
.
false
.
+ The textbox element has a value for aria-multiline of false
.
Note that the default value of aria-multiline
is false
.
combobox
has aria-expanded set to false
.
- When the popup element is visible, aria-expanded
is set to true
.
+ When the combobox popup is not visible, the element with role combobox
has aria-expanded set to false
.
+ When the popup element is visible, aria-expanded
is set to true
.
Note that Elements with role combobox
have a default value for aria-expanded
of false
.
list
: When the popup is triggered, it presents suggested values that complete or logically correspond to the characters typed in the textbox.both
: When the popup is triggered, it presents suggested values that complete or logically correspond to the characters typed in the textbox.
- In addition, the portion of the selected suggestion that has not been typed by the user, a completion string, appears inline after the input cursor in the textbox.
+ In addition, the portion of the selected suggestion that has not been typed by the user, a completion string, appears inline after the input cursor in the textbox.
The inline completion string is visually highlighted and has a selected state.
- The roles, states, and properties for popup elements are defined in their respective design patterns. + The roles, states, and properties for popup elements are defined in their respective design patterns. When refering to the following design patterns, note that a combobox is a single-select widget where selection follows focus in the popup.
NOTE: Revisions to this pattern are in progress. - Please provide feedback in + Please provide feedback in issue 221.
@@ -4119,7 +4125,7 @@
Also see: