microsoft / microsoft/AdaptiveCards
[Feature Request] Add TargetElement.focus property to Action.ToggleVisibility
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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