-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix repetitive narration in Windows Narrator (#4323)
* Fix repetitive narration in Windows Narrator * Fix test * Fix tests and repetitives * Fix test * Fix repetitive narrations in JAWS * Remove aria-roledescription
- Loading branch information
Showing
56 changed files
with
491 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+210 Bytes
(100%)
...s-accessibility-requirement-attachments-in-live-region-adaptive-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+239 Bytes
(100%)
...-property-js-live-region-should-narrate-speak-property-adaptive-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.91 KB
(110%)
...-accessibility-requirement-attachments-in-live-region-animation-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.54 KB
(96%)
...d-js-accessibility-requirement-attachments-in-live-region-audio-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-400 Bytes
(98%)
...-audio-js-accessibility-requirement-attachments-in-live-region-audio-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.09 KB
(97%)
...nt-file-js-accessibility-requirement-attachments-in-live-region-file-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-565 Bytes
(99%)
...rd-js-accessibility-requirement-attachments-in-live-region-hero-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-172 Bytes
(100%)
...-image-js-accessibility-requirement-attachments-in-live-region-image-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.65 KB
(110%)
...js-accessibility-requirement-attachments-in-live-region-receipt-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-607 Bytes
(98%)
...js-accessibility-requirement-attachments-in-live-region-sign-in-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-471 Bytes
(98%)
...-accessibility-requirement-attachments-in-live-region-thumbnail-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+98 Bytes
(100%)
...js-accessibility-requirement-attachments-in-live-region-unknown-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+146 Bytes
(100%)
...d-js-accessibility-requirement-attachments-in-live-region-video-card-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-391 Bytes
(99%)
...-video-js-accessibility-requirement-attachments-in-live-region-video-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-29 Bytes
(100%)
...essibility-requirement-suggested-actions-in-live-region-with-message-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-317 Bytes
(99%)
...ibility-requirement-suggested-actions-in-live-region-without-message-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
__tests__/html/accessibility.suggestedActions.carouselLayout.ariaAttributes.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
<script crossorigin="anonymous" src="/test-harness.js"></script> | ||
<script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
</head> | ||
<body> | ||
<div id="webchat"></div> | ||
<script> | ||
run(async function () { | ||
WebChat.renderWebChat( | ||
{ | ||
directLine: testHelpers.createDirectLineWithTranscript([ | ||
{ | ||
from: { | ||
id: 'bot', | ||
role: 'bot' | ||
}, | ||
suggestedActions: { | ||
actions: [ | ||
{ | ||
title: 'What can I say?', | ||
type: 'imBack' | ||
}, | ||
{ | ||
title: 'What is the weather?', | ||
type: 'imBack' | ||
} | ||
] | ||
}, | ||
textFormat: 'markdown', | ||
timestamp: new Date(2000, 0, 1, 12, 34, 56, 789).toISOString(), | ||
type: 'message' | ||
} | ||
]), | ||
store: testHelpers.createStore(), | ||
styleOptions: { | ||
suggestedActionLayout: 'carousel' | ||
} | ||
}, | ||
document.getElementById('webchat') | ||
); | ||
|
||
await pageConditions.uiConnected(); | ||
await pageConditions.suggestedActionsShown(); | ||
|
||
// THEN: Suggested actions container in carousel layout should be of `role="toolbar"` with `aria-orientation="horizontal"` | ||
const suggestedActions = document.querySelector('.webchat__suggested-actions'); | ||
|
||
expect(suggestedActions.getAttribute('role')).toBe('toolbar'); | ||
expect(suggestedActions.getAttribute('aria-orientation')).toBe('horizontal'); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
__tests__/html/accessibility.suggestedActions.carouselLayout.ariaAttributes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ | ||
|
||
describe('accessibility requirement', () => { | ||
describe('suggested actions of carousel layout', () => { | ||
test('should have correct ARIA attributes', () => runHTML('accessibility.suggestedActions.carouselLayout.ariaAttributes.html')); | ||
}); | ||
}); |
57 changes: 57 additions & 0 deletions
57
__tests__/html/accessibility.suggestedActions.flowLayout.ariaAttributes.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
<script crossorigin="anonymous" src="/test-harness.js"></script> | ||
<script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
</head> | ||
<body> | ||
<div id="webchat"></div> | ||
<script> | ||
run(async function () { | ||
WebChat.renderWebChat( | ||
{ | ||
directLine: testHelpers.createDirectLineWithTranscript([ | ||
{ | ||
from: { | ||
id: 'bot', | ||
role: 'bot' | ||
}, | ||
suggestedActions: { | ||
actions: [ | ||
{ | ||
title: 'What can I say?', | ||
type: 'imBack' | ||
}, | ||
{ | ||
title: 'What is the weather?', | ||
type: 'imBack' | ||
} | ||
] | ||
}, | ||
textFormat: 'markdown', | ||
timestamp: new Date(2000, 0, 1, 12, 34, 56, 789).toISOString(), | ||
type: 'message' | ||
} | ||
]), | ||
store: testHelpers.createStore(), | ||
styleOptions: { | ||
suggestedActionLayout: 'flow' | ||
} | ||
}, | ||
document.getElementById('webchat') | ||
); | ||
|
||
await pageConditions.uiConnected(); | ||
await pageConditions.suggestedActionsShown(); | ||
|
||
// THEN: Suggested actions container in flow layout should be of `role="toolbar"` with `aria-orientation="horizontal"` | ||
const suggestedActions = document.querySelector('.webchat__suggested-actions'); | ||
|
||
expect(suggestedActions.getAttribute('role')).toBe('toolbar'); | ||
expect(suggestedActions.getAttribute('aria-orientation')).toBe('horizontal'); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
__tests__/html/accessibility.suggestedActions.flowLayout.ariaAttributes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ | ||
|
||
describe('accessibility requirement', () => { | ||
describe('suggested actions of flow layout', () => { | ||
test('should have correct ARIA attributes', () => runHTML('accessibility.suggestedActions.flowLayout.ariaAttributes.html')); | ||
}); | ||
}); |
57 changes: 57 additions & 0 deletions
57
__tests__/html/accessibility.suggestedActions.stackedLayout.ariaAttributes.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-US"> | ||
<head> | ||
<link href="/assets/index.css" rel="stylesheet" type="text/css" /> | ||
<script crossorigin="anonymous" src="/test-harness.js"></script> | ||
<script crossorigin="anonymous" src="/test-page-object.js"></script> | ||
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script> | ||
</head> | ||
<body> | ||
<div id="webchat"></div> | ||
<script> | ||
run(async function () { | ||
WebChat.renderWebChat( | ||
{ | ||
directLine: testHelpers.createDirectLineWithTranscript([ | ||
{ | ||
from: { | ||
id: 'bot', | ||
role: 'bot' | ||
}, | ||
suggestedActions: { | ||
actions: [ | ||
{ | ||
title: 'What can I say?', | ||
type: 'imBack' | ||
}, | ||
{ | ||
title: 'What is the weather?', | ||
type: 'imBack' | ||
} | ||
] | ||
}, | ||
textFormat: 'markdown', | ||
timestamp: new Date(2000, 0, 1, 12, 34, 56, 789).toISOString(), | ||
type: 'message' | ||
} | ||
]), | ||
store: testHelpers.createStore(), | ||
styleOptions: { | ||
suggestedActionLayout: 'stacked' | ||
} | ||
}, | ||
document.getElementById('webchat') | ||
); | ||
|
||
await pageConditions.uiConnected(); | ||
await pageConditions.suggestedActionsShown(); | ||
|
||
// THEN: Suggested actions container in stacked layout should be of `role="toolbar"` with `aria-orientation="vertical"` | ||
const suggestedActions = document.querySelector('.webchat__suggested-actions'); | ||
|
||
expect(suggestedActions.getAttribute('role')).toBe('toolbar'); | ||
expect(suggestedActions.getAttribute('aria-orientation')).toBe('vertical'); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
__tests__/html/accessibility.suggestedActions.stackedLayout.ariaAttributes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** @jest-environment ./packages/test/harness/src/host/jest/WebDriverEnvironment.js */ | ||
|
||
describe('accessibility requirement', () => { | ||
describe('suggested actions of stacked layout', () => { | ||
test('should have correct ARIA attributes', () => runHTML('accessibility.suggestedActions.stackedLayout.ariaAttributes.html')); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.