Verify screen reader behavior on Adaptive Card
Screenshots
Version
4.12.0-0 with AC 2.5.0.
Describe the bug
While testing transcript navigation, one of the screen reader behaviors around Adaptive Cards seems off.
We would need to repro this on a page outside of Web Chat. If it still repro, will bring it to the accessibility team to verify.
Steps to reproduce
AC card should be read if the user focus into it
- Build a plain HTML page
- Put a button "Hello"
- Append a AC container with a card, with at least one textblock "Aloha", followed by one button (e.g. card breakfast)
- Run the page with screen reader
- TAB into the first button "Hello"
- Expect: AT should narrate the content of the button, i.e. "Hello button".
- Press TAB again and it should focus the first input element in the AC
- Expect: AT should narrate the content of the card, i.e. "Aloha".
Additional context
[Bug]
add to playground or potentially 'Web Chat tools' package
Hi @compulim
I attempted to verify screen reader behavior for Adaptive Card using Windows built-in Narrator text-to-speech software.
Expectation behavior:
- Expect: AT should narrate the content of the button, i.e. "Hello button".
- Press TAB again and it should focus the first input element in the AC
- Expect: AT should narrate the content of the card, i.e. "Aloha".
- Verified
- After pressing the
tabkey, it goes straight to step 3 and reads the content "aloha" in AC - Verified
Video demo
Volume up
https://user-images.githubusercontent.com/38049078/167686822-4f32f465-f707-429e-a58a-ff59d16e499d.mp4
Sharing my index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://unpkg.com/adaptivecards/dist/adaptivecards.js"></script>
<title>Document</title>
</head>
<body>
<button>Hello</button>
<script
type="text/javascript"
src="https://unpkg.com/markdown-it/dist/markdown-it.js"
></script>
<script type="text/javascript">
// adaptive card object
var card = {
$schema: "http://adaptivecards.io/schemas/adaptive-card.json",
type: "AdaptiveCard",
version: "1.0",
body: [
{
type: "Container",
items: [
{
type: "TextBlock",
text: "Aloha",
},
],
},
],
actions: [
{
type: "Action.Submit",
title: "Pickup",
tooltip: "Schedule order for pickup",
},
],
};
// Create an AdaptiveCard instance
var adaptiveCard = new AdaptiveCards.AdaptiveCard();
// Enable markdown
AdaptiveCards.AdaptiveCard.onProcessMarkdown = function (text, result) {
result.outputHtml = markdownit().render(text);
result.didProcess = true;
};
// Parse the card payload
adaptiveCard.parse(card);
// Render the card to an HTML element:
var renderedCard = adaptiveCard.render();
// And finally insert it somewhere in your page:
document.body.appendChild(renderedCard);
</script>
</body>
</html>
any additional steps I shall take to verify the screen reader behavior on Adaptive Card? Thanks.