Skip to content

Commit f751d11

Browse files
author
Eugene Olonov
committed
Show the live region copy in the no role words snapshot
1 parent 7b854ad commit f751d11

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ Legends:
6767
- Fixed carousel cards focused with <kbd>TAB</kbd> staying partially out of view, in PR [#5926](https://github.com/microsoft/BotFramework-WebChat/pull/5926), by [@OEvgeny](https://github.com/OEvgeny)
6868
- Fixed <kbd>LEFT</kbd>/<kbd>RIGHT</kbd> on a button inside a carousel card scrolling the carousel, in PR [#5917](https://github.com/microsoft/BotFramework-WebChat/pull/5917), by [@OEvgeny](https://github.com/OEvgeny)
6969
- Fixed icons being invisible, link references not using the link color, and Fluent messages and Copy button having no border in forced colors, fixes [#4906](https://github.com/microsoft/BotFramework-WebChat/issues/4906) and [#4907](https://github.com/microsoft/BotFramework-WebChat/issues/4907), in PR [#5907](https://github.com/microsoft/BotFramework-WebChat/pull/5907), by [@OEvgeny](https://github.com/OEvgeny)
70-
- Fixed screen readers saying "article" before new messages and their attachments in the live region, in PR [#XXXX](https://github.com/microsoft/BotFramework-WebChat/pull/XXXX), by [@OEvgeny](https://github.com/OEvgeny)
7170
- Fixed screen readers saying "article" and "group" before new messages and each of their lines in the live region, in PR [#5921](https://github.com/microsoft/BotFramework-WebChat/pull/5921), by [@OEvgeny](https://github.com/OEvgeny)
7271

7372
## [4.19.2] - 2026-10-08

‎__tests__/html2/accessibility/liveRegion/noRoleWords.html‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<html lang="en-US">
33
<head>
44
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
5+
<!-- Shows the live region, so the snapshot shows the copy sent to screen readers. -->
6+
<link href="/assets/accessibility.liveRegionAttachment.css" rel="stylesheet" type="text/css" />
57
<script crossorigin="anonymous" src="/test-harness.js"></script>
68
<script crossorigin="anonymous" src="/test-page-object.js"></script>
79
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
@@ -21,11 +23,12 @@
2123
run(async function () {
2224
const { directLine, store } = testHelpers.createDirectLineEmulator();
2325

26+
// GIVEN: Web Chat keeps the live region copy of new messages, so it can be seen in the snapshot.
2427
WebChat.renderWebChat(
2528
{
2629
directLine,
2730
store,
28-
styleOptions: { botAvatarInitials: 'WC', internalLiveRegionFadeAfter: 60000 }
31+
styleOptions: { botAvatarInitials: 'WC', hideSendBox: true, internalLiveRegionFadeAfter: 60000 }
2932
},
3033
document.getElementById('webchat')
3134
);
@@ -103,6 +106,11 @@
103106
.filter(({ ignored }) => !ignored)
104107
.map(({ name, role }) => `${role?.value} "${name?.value}"`)
105108
).toEqual(['button "Help"', 'button "OK"', 'button "Go"']);
109+
110+
await pageConditions.liveRegionStabilized();
111+
112+
// THEN: The live region (top) shows the message, "Help", "A card: Card 1", "OK", "A card: Card 2 Hero text", "Go" and "A file: report.zip", with no role words such as "article" or "group".
113+
await host.snapshot('local');
106114
});
107115
</script>
108116
</body>
32.6 KB
Loading

0 commit comments

Comments
 (0)