From 35051bace5fe031617db88cf5848fc0ce04cdec1 Mon Sep 17 00:00:00 2001 From: SATYA SB <107645008+satya07sb@users.noreply.github.com> Date: Wed, 14 May 2025 22:45:44 +0530 Subject: [PATCH] [Screen reader - Azure Cosmos DB-New Container]: Screen reader does not announce the associated label information for the 'Estimated monthly cost' info icon under 'New Container' blade. (#2091) * [accessibility-3690553]:[Screen reader - Azure Cosmos DB-New Container]: Screen reader does not announce the associated label information for the 'Estimated monthly cost' info icon under 'New Container' blade. * snap updated. --------- Co-authored-by: Satyapriya Bai --- src/Common/Tooltip/InfoTooltip.tsx | 9 +++++++-- .../CostEstimateText/CostEstimateText.tsx | 9 +++++++-- .../__snapshots__/ThroughputInput.test.tsx.snap | 8 ++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/Common/Tooltip/InfoTooltip.tsx b/src/Common/Tooltip/InfoTooltip.tsx index abd12385e..93a3bf6ab 100644 --- a/src/Common/Tooltip/InfoTooltip.tsx +++ b/src/Common/Tooltip/InfoTooltip.tsx @@ -4,13 +4,18 @@ import * as React from "react"; export interface TooltipProps { children: string; className?: string; + ariaLabelForTooltip?: string; } -export const InfoTooltip: React.FunctionComponent = ({ children, className }: TooltipProps) => { +export const InfoTooltip: React.FunctionComponent = ({ + children, + className, + ariaLabelForTooltip = children, +}: TooltipProps) => { return ( - + ); diff --git a/src/Explorer/Controls/ThroughputInput/CostEstimateText/CostEstimateText.tsx b/src/Explorer/Controls/ThroughputInput/CostEstimateText/CostEstimateText.tsx index fbc469f47..17492691f 100644 --- a/src/Explorer/Controls/ThroughputInput/CostEstimateText/CostEstimateText.tsx +++ b/src/Explorer/Controls/ThroughputInput/CostEstimateText/CostEstimateText.tsx @@ -44,13 +44,18 @@ export const CostEstimateText: FunctionComponent = ({ const currencySign: string = getCurrencySign(serverId); const multiplier = getMultimasterMultiplier(numberOfRegions, multimasterEnabled); const pricePerRu = isAutoscale ? getAutoscalePricePerRu(serverId, multiplier) : getPricePerRu(serverId, multiplier); + const estimatedMonthlyCost = "Estimated monthly cost"; - const iconWithEstimatedCostDisclaimer: JSX.Element = {estimatedCostDisclaimer}; + const iconWithEstimatedCostDisclaimer: JSX.Element = ( + + {estimatedCostDisclaimer} + + ); if (isAutoscale) { return ( - Estimated monthly cost ({currency}){iconWithEstimatedCostDisclaimer}:{" "} + {estimatedMonthlyCost} ({currency}){iconWithEstimatedCostDisclaimer}:{" "} {currencySign + calculateEstimateNumber(monthlyPrice / 10)} -{" "} {currencySign + calculateEstimateNumber(monthlyPrice)}{" "} diff --git a/src/Explorer/Controls/ThroughputInput/__snapshots__/ThroughputInput.test.tsx.snap b/src/Explorer/Controls/ThroughputInput/__snapshots__/ThroughputInput.test.tsx.snap index dd9d9d90b..898525caf 100644 --- a/src/Explorer/Controls/ThroughputInput/__snapshots__/ThroughputInput.test.tsx.snap +++ b/src/Explorer/Controls/ThroughputInput/__snapshots__/ThroughputInput.test.tsx.snap @@ -345,13 +345,13 @@ exports[`ThroughputInput Pane should render Default properly 1`] = ` role="none" >