You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/controls/autocomplete/accessibility/overview.md
+33-25Lines changed: 33 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ position: 1
8
8
9
9
# AutoComplete Accessibility
10
10
11
-
The AutoComplete is accessible by screen readers and provides WAI-ARIA, Section 508, WCAG 2.2, and keyboard support.
11
+
The AutoComplete is accessible by screen readers and provides WAI-ARIA, Section 508, WCAG 2.1, and keyboard support.
12
12
13
13
> According to [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria/#combobox) specification *"Authors must ensure an element with role combobox contains or owns a text input element with role textbox or searchbox..."*. Note, that in our implementation, the text input element is the one that has role="combobox", and does not contain another text input element. **This approach is valid for the [WAI-ARIA 1.2](https://www.w3.org/TR/wai-aria-1.2/#combobox) specification and also for the [WAI-ARIA 1.0](https://www.w3.org/TR/wai-aria/#combobox) specification .**
14
14
>
@@ -29,46 +29,54 @@ The AutoComplete is compliant with the [Web Content Accessibility Guidelines (WC
29
29
## WAI-ARIA
30
30
31
31
32
-
The following table lists the selectors, attributes, and behavior patterns supported by the AutoComplete component:
32
+
This section lists the selectors, attributes, and behavior patterns supported by the component and its composite elements, if any.
33
33
34
-
### AutoComplete wrapper
34
+
### AutoComplete Wrapping Element
35
+
36
+
37
+
The following table summarizes the selectors and attributes supported by the AutoComplete wrapper element:
35
38
36
39
| Selector | Attribute | Usage |
37
40
| -------- | --------- | ----- |
38
-
|`.k-input-inner`|`role=combobox`| Announces the presence of a autocomplete as inner element of the autocomplete used for filtering. |
39
-
||`label for` or `aria-label` or `aria-labelledby`| The input needs an accessible name to be assigned to it. |
40
-
||`aria-haspopup=listbox`| Indicates the component has a listbox Popup. |
41
-
||`aria-expanded=true/false`| Announces the state of the visibility of the popup. |
42
-
||`aria-controls=.k-list-ul id`| Points to the listbox element. Signifies that the `combobox` element controls the `listbox`. |
43
-
||`aria-activedescendant=.k-list-item.k-focus id`| Points to the focused item in the popup. The focused item is changed via keyboard navigation. If the popup is not visible, the attribute should not point to any element or should be removed. |
44
-
||`aria-autocomplete=list`|Attribute is rendered and value is set to list when **filtering** feature is enabled. |
45
-
||`aria-autocomplete=both`|Attribute is rendered and value is set to both when both **filtering** and **suggest** features are enabled. |
46
-
||`aria-autocomplete=inline`|Attribute is rendered and value is set to only**suggest** feature is enabled. |
47
-
||`readonly` or `aria-readonly`|Attribute is rendered only when the autocomplete is readonly. |
48
-
||`aria-busy=true`|Attribute is rendered only when the autocomplete is loading data. |
41
+
|`.k-input-inner`|`role=combobox`| Announces the presence of an AutoComplete as the inner element of the AutoComplete that is used for filtering. |
42
+
||`label for` or `aria-label` or `aria-labelledby`| The input needs an accessible name that will be assigned to it. |
43
+
||`aria-haspopup=listbox`| Indicates that the component has a listbox popup. |
44
+
||`aria-expanded=true/false`| Announces the state of the popup visibility. |
45
+
||`aria-controls=.k-list-ul id`| Points to the `listbox` element. Signifies that the `combobox` element controls the `listbox` one. |
46
+
||`aria-activedescendant=.k-list-item.k-focus id`| Points to the focused item in the popup. The focused item is changed with keyboard navigation. If the popup is not visible, the attribute must not point to any element or must be removed. |
47
+
||`aria-autocomplete=list`|The attribute is rendered and the value is set to `list` when the filtering feature is enabled. |
48
+
||`aria-autocomplete=both`|The attribute is rendered and the value is set to `both` when both the filtering and suggest features are enabled. |
49
+
||`aria-autocomplete=inline`|The attribute is rendered and the value is set to `only` when the suggest feature is enabled. |
50
+
||`readonly` or `aria-readonly`|The attribute is rendered only when the AutoComplete is read-only. |
51
+
||`aria-busy=true`|The attribute is rendered only when the AutoComplete is loading data. |
49
52
||`tabindex=0`| The element must be focusable. |
50
-
|`.k-invalid .k-input-inner,.ng-invalid .k-input-inner`|`aria-invalid=true`|Attribute is rendered only when the autocomplete is in form and announces the valid state of the component. |
51
-
|`.k-disabled .k-input-inner`|`disabled=disabled` or `aria-disabled=true`|Attribute is rendered only when the autocomplete is disabled. |
53
+
|`.k-invalid .k-input-inner,.ng-invalid .k-input-inner`|`aria-invalid=true`|The attribute is rendered only when the AutoComplete is in a form and announces the valid state of the component. |
54
+
|`.k-disabled .k-input-inner`|`disabled=disabled` or `aria-disabled=true`|The attribute is rendered only when the AutoComplete is disabled. |
52
55
53
-
### ListBox Popup
56
+
### Popup Listbox
54
57
55
58
56
-
The Popup element of the component should implement the specification for a **Popup List** component.
59
+
The popup element of the AutoComplete has to implement the WAI-ARIA specification for a Popup List component. The following table summarizes the selectors and attributes supported by the listbox popup of the AutoComplete:
57
60
58
61
| Selector | Attribute | Usage |
59
62
| -------- | --------- | ----- |
60
-
|`.k-animation-container`|`role=region`| When the component container is appended to the `<body>` element of the document, it needs a landmark role to be assigned to it. Otherwise, it should be appended to an element with an appropriate landmark role. |
61
-
||`aria-label` or `aria-labelledby`| Provides a label when the container has a `region` role assigned. |
62
-
|`.k-list-ul`|`role=listbox`| Identifies the ul element as a listbox. |
63
-
||`aria-label` or `aria-labelledby`| Provides a label for the listbox of the combobox. |
64
-
|`.k-list-item`|`role=option`| Identifies the li element as a listbox option. |
63
+
|`.k-animation-container`|`role=region`| When the component container is appended to the `<body>` element of the document, it requires you to assing a `landmark` role to it. Otherwise, append it to an element with an appropriate `landmark` role. |
64
+
||`aria-label` or `aria-labelledby`| When the container has a `region` role assigned, povides a label. |
65
+
|`.k-list-ul`|`role=listbox`| Identifies the `ul` element as a listbox. |
66
+
||`aria-label` or `aria-labelledby`| Provides a label for the listbox of the ComboBox. |
67
+
|`.k-list-item`|`role=option`| Identifies the `li` element as a listbox option. |
68
+
||`id`| When grouped, the list items must have an `id` attribute specified, so that the `aria-owns` attribute of their group header elements (with `role=group`) point to that ids. |
69
+
||`aria-describedby`| When grouped, the list items must have an `aria-describedby` attribute pointing to the id of the `k-list-item-text` element in their `k-list-group-item`. |
65
70
|`.k-list-item.k-selected`|`aria-selected=true`| Indicates the selected state of the item. |
71
+
|`.k-list-group-item`|`role=group`| The group elements in the popup list must be have `role=group`. |
72
+
||`aria-owns`| The group elements in the popup list must own the list items belonging to their group. |
73
+
|`.k-list-group-item>.k-list-item-text`|`id`| The `k-list-item-text` elements of the `k-list-group-item` must have an id specified. The `aria-labelledby` attribute of the list items in the group must point to that id. |
66
74
67
75
## Resources
68
76
69
-
[ARIA practices: Editable Combobox With Both List and Inline Autocomplete Example](https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-autocomplete-both.html)
77
+
[WAI-ARIA Authoring Practices: Editable Combobox With Both List and Inline Autocomplete Example](https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-autocomplete-both.html)
70
78
71
-
[ARIA Practices: Editable Combobox With List Autocomplete Example](https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-autocomplete-list.html)
79
+
[WAI-ARIA Authoring Practices: Editable Combobox With List Autocomplete Example](https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-autocomplete-list.html)
0 commit comments