From a8caf95344340d6c3bb6e2aac410485ac28d639c Mon Sep 17 00:00:00 2001 From: vaidankarswapnil Date: Wed, 19 Jan 2022 21:50:34 +0530 Subject: [PATCH] Fixed a11y issue for the new container label --- .../Controls/ThroughputInput/ThroughputInput.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Explorer/Controls/ThroughputInput/ThroughputInput.tsx b/src/Explorer/Controls/ThroughputInput/ThroughputInput.tsx index ff4d7ed25..87820c963 100644 --- a/src/Explorer/Controls/ThroughputInput/ThroughputInput.tsx +++ b/src/Explorer/Controls/ThroughputInput/ThroughputInput.tsx @@ -212,7 +212,12 @@ export const ThroughputInput: FunctionComponent = ({ - + {isDatabase ? "Database" : getCollectionName()} Max RU/s {getAutoScaleTooltip()} @@ -224,11 +229,11 @@ export const ThroughputInput: FunctionComponent = ({ fieldGroup: { width: 300, height: 27 }, field: { fontSize: 12 }, }} - onChange={(event, newInput?: string) => onThroughputValueChange(newInput)} + onChange={(_, newInput?: string) => onThroughputValueChange(newInput)} step={AutoPilotUtils.autoPilotIncrementStep} min={AutoPilotUtils.minAutoPilotThroughput} value={throughput.toString()} - aria-label="Max request units per second" + aria-labelledby="maxRU" required={true} errorMessage={throughputError} /> @@ -268,7 +273,7 @@ export const ThroughputInput: FunctionComponent = ({ fieldGroup: { width: 300, height: 27 }, field: { fontSize: 12 }, }} - onChange={(event, newInput?: string) => onThroughputValueChange(newInput)} + onChange={(_, newInput?: string) => onThroughputValueChange(newInput)} step={100} min={SharedConstants.CollectionCreation.DefaultCollectionRUs400} max={userContext.isTryCosmosDBSubscription ? Constants.TryCosmosExperience.maxRU : Infinity}