diff --git a/src/messages/AdaptiveCards/components/Adaptivecard.tsx b/src/messages/AdaptiveCards/components/Adaptivecard.tsx index f324ca7..e0212e9 100644 --- a/src/messages/AdaptiveCards/components/Adaptivecard.tsx +++ b/src/messages/AdaptiveCards/components/Adaptivecard.tsx @@ -64,6 +64,12 @@ const AdaptiveCard: FC = props => { if (result) { targetRef.current.innerHTML = ""; targetRef.current.appendChild(result); + // Add aria-level attribute to heading elements + const headings = targetRef.current.querySelectorAll("[role='heading']"); + headings.forEach(heading => { + if (heading.getAttribute("aria-level") === null) + heading.setAttribute("aria-level", "2"); + }); } } catch (error) { console.error("Unable to render Adaptive Card: ", error); diff --git a/src/messages/Video/Video.tsx b/src/messages/Video/Video.tsx index 2792135..5504826 100644 --- a/src/messages/Video/Video.tsx +++ b/src/messages/Video/Video.tsx @@ -71,7 +71,7 @@ const Video: FC = () => { kind: "subtitles", src: captionsUrl as string, srcLang: "en-US", // TODO: Get language from Say node in the future - label: "English", + label: "On", }, ], }; diff --git a/test/fixtures/adaptiveCards.json b/test/fixtures/adaptiveCards.json index cc118cb..07f5e4d 100644 --- a/test/fixtures/adaptiveCards.json +++ b/test/fixtures/adaptiveCards.json @@ -12,7 +12,8 @@ "type": "TextBlock", "size": "Medium", "weight": "Bolder", - "text": "I eat only ><_>" + "text": "I eat only ><_>", + "style": "heading" }, { "type": "ColumnSet", @@ -116,7 +117,8 @@ "type": "TextBlock", "size": "large", "weight": "bolder", - "text": "Large header" + "text": "Large header", + "style": "heading" }, { "type": "Input.Text",