Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChoiceSets in Adaptive Cards do not have accessible Names if they don't have a Label #2319

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

krschau
Copy link
Collaborator

@krschau krschau commented Feb 27, 2024

Summary of the pull request

If a Label (Header) is not specified on a ChoiceSet (ComboBox), the resulting ComboBox will not have an accessible name. Creates a custom renderer to render ChoiceSets as AccessibleChoiceSets. If there is no Label, the renderer uses the Placeholder text as the name, if it is available. If not, it renders the ChoiceSet as normal.

This workaround is necessary unless Adaptive Cards changes the renderer, see microsoft/AdaptiveCards#8837.

References and relevant issues

https://dev.azure.com/microsoft/OS/_workitems/edit/48294659
https://dev.azure.com/microsoft/OS/_workitems/edit/48181033

Validation steps performed

Tested with ChoiceSets in GitHub and Azure extension widgets.

PR checklist

namespace DevHome.Common.Renderers;

public class AccessibleChoiceSet : IAdaptiveElementRenderer
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can add a comment about this being a temp change until AdaptiveCards implements this.

@vineeththomasalex vineeththomasalex added the Needs-Second Pull request that needs another approval label Feb 28, 2024
@EricJohnson327 EricJohnson327 merged commit 406b793 into main Mar 1, 2024
4 checks passed
@EricJohnson327 EricJohnson327 deleted the user/krschau/AccessibleChoiceSet branch March 1, 2024 19:26
@krschau krschau removed the Needs-Second Pull request that needs another approval label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility fixes for 0.12 milestone
3 participants