-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(adaptive-cards): add richCardTitleAsHeading styleOption to opt out of role=heading on rich card titles #5839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
compulim
merged 12 commits into
microsoft:main
from
cjennison:a11y/rich-card-title-as-heading-option
Jun 11, 2026
Merged
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
db9f144
feat(adaptive-cards): add richCardTitleAsHeading styleOption to opt o…
d305834
address review comments from automated reviewer
5acb70d
code-review: drop 'as const', narrow doc comment to actual code paths
ee530c5
trim verbose comments and changelog entry to match repo style
d77a59c
Merge branch 'main' into a11y/rich-card-title-as-heading-option
OEvgeny 74295fc
address review: snapshot both heroCard heading tests + fix changelog …
eed2536
test: commit image snapshot baselines for heroCard heading/noHeading
6f7ec02
test: visually highlight [role=heading] in heroCard snapshots
1cb023d
Merge branch 'main' into a11y/rich-card-title-as-heading-option
compulim 44a5cf2
Merge branch 'main' into a11y/rich-card-title-as-heading-option
compulim b45f06f
Merge branch 'main' into a11y/rich-card-title-as-heading-option
compulim 51eb696
Reverse styleOptions so default is falsy
compulim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
36 changes: 36 additions & 0 deletions
36
__tests__/html2/accessibility/attachment/heroCard.noHeading.html
This file contains hidden or 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,36 @@ | ||
| <!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> | ||
| <main id="webchat"></main> | ||
| <script> | ||
| run(async function () { | ||
| const store = testHelpers.createStore(); | ||
| const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() }); | ||
| const styleOptions = { richCardTitleAsHeading: false }; | ||
| const baseProps = { directLine, store, styleOptions }; | ||
| const webChatElement = document.getElementById('webchat'); | ||
|
|
||
| WebChat.renderWebChat(baseProps, webChatElement); | ||
|
|
||
| await pageConditions.uiConnected(); | ||
|
|
||
| await pageObjects.sendMessageViaSendBox('herocard', { waitForSend: true }); | ||
| await pageConditions.minNumActivitiesShown(2); | ||
| await pageConditions.scrollToBottomCompleted(); | ||
|
|
||
| // The hero card title text block should be present... | ||
| const titleTextBlock = document.querySelector('.ac-textBlock'); | ||
| expect(titleTextBlock).toHaveProperty('innerText', '\u200BDetails about image 1\u200B'); | ||
|
|
||
| // ...but it must not be a programmatic heading when richCardTitleAsHeading is false. | ||
| expect(document.querySelector('.ac-textBlock[role="heading"]')).toBe(null); | ||
| }); | ||
| </script> | ||
| </body> | ||
| </html> | ||
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.