Skip to content
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

[Bug]: Focus should return to Input Field After Response is Received #433

Open
2 tasks done
Daniel-Schulz-Private opened this issue Feb 11, 2025 · 0 comments
Open
2 tasks done

Comments

@Daniel-Schulz-Private
Copy link

Daniel-Schulz-Private commented Feb 11, 2025

Browser

Chrome, Safari, Firefox

Package version

0.14.1-canary.347

React version

^1.66.0

Description

TLDR; After submitting a question and getting an answer in the ai-chat, the input field should have focus, so a user can input a follow-up question right away.

It seems, after submitting a question in the ai-chat, the focus is not with the input field an all cases.

At first glance, it seems that the behaviour described above happens (almost) all the time. I believe whenever there is an immediate response to a particular question, the cursor stays in the input field and you can type a follow-up question without having to focus the input field again first.

On the other hand, whenever the question takes a request to the backend to be answered, the focus leaves the input field. Hence, after that you have to select the input field again using the TAB-key to input a follow-up question.

In short, all queries would start in the prompt field and return to the prompt field.

However, one must not forget, that responses must be announced by screen readers, and the user must have the possibility to navigate to particular elements of the response, for example if there are links with the response, a user might want to visit those.

Reproduction/example

non

Steps to reproduce

  1. leverage ai-chat component
  2. force an immediate response, the focus stays in the input field
  3. force a response, that involves a backend request, the focus goes away.

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@Daniel-Schulz-Private Daniel-Schulz-Private changed the title [Bug]: [Bug]: Focus should return to Input Field After Response is Received Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant