Skip to content

Make chat elicitation request part accessible #257491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 23, 2025
Prev Previous commit
Next Next commit
make tab focusable and add aria label
  • Loading branch information
meganrogge committed Jul 23, 2025
commit 984e3449f14325b2c0663156a4d7e4cfb81cb95b
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export class ChatElicitationContentPart extends Disposable implements IChatConte

this._register(confirmationWidget.onDidChangeHeight(() => this._onDidChangeHeight.fire()));

const messageToRender = this.getMessageToRender(elicitation);

this._register(confirmationWidget.onDidClick(async e => {
if (e.data) {
await elicitation.accept();
Expand All @@ -44,14 +46,16 @@ export class ChatElicitationContentPart extends Disposable implements IChatConte
}

confirmationWidget.setShowButtons(false);
confirmationWidget.updateMessage(this.getMessageToRender(elicitation));
confirmationWidget.updateMessage(messageToRender);

this._onDidChangeHeight.fire();
}));


this.chatAccessibilityService.acceptElicitation(typeof elicitation.message === 'string' ? elicitation.message : elicitation.message.value);
this.domNode = confirmationWidget.domNode;
this.domNode.tabIndex = 0;
this.domNode.ariaLabel = typeof messageToRender === 'string' ? messageToRender : messageToRender.value || '';
}

private getMessageToRender(elicitation: IChatElicitationRequest): IMarkdownString | string {
Expand Down