Example of ARIA 1.1 Combobox with Grid Popup
+ARIA 1.1 Combobox with Grid Popup Example
- NOTE: This page is work in progress; it is not ready for review. - This work is tracked by issue 100. + NOTE: Please provide feedback on this example in + This work is tracked by issue 500.
- The following example demonstrates an implementation of the + The following example combobox implements the combobox design pattern - that uses the option to popup a grid containing suggested values. + using a grid for the suggested values popup. + In this example, users can choose a fruit or vegetable. + Each row of the two-column grid represents one suggestion; column one contains the name of the fruit or vegetable and column two identifies whether it is a fruit or vegetable.
Similar examples include:
-
-
- example name: summarize what this related example demonstrates. - +
- Examples of ARIA 1.1 Combobox with Listbox Popup: Comboboxes that demonstrate the various forms of autocomplete behavior using a listbox popup. +
- ARIA 1.0 Combobox with List Autocomplete
Example
@@ -66,32 +67,16 @@Example
Accessibility Features
-Optional section: If appropriate, please replace this content with a list of any special or noteworthy accessibility features - demonstrated in this implementation, such as:
--
-
- What distinguishes this example from related examples. -
- Keyboard chortcuts, live regions, unusual event handling, or other ancillary best practices that are employed. -
- Do not include information that would be repeated in the following keyboard and attribute sections. -
- Delete this section if not needed. -
Keyboard Support
- -Key | @@ -100,32 +85,132 @@||
---|---|---|
KeyName | +Down Arrow | +If the grid is displayed, moves focus to the first suggested value. | +
Up Arrow | +If the grid is displayed, moves focus to the last suggested value. | +|
Escape |
- Description of key function.
-
+
|
|
KeyName | +
|
+
Grid Popup
+Key | +Function | +
---|---|
Enter | +
+
|
+
Escape | +
+
|
+
Down Arrow | +
+
|
+
Up Arrow | +
+
|
+
Right Arrow | +
+
|
+
Left Arrow | +
+
|
+
Home | +Moves focus to the textbox and places the editing cursor at the beginning of the field. | +
End | +Moves focus to the textbox and places the editing cursor at the end of the field. | +
Printable Characters | +
+
|
Role, Property, State, and Tabindex Attributes
- -Role | @@ -136,45 +221,178 @@||||||
---|---|---|---|---|---|---|
RoleName |
- - | HTML_ELEMENT |
+
+ combobox
+ |
+ + | div |
+
+
|
+
+ |
+ aria-haspopup=
+ |
+ div |
+ Indicates that the combobox can popup a grid to suggest values. |
+ |||
+ |
+ aria-owns=
+ |
+ div |
+ Identifies the element that serves as the grid popup. | +|||
+ |
+ aria-expanded=
+ |
+ div |
+ Indicates that the popup element is not displayed. | +|||
+ |
+ aria-expanded=
+ |
+ div |
+ Indicates that the popup element is displayed. | +
Textbox
+Role | +Attribute | +Element | +Usage | +||
---|---|---|---|---|---|
+ |
+ aria-labelledby=
+ |
+ input[type="text"] |
+ Provides a label for the textbox element of the combobox. | +||
+ |
+ aria-autocomplete=
+ |
+ input[type="text"] |
+ Indicates that the autocomplete behavior of the text input is to suggest a list of possible values in a popup. | +||
+ |
+ aria-controls=
+ |
+ input[type="text"] |
- Describe usage/purpose, e.g., indicates the focusable element that serves as the ...
+
|
||
+ |
+ aria-activedescendant=
+ |
+ input[type="text"] |
-
+
|
- AttributeName= |
- HTML_ELEMENT |
+
Grid Popup
+Role | +Attribute | +Element | +Usage | +
---|---|---|---|
+ grid
+ |
+ + |
+ div
+ |
+ Identifies the element as a grid . |
+
+ |
+ aria-labelledby=
+ |
+ div |
+ Provides a label for the grid element of the combobox. |
+
+ row
+ |
+ + | div |
+ Identifies the element containing all the cells for a row. | +
+ |
+ aria-selected=
+ |
+ div |
|
gridcell |
+ + | div |
+ Identifies the element containing the content for a single cell. | +
Javascript and CSS Source Code
--
-
- - CSS: - example_name.css - -
- - Javascript: - example_name.js - +
- CSS: combobox-1.1.css +
- Javascript: grid-combobox.js +
- Javascript: grid-combo-example.js