From fd1b440dd162a79d23109cf6c465a1e75a8bd08c Mon Sep 17 00:00:00 2001 From: Satyapriya Bai Date: Thu, 27 Feb 2025 13:10:50 +0530 Subject: [PATCH] [accessibility-3554312-3560235]:[Screen reader - Cosmos DB Query Copilot - Query Faster with Copilot>Enable Query Advisor]: Screen reader does not announce the associated text information when focus lands on the 'Like/Dislike' button. --- src/Common/Constants.ts | 4 ++++ .../QueryCopilot/QueryCopilotPromptbar.tsx | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts index 840849904..94ca16c27 100644 --- a/src/Common/Constants.ts +++ b/src/Common/Constants.ts @@ -530,6 +530,10 @@ export class ariaLabelForLearnMoreLink { public static readonly AzureSynapseLink = "Learn more about Azure Synapse Link."; } +export class FeedbackLabels { + public static readonly provideFeedback: string = "Provide feedback"; +} + export const QueryCopilotSampleDatabaseId = "CopilotSampleDB"; export const QueryCopilotSampleContainerId = "SampleContainer"; diff --git a/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx b/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx index 1582a4335..830eb5196 100644 --- a/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx +++ b/src/Explorer/QueryCopilot/QueryCopilotPromptbar.tsx @@ -18,7 +18,7 @@ import { Text, TextField, } from "@fluentui/react"; -import { HttpStatusCodes, NormalizedEventKey } from "Common/Constants"; +import { FeedbackLabels, HttpStatusCodes, NormalizedEventKey } from "Common/Constants"; import { handleError } from "Common/ErrorHandlingUtils"; import QueryError, { QueryErrorSeverity } from "Common/QueryError"; import { createUri } from "Common/UrlUtility"; @@ -579,7 +579,7 @@ export const QueryCopilotPromptbar: React.FC = ({ {userContext.feedbackPolicies?.policyAllowFeedback && ( - Provide feedback + {FeedbackLabels.provideFeedback} {showCallout && !hideFeedbackModalForLikedQueries && ( = ({ { setShowCallout(!likeQuery); @@ -648,8 +649,9 @@ export const QueryCopilotPromptbar: React.FC = ({ /> { let toggleStatusValue = "Unpressed";