Skip to content

Improve tool codeblock accessibility #249134

Closed

Description

cc JooYoung Seo (@jooyoungseo)

Currently, when focus is within the codeblock of the tool confirmation dialog, tab is trapped there until a user enters Tab Moves Focus mode.

screenshot with run command in terminal ls codeblock in the response

The way we handle this for other code blocks that appear in chat responses is to mark them readOnly, which sets tabIndex to 0 so they can be navigated out of.

The difference in this case is we want them to remain editable.

One approach to address this would be to add a codeblock toolbar with actions such as open in editor or insert into terminal - from those places, a user could edit the code before running it.

I just noticed there's a way to set tabFocusMode for an editor. I think we should probably do that in this case.

tabFocusMode?: boolean;

Activity

  1. added
    bug
    accessibility
    on May 16, 2025
  2. added a commit that references this issue on May 16, 2025
    1bc56e9
  3. added
    unreleased
    insiders-released
    and removed
    unreleased
    on May 16, 2025
  4. anthonykim1 commented on Jun 5, 2025

    @anthonykim1
    Contributor
    Screen.Recording.2025-06-05.at.4.04.17.PM.mov

    Doesnt seem stuck anymore, this is great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

accessibilitybuginsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions