Skip to content

Do not set role="figure" on unlabelled Adaptive Cards, and show a pointer on clickable elements - #5915

Draft
Eugene (OEvgeny) wants to merge 5 commits into
mainfrom
OEvgeny/fix-ac-selectable-figure
Draft

Eugene (OEvgeny) wants to merge 5 commits into
mainfrom
OEvgeny/fix-ac-selectable-figure

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5049, fixes #5130

Changelog Entry

Fixed

  • Fixed Adaptive Cards without a label being announced as an unnamed figure by screen readers, fixes #5049, in PR #5915, by @OEvgeny
  • Fixed clickable containers and images in Adaptive Cards not showing a pointer cursor, fixes #5130, in PR #5915, by @OEvgeny

Description

Adaptive Cards without speak got an unnamed role="figure", and elements with selectAction had no pointer cursor. Cards now get figure or form only with a label, and clickable containers and images show a pointer cursor.

Design

Specific Changes

  • useRoleModEffect.ts: no role when the card has no label

  • AdaptiveCardRenderer.module.css: cursor: pointer on .ac-selectable except push buttons

  • hack.roleMod.unlabelled.html: 2 cards without speak are generic; snap 1: live region reads "A card:" twice

  • hack.roleMod.html: snap 1: live region reads each card's speak

  • I have added tests and executed them locally

  • I have updated CHANGELOG.md

  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@OEvgeny

Copy link
Copy Markdown
Collaborator Author

TODO: show announced activities by applying styles to live region and taking snapshot

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick question: why does the card text gets duplicated in the live region?

Eugene Olonov added 5 commits October 19, 2026 19:22
A card without "speak" has no name, and an unnamed "figure" or "form" is announced without its content.
Set the role only when the card has a label, fixes #5049.
Containers and images with "selectAction" get cursor: pointer; push buttons keep the default cursor, fixes #5130.
Both cards had speak 'Hello, World!', so the live region snapshot read the same line twice.
@OEvgeny
Eugene (OEvgeny) force-pushed the OEvgeny/fix-ac-selectable-figure branch from 3a1e404 to 8ef98c4 Compare October 20, 2026 02:22

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant