add aria-label / name to image only buttons (#16124)

* add aria-label / name to image only buttons

* add correct aria label to image buttons

* add key number to button aria-label, title and action messages to differentient keys
This commit is contained in:
brian-harris
2021-07-15 12:08:59 -07:00
committed by GitHub
parent 0ff8786885
commit b45f3e7218
5 changed files with 59 additions and 30 deletions

View File

@@ -229,38 +229,44 @@ export class SqlMigrationServiceDetailsDialog {
const copyKey1Button = view.modelBuilder
.button()
.withProps({
.withProperties<azdata.ComponentWithIconProperties>({
title: constants.COPY_KEY1,
iconPath: IconPathHelper.copy,
height: IMAGE_SIZE,
width: IMAGE_SIZE,
ariaLabel: constants.COPY_KEY1,
})
.component();
copyKey1Button.onDidClick((e) => {
vscode.env.clipboard.writeText(keys.authKey1);
vscode.window.showInformationMessage(constants.SERVICE_KEY_COPIED_HELP);
vscode.window.showInformationMessage(constants.SERVICE_KEY1_COPIED_HELP);
});
const copyKey2Button = view.modelBuilder
.button()
.withProps({
.withProperties<azdata.ComponentWithIconProperties>({
title: constants.COPY_KEY2,
iconPath: IconPathHelper.copy,
height: IMAGE_SIZE,
width: IMAGE_SIZE,
ariaLabel: constants.COPY_KEY2,
})
.component();
copyKey2Button.onDidClick((e) => {
vscode.env.clipboard.writeText(keys.authKey2);
vscode.window.showInformationMessage(constants.SERVICE_KEY_COPIED_HELP);
vscode.window.showInformationMessage(constants.SERVICE_KEY2_COPIED_HELP);
});
const refreshKey1Button = view.modelBuilder
.button()
.withProps({
.withProperties<azdata.ComponentWithIconProperties>({
title: constants.REFRESH_KEY1,
iconPath: IconPathHelper.refresh,
height: IMAGE_SIZE,
width: IMAGE_SIZE,
ariaLabel: constants.REFRESH_KEY1,
})
.component();
refreshKey1Button.onDidClick(
@@ -268,10 +274,12 @@ export class SqlMigrationServiceDetailsDialog {
const refreshKey2Button = view.modelBuilder
.button()
.withProps({
.withProperties<azdata.ComponentWithIconProperties>({
title: constants.REFRESH_KEY2,
iconPath: IconPathHelper.refresh,
height: IMAGE_SIZE,
width: IMAGE_SIZE,
ariaLabel: constants.REFRESH_KEY2,
})
.component();
refreshKey2Button.onDidClick(