Skip to content

Commit 286ae00

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
AI: add aria-label to context chat button
We need to try to make the button more descriptive for screen-readers. Fixed: 409337524 Change-Id: If815e77fd86a460f9d90faf9447ec90311441745 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6448429 Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org> Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
1 parent 91617af commit 286ae00

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

front_end/panels/ai_assistance/components/ChatView.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ const UIStrings = {
7676
/**
7777
*@description Label added to the text input to describe the context for screen readers. Not shown visibly on screen.
7878
*/
79-
inputTextAriraDescription: 'You can also use one of the suggested prompts above to start your conversation'
79+
inputTextAriraDescription: 'You can also use one of the suggested prompts above to start your conversation',
80+
/**
81+
*@description Label added to the button that reveals the selected context item in DevTools
82+
*/
83+
revealContextDescription: 'Reveal the selected context item in DevTools',
8084
} as const;
8185

8286
/*
@@ -953,6 +957,7 @@ function renderSelection({
953957
tabindex=${hasPickerBehavior ? '-1' : '0'}
954958
@click=${onContextClick}
955959
@keydown=${handleKeyDown}
960+
aria-label=${i18nString(UIStrings.revealContextDescription)}
956961
>
957962
${icon}${selectedContext?.getTitle() ?? html`<span>${
958963
lockedString(UIStringsNotTranslate.noElementSelected)

0 commit comments

Comments
 (0)