From be0edf9606f76ae8af17ed53fba9d25aae1bb9b5 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Fri, 23 Jul 2021 16:55:02 -0700 Subject: [PATCH] Add aria label to connection string pages (#16420) --- extensions/arc/src/localizedConstants.ts | 1 + extensions/arc/src/ui/components/keyValueContainer.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/arc/src/localizedConstants.ts b/extensions/arc/src/localizedConstants.ts index 453cd7a916..f9bb822fe5 100644 --- a/extensions/arc/src/localizedConstants.ts +++ b/extensions/arc/src/localizedConstants.ts @@ -246,6 +246,7 @@ export function numVCores(vCores: string | undefined): string { } } export function updated(when: string): string { return localize('arc.updated', "Updated {0}", when); } +export function connectionString(type: string): string { return localize({ key: 'arc.connectionString', comment: ['{0} is the name of the type of connection string (e.g. Java)'] }, "Connection string for {0}", type); } export function copyConnectionStringToClipboard(type: string): string { return localize({ key: 'arc.copyConnectionStringToClipboard', comment: ['{0} is the name of the type of connection string (e.g. Java)'] }, "Copy {0} Connection String to clipboard", type); } export function copyValueToClipboard(valueName: string): string { return localize({ key: 'arc.copyValueToClipboard', comment: ['{0} is the name of the type of value being copied (e.g. Coordinator endpoint)'] }, "Copy {0} to clipboard", valueName); } diff --git a/extensions/arc/src/ui/components/keyValueContainer.ts b/extensions/arc/src/ui/components/keyValueContainer.ts index 8261767fd0..015e2660cc 100644 --- a/extensions/arc/src/ui/components/keyValueContainer.ts +++ b/extensions/arc/src/ui/components/keyValueContainer.ts @@ -104,7 +104,8 @@ export abstract class BaseInputKeyValue extends KeyValue { this.input = modelBuilder.inputBox().withProps({ value: value, readOnly: true, - multiline: multiline + multiline: multiline, + ariaLabel: loc.connectionString(key) }).component(); const inputContainer = modelBuilder.flexContainer().withLayout({ alignItems: 'center' }).component();