# Chat Accessibility

Out of the box, the Telerik UI for ASP.NET MVC Chat provides extensive accessibility support and enables users with disabilities to acquire complete control over its features.

The Chat is compliant with the [Web Content Accessibility Guidelines (WCAG) 2.2 AA](https://www.w3.org/TR/WCAG22/) standards and [Section 508](https://www.section508.gov/) requirements, follows the [Web Accessibility Initiative - Accessible Rich Internet Applications (WAI-ARIA)](https://www.w3.org/WAI/ARIA/apg/) best practices for implementing the [keyboard navigation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/conversational-ui/chat/accessibility/overview#keyboard-navigation) for its `component` role, provides options for managing its focus and is tested against the most popular screen readers.

## WAI-ARIA

This section lists the selectors, attributes, and behavior patterns supported by the component and its composite elements, if any.

### Chat component

The Chat component is a composite one and integrates the accessibility of the ToolBar, PromptBox, FileBox, Dialog, DropDownButton, SpeechToTextButton and ContextMenu components.

| Selector                                           | Attribute                          | Usage                                                                                           |
| -------------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------- |
| `.k-message-list`                                  | `role=log`                         | The role of the Chat message list must imply that there is a log (list) of messages.            |
|                                                    | `aria-label`                       | Announces the purpose of the Chat message list (for ex. 'Message list').                        |
|                                                    | `aria-live=polite`                 | Announces new messages in the Chat message list.                                                |
| `.k-bubble`                                        | `tabindex=0`                       | The Chat bubble must be focusable.                                                              |
| `.k-bubble .k-typing-indicator`                    | `tabindex=-1`                      | The Chat bubble typing indicator should not be focusable.                                       |
| `.k-bubble-expandable-indicator`                   | `role=button`                      | The expandable indicator must have an appropriate role.                                         |
|                                                    | `aria-label` or `title`            | The expandable indicator must be properly labelled.                                             |
|                                                    | `tabindex=0`                       | The expandable indicator must be part of the page tabsequence.                                  |
| `.k-suggestion-group`                              | `role=group`                       | Indicates that the suggestion container element is a group.                                     |
| `.k-suggestion`                                    | `role=button`                      | The suggestion elements must be exposed as buttons.                                             |
|                                                    | `tabindex=0`                       | The suggestion elements must be part of the page tabsequence.                                   |
| `.k-message-reference>.k-button`                   | `aria-label` or `title`            | The reference close button must be properly labelled.                                           |
|                                                    | `role=button` or `nodeName=button` | The reference close button must have an appropriate role.                                       |
| `.k-resend-button`                                 | `aria-label` or `title`            | The resend button must be properly labelled (for ex. 'Resend').                                 |
|                                                    | `role=button` or `nodeName=button` | The resend button must have an appropriate role.                                                |
| `.k-chat-message-toolbar>.k-button`                | `aria-label` or `title`            | The message toolbar action buttons (copy, retry, download, etc.) must be properly labelled.     |
|                                                    | `role=button` or `nodeName=button` | The message toolbar action buttons must have an appropriate role.                               |
| `.k-prompt-box-affix>.k-button`                    | `role=button` or `nodeName=button` | The prompt box suffix buttons must have appropriate role.                                       |
|                                                    | `aria-label` or `title`            | The prompt box suffix buttons must be properly labelled (for ex. 'Attach file', 'Send prompt'). |
| `.k-prompt-box-affix>.k-button.k-disabled`         | `disabled`                         | Announces send action as disabled when necessary.                                               |
| `.k-message-group-content>.k-chat-download-button` | `aria-label` or `title`            | The download button must be properly labelled.                                                  |
|                                                    | `role=button` or `nodeName=button` | The download button must have an appropriate role.                                              |

### ToolBar Component

Chat Message ToolBar follows the specification for the ToolBar component.

[ToolBar accessibility specification](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/toolbar/accessibility/overview)

### PromptBox Component

Chat message input follows the specification for the PromptBox component.

### Textarea Component

[Textarea accessibility specification](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/textarea/accessibility/overview)

### DropDownButton Component

[DropDownButton accessibility specification](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/dropdownbutton/accessibility/overview)

### SpeechToTextButton Component

[SpeechToTextButton accessibility specification](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/speechtotextbutton/accessibility/overview)

### ContextMenu Component

[ContextMenu accessibility specification](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/navigation/menu/contextmenu/accessibility/overview)

## Resources

[WAI-ARIA specification for log](https://www.w3.org/TR/wai-aria-1.2/#log)

## Section 508

The Chat is fully compliant with the [Section 508 requirements](http://www.section508.gov/).

## Testing

The Chat has been extensively tested automatically with [axe-core](https://github.com/dequelabs/axe-core) and manually with the most popular screen readers.

> To report any accessibility issues, contact the team through the [Telerik Support System](https://www.telerik.com/account/support-center).

### Screen Readers

The Chat has been tested with the following screen readers and browsers combinations:

| Environment    | Tool |
| -------------- | ---- |
| Firefox        | NVDA |
| Chrome         | JAWS |
| Microsoft Edge | JAWS |

### Test Example

To test the Chat component, refer to the [Chat Accessibility Demo](https://demos.telerik.com/aspnet-mvc/accessibility/chat).

## Keyboard Navigation

For details on how the Chat keyboard navigation works, refer to the [Chat Keyboard Navigation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/conversational-ui/chat/accessibility/keyboard-navigation) article.

## See Also

* [Keyboard Navigation by the Chat for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/chat/keyboard-navigation)
* [Keyboard Navigation by the Chat for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/conversational-ui/chat/accessibility/keyboard-navigation)
* [Accessibility in Telerik UI for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/accessibility/overview)
