diff --git a/examples/combobox/aria1.1pattern/dialog-combo.html b/examples/combobox/aria1.1pattern/dialog-combo.html deleted file mode 100644 index b5712c47fb..0000000000 --- a/examples/combobox/aria1.1pattern/dialog-combo.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - -Example of ARIA 1.1 Combobox with Dialog Popup | WAI-ARIA Authoring Practices 1.1 - - - - - - - - - - - - - -
-

Example of ARIA 1.1 Combobox with Dialog Popup

-

- NOTE: This page is work in progress; it is not ready for review. - This work is tracked by issue 100. -

-

- - Replace this paragraph with an overview of the example that is something like the following. The - below example section demonstrates a simple checkbox that implements the - design pattern for checkbox. - This example uses ... summarize salient techniques ) -

-

Similar examples include:

- - -
-

Example

- - -
- -

This is the place where the reader will experience the functioning example.

-
    -
  • The HTML in this section along with the javascript and CSS it uses demonstrate - the design pattern.
  • -
  • - When developing an example implementation for this guide, please follow the - APG example coding guidelines - . -
  • - -
-
- -
- -
-

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:

-
    -
  1. What distinguishes this example from related examples.
  2. -
  3. Keyboard chortcuts, live regions, unusual event handling, or other ancillary best practices that are employed.
  4. -
  5. Do not include information that would be repeated in the following keyboard and attribute sections.
  6. -
  7. Delete this section if not needed.
  8. -
-
- -
-

Keyboard Support

- - - - - - - - - - - - - - - - - - -
KeyFunction
KeyName - Description of key function. - -
KeyName -
    -
  • If condition 1, performs function 1.
  • -
  • If condition 2, performs function 2.
  • -
  • Only use a list if multiple statements are needed.
  • -
-
-
- -
-

Role, Property, State, and Tabindex Attributes

- - - - - - - - - - - - - - - - - - - - - - - - -
RoleAttributeElementUsage
RoleNameHTML_ELEMENT - Describe usage/purpose, e.g., indicates the focusable element that serves as the ... -
- - AttributeName=AttributeValueHTML_ELEMENT -
    -
  • explanation of usage, purpose, benefit, and/or guidance relevant to this implementation.
  • -
  • If making multiple statements, use list for brevity and clarity
  • -
  • Do not make a single item list.
  • -
-
-
- -
-

Javascript and CSS Source Code

- - -
- -
-

HTML Source Code

- -
- - - -
-
- - - diff --git a/examples/combobox/aria1.1pattern/listbox-combo.html b/examples/combobox/aria1.1pattern/listbox-combo.html index 1b01c7ddb5..bc4b01e219 100644 --- a/examples/combobox/aria1.1pattern/listbox-combo.html +++ b/examples/combobox/aria1.1pattern/listbox-combo.html @@ -2,7 +2,7 @@ -Examples of ARIA 1.1 Combobox with Listbox Popup | WAI-ARIA Authoring Practices 1.1 +ARIA 1.1 Combobox with Listbox Popup Examples | WAI-ARIA Authoring Practices 1.1 @@ -19,29 +19,35 @@
-

Examples of ARIA 1.1 Combobox with Listbox Popup

+

ARIA 1.1 Combobox with Listbox Popup Examples

- 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 page in + issue 496.

- The following examples demonstrate different types of autocomplete behavior - using the ARIA 1.1 form of the - combobox design pattern. + The following three example comboboxes implement the ARIA 1.1 form of the + combobox design pattern + using a listbox popup. + Each of the three comboboxes also demonstrates a different form of the autocomplete behaviors described in the design pattern. +

+

+ In these examples, users can specify the name of a fruit or vegetable by either typing a value in the box or choosing from the list. + the list becomes available after the textbox contains a character that matches the beginning of the name of one of the items in the list of suggested values. + Users may type any value in the textbox; this implementation does not limit input to values that are in the list of suggested values.

Similar examples include:

- +
  • ARIA 1.1 Combobox with Grid Popup: A combobox that presents suggestions in a grid, enabling users to navigate descriptive information about each suggestion.
  • +
  • ARIA 1.0 Combobox with List Autocomplete
  • + +

    Examples

    -

    Example of list autocomplete with manual selection

    +

    Example 1: List Autocomplete with Manual Selection

    Example of list autocomplete with manual selection
    @@ -65,14 +70,24 @@

    Example of list autocomplete with manual selection

    -

    Example of list autocomplete with automatic selection

    +

    Notes

    +

    List autocomplete with manual selection means that:

    +
      +
    1. + When the listbox popup is displayed, it contains suggested values that complete or logically correspond to the characters typed in the textbox. + In this implementation, the values in the listbox have names that start with the characters typed in the textbox. +
    2. +
    3. Users may set the value of the combobox by choosing a value from the list of suggested values.
    4. +
    5. If the user does not choose a value from the listbox before moving focus outside the combobox, the value that the user typed, if any, becomes the value of the combobox.
    6. +
    +

    Example 2: List Autocomplete with Automatic Selection

    - @@ -93,12 +107,21 @@

    Example of list autocomplete with automatic selection

    - -

    Example of list with inline autocomplete

    +

    Notes

    +

    List autocomplete with automatic selection means that:

    +
      +
    1. + When the listbox popup is displayed, it contains suggested values that complete or logically correspond to the characters typed in the textbox. + In this implementation, the values in the listbox have names that start with the characters typed in the textbox. +
    2. +
    3. The first suggestion is automatically highlighted as selected.
    4. +
    5. The automatically selected suggestion becomes the value of the textbox when the combobox loses focus unless the user chooses a different suggestion or changes the character string in the textbox.
    6. +
    +

    Example 3: List with Inline Autocomplete

    Example of list with inline autocomplete
    Example of list with inline autocomplete
    -
    - -
    -

    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:

    +

    Notes

    +

    List with inline autocomplete means that:

      -
    1. What distinguishes this example from related examples.
    2. -
    3. Keyboard chortcuts, live regions, unusual event handling, or other ancillary best practices that are employed.
    4. -
    5. Do not include information that would be repeated in the following keyboard and attribute sections.
    6. -
    7. Delete this section if not needed.
    8. +
    9. With the exception of one additional feature, this example has the same autocomplete behavior as the previous example that has list with automatic selection.
    10. +
    11. The additional feature is that 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.
    12. +
    13. The inline completion string is visually highlighted and has a selected state.

    Keyboard Support

    - - +

    + The example comboboxes on this page implement the following keyboard interface. + Other variations and options for the keyboard interface are described in the + Keyboard Interaction section of the combobox design pattern. +

    +

    Textbox

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    KeyFunction
    Down Arrow +
      +
    • If the listbox is displayed: +
        +
      • Example 1: Moves focus to the first suggested value.
      • +
      • Examples 2 and 3: Moves focus to the second suggested value. Note that the first value is automatically selected.
      • +
      +
    • +
    • If the listbox is not displayed, in example 3 only, opens the listbox and moves focus to the first value.
    • +
    +
    Up Arrow +
      +
    • If the listbox is displayed, moves focus to the last suggested value.
    • +
    • If the listbox is not displayed, in example 3 only, opens the listbox and moves focus to the last value.
    • +
    +
    Enter +
      +
    • Example 1: Does nothing.
    • +
    • Examples 2 and 3: If the listbox is displayed and the first option is automatically selected: +
        +
      • Sets the textbox value to the content of the selected option.
      • +
      • Closes the listbox.
      • +
      +
    • +
    +
    Escape +
      +
    • Clears the textbox
    • +
    • If the listbox is displayed, closes it.
    • +
    +
  • Standard single line text editing keys
  • +
      +
    • Keys used for cursor movement and text manipulation, such as Delete and Shift + Right Arrow.
    • +
    • An HTML input with type=text is used for the textbox so the browser will provide platform-specific editing keys.
    • +
    +
    +

    Listbox Popup

    + @@ -165,19 +244,67 @@

    Keyboard Support

    - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + @@ -186,11 +313,145 @@

    Keyboard Support

    -

    Role, Property, State, and Tabindex Attributes

    - -
    Key
    KeyNameEnter +
      +
    • Sets the textbox value to the content of the focused option in the listbox.
    • +
    • Closes the listbox.
    • +
    • Sets focus on the textbox.
    • +
    +
    Escape - Description of key function. - +
      +
    • Closes the listbox.
    • +
    • Sets focus on the textbox.
    • +
    • Clears the textbox.
    • +
    +
    Down Arrow +
      +
    • Moves focus to the next option.
    • +
    • If focus is on the last option, moves focus to the first option.
    • +
    • Note: This wrapping behavior is useful when Home and End move the editing cursor as described below.
    • +
    +
    Up Arrow +
      +
    • Moves focus to the previous option.
    • +
    • If focus is on the first option, moves focus to the last option.
    • +
    • Note: This wrapping behavior is useful when Home and End move the editing cursor as described below.
    • +
    KeyNameRight ArrowMoves focus to the textbox and moves the editing cursor one character to the right.
    Left ArrowMoves focus to the textbox and moves the editing cursor one character to the leftt.
    HomeMoves focus to the textbox and places the editing cursor at the beginning of the field.
    EndMoves focus to the textbox and places the editing cursor at the end of the field.
    Printable Characters
      -
    • If condition 1, performs function 1.
    • -
    • If condition 2, performs function 2.
    • -
    • Only use a list if multiple statements are needed.
    • +
    • Moves focus to the textbox.
    • +
    • Types the character in the textbox.
    +

    Role, Property, State, and Tabindex Attributes

    +

    + The example comboboxes on this page implement the following ARIA roles, states, and properties. + Information about other ways of applying ARIA roles, states, and properties is available in the + Roles, States, and Properties section of the combobox design pattern. +

    +

    Combobox Container

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RoleAttributeElementUsage
    + combobox + div +
      +
    • Identifies the element as a combobox.
    • +
    • Note: The primary difference between the ARIA 1.0 pattern and the ARIA 1.1 pattern is the placement of the combobox role.
    • +
    +
    + aria-haspopup=listbox + div +
      +
    • Indicates that the combobox can popup a listbox to suggest values.
    • +
    • This is the default value for elements with the combobox role.
    • +
    +
    + aria-owns=IDREF + divIdentifies the element that serves as the listbox popup.
    + aria-expanded=false + divIndicates that the popup element is not displayed.
    + aria-expanded=true + divIndicates that the popup element is displayed.
    +

    Textbox

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RoleAttributeElementUsage
    + aria-labelledby=IDREF + input[type="text"]Provides a label for the textbox element of the combobox.
    + aria-autocomplete=list + input[type="text"]Examples 1 and 2: Indicates that the autocomplete behavior of the text input is to suggest a list of possible values in a popup.
    + aria-autocomplete=both + input[type="text"]Example 3: Indicates that the autocomplete behavior of the text input is to both show an inline completion string and suggest a list of possible values in a popup.
    + aria-controls=IDREF + input[type="text"] +
      +
    • Identifies the popup element that lists suggested values.
    • +
    • Note: In the ARIA 1.0 combobox pattern, the textbox uses aria-owns instead of aria-controls.
    • +
    +
    + aria-activedescendant=IDREF + input[type="text"] +
      +
    • When an option in the listbox is visually indicated as having keyboard focus, refers to that option.
    • +
    • When navigation keys, such as Down Arrow, are pressed, the JavaScript changes the value.
    • +
    • Enables assistive technologies to know which element the application regards as focused while DOM focus remains on the input element.
    • +
    • + For more information about this focus management technique, see + Using aria-activedescendant to Manage Focus. +
    • +
    +
    +

    Listbox Popup

    + @@ -201,26 +462,47 @@

    Role, Property, State, and Tabindex Attributes

    - - - + + + + + + + + + + + + - - + + + + + @@ -230,31 +512,31 @@

    Role, Property, State, and Tabindex Attributes

    Javascript and CSS Source Code

    -
    -

    HTML Source Code

    - +

    HTML Source Code

    +

    Example 1

    +
    - - + +

    Example 2

    + +
    + +

    Example 3

    + +
    +
    diff --git a/examples/combobox/aria1.1pattern/tree-combo.html b/examples/combobox/aria1.1pattern/tree-combo.html deleted file mode 100644 index adf4d40a2f..0000000000 --- a/examples/combobox/aria1.1pattern/tree-combo.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - -Example of ARIA 1.1 Combobox with Tree Popup | WAI-ARIA Authoring Practices 1.1 - - - - - - - - - - - - - -
    -

    Example of ARIA 1.1 Combobox with Tree Popup

    -

    - NOTE: This page is work in progress; it is not ready for review. - This work is tracked by issue 100. -

    -

    - - Replace this paragraph with an overview of the example that is something like the following. The - below example section demonstrates a simple checkbox that implements the - design pattern for checkbox. - This example uses ... summarize salient techniques ) -

    -

    Similar examples include:

    -
      -
    • example name: summarize what this related example demonstrates.
    • - -
    - -
    -

    Example

    - - -
    - -

    This is the place where the reader will experience the functioning example.

    -
      -
    • The HTML in this section along with the javascript and CSS it uses demonstrate - the design pattern.
    • -
    • - When developing an example implementation for this guide, please follow the - APG example coding guidelines - . -
    • - -
    -
    - -
    - -
    -

    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:

    -
      -
    1. What distinguishes this example from related examples.
    2. -
    3. Keyboard chortcuts, live regions, unusual event handling, or other ancillary best practices that are employed.
    4. -
    5. Do not include information that would be repeated in the following keyboard and attribute sections.
    6. -
    7. Delete this section if not needed.
    8. -
    -
    - -
    -

    Keyboard Support

    - -
    Role
    RoleNameHTML_ELEMENT + listbox + - Describe usage/purpose, e.g., indicates the focusable element that serves as the ... + ul Identifies the ul element as a listbox.
    + aria-labelledby=IDREF + ulProvides a label for the listbox element of the combobox.
    + option + li - +
      +
    • Identifies the element as a listbox option.
    • +
    • The text content of the element provides the accessible name of the option.
    • +
    AttributeName=AttributeValueHTML_ELEMENT
    + aria-selected=true + li
      -
    • explanation of usage, purpose, benefit, and/or guidance relevant to this implementation.
    • -
    • If making multiple statements, use list for brevity and clarity
    • -
    • Do not make a single item list.
    • +
    • Specified on an option in the listbox when it is visually highlighted as selected.
    • +
    • In example 1, occurs only when an option in the list is referenced by aria-activedescendant.
    • +
    • In examples 2 and 3, also occurs when focus is in the textbox and the first option is automatically selected.
    - - - - - - - - - - - - - - - - -
    KeyFunction
    KeyName - Description of key function. - -
    KeyName -
      -
    • If condition 1, performs function 1.
    • -
    • If condition 2, performs function 2.
    • -
    • Only use a list if multiple statements are needed.
    • -
    -
    -
    - -
    -

    Role, Property, State, and Tabindex Attributes

    - - - - - - - - - - - - - - - - - - - - - - - - -
    RoleAttributeElementUsage
    RoleNameHTML_ELEMENT - Describe usage/purpose, e.g., indicates the focusable element that serves as the ... -
    - - AttributeName=AttributeValueHTML_ELEMENT -
      -
    • explanation of usage, purpose, benefit, and/or guidance relevant to this implementation.
    • -
    • If making multiple statements, use list for brevity and clarity
    • -
    • Do not make a single item list.
    • -
    -
    -
    - -
    -

    Javascript and CSS Source Code

    - - -
    - -
    -

    HTML Source Code

    - -
    - - - -
    -
    - - -