Skip to content

Commit 5aceb89

Browse files
committed
Sync with Kendo UI Professional
1 parent 5bb295d commit 5aceb89

File tree

2 files changed

+102
-1
lines changed

2 files changed

+102
-1
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: Overview
3+
page_title: jQuery Chat Documentation | Chat Accessibility
4+
description: "Get started with the jQuery Chat by Kendo UI and learn about its accessibility support for WAI-ARIA, Section 508, and WCAG 2.2."
5+
slug: accessibility_kendoui_chat_widget
6+
position: 1
7+
---
8+
9+
# Chat Accessibility
10+
11+
The Chat is accessible by screen readers and provides WAI-ARIA, Section 508, WCAG 2.2, and keyboard support.
12+
13+
For more information, refer to [Accessibility in Kendo UI for jQuery]({% slug overview_accessibility_support_kendoui %}).
14+
15+
16+
17+
18+
Out of the box, the Kendo UI for jQuery Chat provides extensive accessibility support and enables users with disabilities to acquire complete control over its features.
19+
20+
21+
The Chat is compliant with the [Web Content Accessibility Guidelines (WCAG) 2.2 AA](https://www.w3.org/TR/WCAG22/) standards](https://www.w3.org/TR/WCAG22/) and [Section 508](http://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](#keyboard-navigation) for its `component` role, provides options for managing its focus and is tested against the most popular screen readers.
22+
23+
## WAI-ARIA
24+
25+
26+
This section lists the selectors, attributes, and behavior patterns supported by the component and its composite elements, if any.
27+
28+
| Selector | Attribute | Usage |
29+
| -------- | --------- | ----- |
30+
| `.k-message-list` | `role=log` | The role of the Chat message list must imply that there is a log (list) of messages. |
31+
| | `aria-label` | Announces the purpose of the Chat message list (for ex. 'Message list'). |
32+
| `.k-quick-reply` | `role=button` | The quick reply elements must be exposed as buttons. |
33+
| | `tabindex=0` | The quick reply elements must be part of the page tabsequence. |
34+
| `.k-message-box>.k-input-inner` | `role=textbox` or `nodeName=input` | The message must have an input or an element with `role=textbox`. |
35+
| | `label for` or `aria-label` or `aria-labelledby` | The message box input must have a label. |
36+
| `.k-input-suffix>.k-button` | `role=button` or `nodeName=button` | The buttons must have appropriate role. |
37+
| | `aria-label` or `title` | The buttons must be properly labelled. |
38+
| `.k-button-toggle` | `aria-controls=.k-toolbar-box id` | The ToolBar toggle button must have an `aria-controls` attribute pointing to the ToolBar element. |
39+
| `.k-toolbar-box` | `role=toolbar` | The Chat ToolBar must have an appropriate role. |
40+
41+
42+
Chat ToolBar follows the specification for the the ToolBar component.
43+
44+
[ToolBar accessibility specification]({{toolbar_a11y_link}})
45+
46+
## Resources
47+
48+
[WAI-ARIA specification for log](https://www.w3.org/TR/wai-aria-1.2/#log)
49+
50+
## Section 508
51+
52+
53+
The Chat is fully compliant with the [Section 508 requirements](http://www.section508.gov/).
54+
55+
## Testing
56+
57+
58+
The Chat has been extensively tested automatically with [axe-core](https://github.com/dequelabs/axe-core) and manually with the most popular screen readers.
59+
60+
> To report any accessibility issues, contact the team through the [Telerik Support System](https://www.telerik.com/account/support-center).
61+
62+
### Screen Readers
63+
64+
65+
The Chat has been tested with the following screen readers and browsers combinations:
66+
67+
| Environment | Tool |
68+
| ----------- | ---- |
69+
| Firefox | NVDA |
70+
| Chrome | JAWS |
71+
| Microsoft Edge | JAWS |
72+
73+
74+
75+
### Test Example
76+
77+
A live test example of the Captcha component could be found here: https://demos.telerik.com/kendo-ui/accessibility/chat
78+
79+
## See Also
80+
81+
* [Keyboard Support in Kendo UI for jQuery]({% slug keyboard_shortcuts_accessibility_support %})
82+
* [Accessibility in Kendo UI for jQuery]({% slug overview_accessibility_support_kendoui %})

src/kendo.core.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2733,7 +2733,26 @@ function pad(number, digits, end) {
27332733
quoteRegExp = /"/g,
27342734
aposRegExp = /'/g,
27352735
gtRegExp = />/g;
2736-
function htmlEncode(value) {
2736+
2737+
function htmlDecode(value) {
2738+
var entities = {
2739+
'&': '&',
2740+
'&lt;': '<',
2741+
'&gt;': '>',
2742+
'&quot;': '"',
2743+
'&#39;': "'"
2744+
};
2745+
2746+
return value.replace(/&(?:amp|lt|gt|quot|#39);/g, function(match) {
2747+
return entities[match];
2748+
});
2749+
}
2750+
2751+
function htmlEncode(value, shouldDecode) {
2752+
if (shouldDecode === true) {
2753+
value = htmlDecode(value);
2754+
}
2755+
27372756
return ("" + value).replace(ampRegExp, "&amp;").replace(ltRegExp, "&lt;").replace(gtRegExp, "&gt;").replace(quoteRegExp, "&quot;").replace(aposRegExp, "&#39;");
27382757
}
27392758

0 commit comments

Comments
 (0)