Skip to content

[Rendering][XAML] ChoiceSets without a Label have no accessible name  #8837

@krschau

Description

@krschau

Target Platforms

UWP

SDK Version

1.5

Application Name

Dev Home

Problem Description

If a Label (Header) is not specified on a ChoiceSet (ComboBox), the resulting ComboBox will not have an accessible name. This is the same behavior that happens in direct WinUI 3, however, setting an Accessible Name directly in WinUI 3 is a lot easier than hoping each Adaptive Card host creates a custom renderer for this case. I suggest that if there is no Label, the renderer sets the Name to be the placeholder text. That way the card author can still do things the default way (set a label/header) but the control is still accessible if they do not.

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

Screenshots

No response

Card JSON

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.5",
    "body": [
        {
            "type": "Input.ChoiceSet",
            "choices": [
                {
                    "title": "Choice 1",
                    "value": "Choice 1"
                },
                {
                    "title": "Choice 2",
                    "value": "Choice 2"
                }
            ],
            "placeholder": "Placeholder text"
        }
    ]
}

Sample Code Language

No response

Sample Code

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions