Skip to content

Commit 8ea8aa2

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
AI: add an aria-description to the chat input
We had feedback from the a11y tester that jumping the user into the textarea could be confusing rather than focusing on the first element in the panel and letting the user tab through. To avoid that confusion, we agreed that adding a description to the textarea to tell the user about the suggested prompts. Fixed: 408289708 Change-Id: Ie1bc5b22c4f694628ed5ee339b32ca6ab819efa1 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6433968 Auto-Submit: Jack Franklin <[email protected]> Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Alex Rudenko <[email protected]>
1 parent 0c55789 commit 8ea8aa2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

front_end/panels/ai_assistance/components/ChatView.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ const UIStrings = {
7272
*@description Text informing the user that AI assistance is not available in Incognito mode or Guest mode.
7373
*/
7474
notAvailableInIncognitoMode: 'AI assistance is not available in Incognito mode or Guest mode',
75+
76+
/**
77+
*@description Label added to the text input to describe the context for screen readers. Not shown visibly on screen.
78+
*/
79+
inputTextAriraDescription: 'You can also use one of the suggested prompts above to start your conversation'
7580
} as const;
7681

7782
/*
@@ -1310,6 +1315,7 @@ function renderChatInput({
13101315
@input=${(event: KeyboardEvent) => onTextInputChange((event.target as HTMLInputElement).value)}
13111316
placeholder=${inputPlaceholder}
13121317
jslog=${VisualLogging.textField('query').track({ keydown: 'Enter' })}
1318+
aria-description=${i18nString(UIStrings.inputTextAriraDescription)}
13131319
></textarea>
13141320
<div class="chat-input-buttons">
13151321
${renderTakeScreenshotButton({

0 commit comments

Comments
 (0)