Skip to content

add aria-description support for selectbox#152251

Merged
isidorn merged 2 commits intomicrosoft:mainfrom
alanrenmsft:alanren/aria-desc
Jun 16, 2022
Merged

add aria-description support for selectbox#152251
isidorn merged 2 commits intomicrosoft:mainfrom
alanrenmsft:alanren/aria-desc

Conversation

@alanrenmsft
Copy link
Contributor

while working on an accessibility issue for Azure Data Studio (a fork of vscode), we realized that this option is missing, thought it could be useful for VSCode too, so created this PR.

this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
}

if (this.selectBoxOptions.ariaDescription) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably best to keep the check similar to the other ones

typeof this.selectBoxOptions.ariaDescription === 'string'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
}

if (this.selectBoxOptions.ariaDescription) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here - typeof this.selectBoxOptions.ariaDescription === 'string'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@meganrogge meganrogge assigned bpasero and unassigned meganrogge Jun 15, 2022
@bpasero bpasero assigned isidorn and unassigned bpasero Jun 16, 2022
@isidorn
Copy link
Collaborator

isidorn commented Jun 16, 2022

@alanrenmsft thanks for the PR. I think this makes sense, even though aria-description is not yet supported by all screen readers to my knowledge.
Though makes sense for the future, and it is a small change. So merging in. Thank you!

@isidorn isidorn merged commit c3424ba into microsoft:main Jun 16, 2022
@isidorn isidorn added this to the June 2022 milestone Jun 16, 2022
justschen pushed a commit to justschen/vscode that referenced this pull request Jun 16, 2022
add aria-description support for selectbox
@github-actions github-actions bot locked and limited conversation to collaborators Jul 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants