Skip to content

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

Merged
Eugene (OEvgeny) merged 9 commits into
mainfrom
OEvgeny/fix-ac-selectable-figure
Oct 21, 2026
Merged

Eugene (OEvgeny) merged 9 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 #5049, Adaptive Cards without a label being announced as an unnamed figure by screen readers, in PR #5915, by @OEvgeny
  • Fixed #5130, clickable containers and images in Adaptive Cards not showing a pointer cursor, 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 a label are neither "figure" nor "form"; snap 1: live region reads "A card:" with each card's text

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

  • I have added tests and executed them locally

  • I have added .changelog/<PR#>-<slug>.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

@OEvgeny
Eugene (OEvgeny) force-pushed the OEvgeny/fix-ac-selectable-figure branch from 3a1e404 to 8ef98c4 Compare October 20, 2026 02:22
@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review October 20, 2026 18:10
Copilot AI balanced review requested due to automatic review settings October 20, 2026 18:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@OEvgeny
Eugene (OEvgeny) force-pushed the OEvgeny/fix-ac-selectable-figure branch 2 times, most recently from 65ed889 to 41dd9f4 Compare October 20, 2026 20:24
Eugene Olonov added 5 commits October 20, 2026 13:55
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 41dd9f4 to ab1ba1e Compare October 20, 2026 20:57
Eugene (OEvgeny) and others added 2 commits October 20, 2026 19:37
…on main

#5900 removed the capture-phase click listener from the card root, so Chrome now leaves the role-less card out of the accessibility tree (role "none") instead of exposing it as "generic". Assert that neither card is a "figure" or a "form" instead.

The live region now reads the text of cards without "speak" (#5922), update the snapshot.
@OEvgeny
Eugene (OEvgeny) merged commit 0f4abdb into main Oct 21, 2026
33 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/fix-ac-selectable-figure branch October 21, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants