Add aria labels to buttons and spin inputs on Arc dashboards (#15798)

This commit is contained in:
Charles Gagnon
2021-06-17 19:38:27 -07:00
committed by GitHub
parent df296939a8
commit efd752aafe
4 changed files with 45 additions and 21 deletions

View File

@@ -164,13 +164,21 @@ export const nodes = localize('arc.nodes', "nodes");
export const workerNodes = localize('arc.workerNodes', "Worker Nodes");
export const coordinatorNode = localize('arc.coordinatorNode', "Coordinator Node");
export const storagePerNode = localize('arc.storagePerNode', "storage per node");
export const workerNodeCount = localize('arc.workerNodeCount', "Worker node count:");
export const workerNodeCount = localize('arc.workerNodeCount', "Worker node count");
export const configurationPerNode = localize('arc.configurationPerNode', "Configuration (per node)");
export const configuration = localize('arc.configurationCoordinatorNode', "Configuration");
export const coresLimit = localize('arc.coresLimit', "CPU limit:");
export const coresRequest = localize('arc.coresRequest', "CPU request:");
export const memoryLimit = localize('arc.memoryLimit', "Memory limit (in GB):");
export const memoryRequest = localize('arc.memoryRequest', "Memory request (in GB):");
export const coresLimit = localize('arc.coresLimit', "CPU limit");
export const workerCoresLimit = localize('arc.workerCoresLimit', "Worker Nodes CPU limit");
export const coordinatorCoresLimit = localize('arc.coordinatorCoresLimit', "Coordinator Node CPU limit");
export const coresRequest = localize('arc.coresRequest', "CPU request");
export const workerCoresRequest = localize('arc.workerCoresRequest', "Worker Nodes CPU request");
export const coordinatorCoresRequest = localize('arc.coordinatorCoresRequest', "Coordinator Node CPU request");
export const memoryLimit = localize('arc.memoryLimit', "Memory limit (in GB)");
export const workerMemoryLimit = localize('arc.workerMemoryLimit', "Worker Nodes Memory limit (in GB)");
export const coordinatorMemoryLimit = localize('arc.coordinatorMemoryLimit', "Coordinator Node Memory limit (in GB)");
export const memoryRequest = localize('arc.memoryRequest', "Memory request (in GB)");
export const workerMemoryRequest = localize('arc.workerMemoryRequest', "Worker Nodes Memory request (in GB)");
export const coordinatorMemoryRequest = localize('arc.coordinatorMemoryRequest', "Coordinator Node Memory request (in GB)");
export const arcResources = localize('arc.arcResources', "Azure Arc Resources");
export const enterANonEmptyPassword = localize('arc.enterANonEmptyPassword', "Enter a non empty password or press escape to exit.");
export const thePasswordsDoNotMatch = localize('arc.thePasswordsDoNotMatch', "The passwords do not match. Confirm the password or press escape to exit.");
@@ -217,6 +225,8 @@ export function numVCores(vCores: string | undefined): string {
}
}
export function updated(when: string): string { return localize('arc.updated', "Updated {0}", when); }
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); }
// Errors
export const pgConnectionRequired = localize('arc.pgConnectionRequired', "A connection is required to show and set database engine settings.");

View File

@@ -113,7 +113,8 @@ export abstract class BaseInputKeyValue extends KeyValue {
const copy = modelBuilder.button().withProperties<azdata.ButtonProperties>({
iconPath: IconPathHelper.copy,
width: '17px',
height: '17px'
height: '17px',
ariaLabel: loc.copyConnectionStringToClipboard(key)
}).component();
this.disposables.push(copy.onDidClick(async () => {

View File

@@ -183,7 +183,8 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 1,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.coresLimit
}).component();
this.disposables.push(
@@ -200,7 +201,8 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 1,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.coresRequest
}).component();
this.disposables.push(
@@ -217,7 +219,8 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 2,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.memoryLimit
}).component();
this.disposables.push(
@@ -234,7 +237,8 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 2,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.memoryRequest
}).component();
this.disposables.push(
@@ -274,7 +278,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
}).component();
const keyComponent = this.modelView.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
value: key,
value: `${key} :`,
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
}).component();

View File

@@ -247,7 +247,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
min: 0,
inputType: 'number',
placeHolder: loc.loading,
required: true
required: true,
ariaLabel: loc.workerNodeCount
}).component();
this.disposables.push(
@@ -265,7 +266,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 1,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.workerCoresRequest
}).component();
this.disposables.push(
@@ -285,7 +287,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 1,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.workerCoresLimit
}).component();
this.disposables.push(
@@ -305,7 +308,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 0.25,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.workerMemoryRequest
}).component();
this.disposables.push(
@@ -325,7 +329,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 0.25,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.workerMemoryLimit
}).component();
this.disposables.push(
@@ -345,7 +350,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 1,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.coordinatorCoresRequest
}).component();
this.disposables.push(
@@ -365,7 +371,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 1,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.coordinatorCoresLimit
}).component();
this.disposables.push(
@@ -385,7 +392,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 0.25,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.coordinatorMemoryRequest
}).component();
this.disposables.push(
@@ -405,7 +413,8 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
readOnly: false,
min: 0.25,
inputType: 'number',
placeHolder: loc.loading
placeHolder: loc.loading,
ariaLabel: loc.coordinatorMemoryLimit
}).component();
this.disposables.push(
@@ -499,7 +508,7 @@ export class PostgresComputeAndStoragePage extends DashboardPage {
}).component();
const keyComponent = this.modelView.modelBuilder.text().withProps({
value: key,
value: `${key} :`,
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
}).component();