microsoft / microsoft/AdaptiveCards

{Linked:Bug49658986;Linked:Bug49357192;Linked:Bug49357930;Linked:Bug55956296}Feature request: Expose API to update a card with new data (template remains the same)

Open
#8,763 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A11yMissing_HCLReviewed A11ySev2 A11yWCAG AdaptiveCards_Universal Area-Accessibility Area-Renderers Bug GADate-202507 HCL-AdaptiveCards-Universal MissingReviewedDeprecated Product-AC UnshippedFeature
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Target Platforms

AdaptiveCards-WinUI (=shared code with Universal)

SDK Version

1.0.2

Application Name

Dev Home, Windows Widget Dashboard

Problem Description

When the Adaptive Card of a Widget updates (either by an action pressed or not) and the focus is held inside the card, it is lost on the re-rendering. This happens because all the content of the card is redrawn when an update occurs.

The correct behavior should be the focus being kept to the equivalent control if the template didn't change from update to another. Or if the template changes, the focus should change to the AC itself. And the narrator should not narrate the control again when this change happen.

Screenshots

No response

Card JSON
{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "Image",
      "url": "${gpuGraphUrl}",
      "height": "${chartHeight}",
      "width": "${chartWidth}",
      "horizontalAlignment": "center"
    },
    {
      "type": "ColumnSet",
      "columns": [
        {
          "type": "Column",
          "items": [
            {
              "text": "%GPUUsage_Widget_Template/GPU_Usage%",
              "type": "TextBlock",
              "size": "small",
              "isSubtle": true
            },
            {
              "text": "${gpuUsage}",
              "type": "TextBlock",
              "size": "large",
              "weight": "bolder"
            }
          ]
        },
        {
          "type": "Column",
          "items": [
            {
              "text": "%GPUUsage_Widget_Template/GPU_Temperature%",
              "type": "TextBlock",
              "size": "small",
              "isSubtle": true,
              "horizontalAlignment": "right"
            },
            {
              "text": "${gpuTemp}",
              "type": "TextBlock",
              "size": "large",
              "weight": "bolder",
              "horizontalAlignment": "right"
            }
          ]
        }
      ]
    },
    {
      "text": "%GPUUsage_Widget_Template/GPU_Name%",
      "type": "TextBlock",
      "size": "small",
      "isSubtle": true
    },
    {
      "text": "${gpuName}",
      "type": "TextBlock",
      "size": "medium"
    }
  ],
  "actions": [
    {
      "type": "Action.Execute",
      "title": "%GPUUsage_Widget_Template/Next_GPU%",
      "verb": "NextItem"
    }
  ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.5"
}
Sample Code Language

C#

Sample Code

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the AdaptiveCards-WinUI shared rendering and update path used by the provided card JSON, focusing on how focus and narrator state behave when card data changes. Define the API and update behavior for unchanged versus changed templates, then verify that equivalent controls retain focus and that Narrator does not repeat unchanged content.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
accessibility, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.