microsoft / microsoft/AdaptiveCards

[Feature Request] Add TargetElement.focus property to Action.ToggleVisibility

Open
#7,922 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Request
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Problem Statement

When visibility toggles are used there's an accessibility issue that focus is lost and there's no automatic way of establishing where focus should be moved to.

Proposed solution

I propose adding a new focus property to the TargetElement structure passed in to Action.Togglevisibility. I work a lot with visibility toggles and in my case the developer always knows where focus should be moved to when somethings visibility is toggled, There's no need in trying to automatically infer where visibility should be moved to just let the developer specify.

What happens if focus is set to true for more then one target element? Focus should move to the first one specified.

Alternatives or Workarounds

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 locating the TargetElement structure and Action.ToggleVisibility implementation. Trace how multiple target elements are processed, then add the requested focus behavior so focus moves to the first target with focus enabled; verify the behavior across the affected implementations and their existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
accessibility
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.