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

AIChat: policy dialog shouldn't focus on anchor link #35815

Closed
nullhook opened this issue Feb 5, 2024 · 7 comments · Fixed by brave/brave-core#22220
Closed

AIChat: policy dialog shouldn't focus on anchor link #35815

nullhook opened this issue Feb 5, 2024 · 7 comments · Fixed by brave/brave-core#22220
Assignees

Comments

@nullhook
Copy link
Collaborator

nullhook commented Feb 5, 2024

currently, when the policy dialog shows, it automatically focuses on the first intractable element. we should autofocus on the primary button instead.

By default, when a dialog is opened, the first focusable element within the dialog will receive focus unless a different element within the dialog has the autofocus attribute set

@stephendonner
Copy link
Collaborator

stephendonner commented Feb 6, 2024

Screen Shot 2024-02-05 at 6 10 57 PM

@mattmcalister mattmcalister added the closed/duplicate Issue has already been reported label Feb 7, 2024
@mattmcalister
Copy link
Collaborator

This copy is changing, and anything you do here will be overwritten by this #35355. I'm closing this as a dupe.

@mattmcalister mattmcalister closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
@yrliou
Copy link
Member

yrliou commented Feb 7, 2024

I'm re-opening this because the text change won't fix this, it still focused on the first anchor link.

Screenshot 2024-02-07 at 9 20 42 AM

@yrliou yrliou reopened this Feb 7, 2024
@nullhook
Copy link
Collaborator Author

nullhook commented Feb 7, 2024

The issue I'm describing here is an underlying problem with Nala's modal component, and even with the new copy change, it still persists. The new copy change places an anchor link first in the content flow, followed by the primary button. This issue describes exactly that; ideally, the focus should be on the button.

image

@yrliou yrliou removed the closed/duplicate Issue has already been reported label Feb 7, 2024
@mattmcalister
Copy link
Collaborator

Oh, ok. That makes sense.

@mattmcalister mattmcalister added the priority/P2 A bad problem. We might uplift this to the next planned release. label Feb 8, 2024
@brave-builds brave-builds added this to the 1.65.x - Nightly milestone Mar 5, 2024
@stephendonner
Copy link
Collaborator

Verified PASSED using

Brave | 1.65.79 Chromium: 123.0.6312.29 (Official Build) nightly (64-bit)
-- | --
Revision | 9c6d737e50d926561b759189043cf63065fe5cc6
OS | Windows 10 Version 22H2 (Build 19045.4170)

Steps:

  1. installed 1.65.79
  2. launched Brave
  3. clicked on Leo in the sidebar
  4. confirmed opt-in text with link

Confirmed the Brave wiki link doesn't have focus; the Submit button does

example example example example
image image image image

@stephendonner
Copy link
Collaborator

Verified PASSED using

Brave	1.65.88 Chromium: 123.0.6312.58 (Official Build) beta (x86_64) 
Revision	e260e641e7db9e88b9b51112f4f00febf5a2f5eb
OS	macOS Version 11.7.10 (Build 20G1427)
example example example
Screen Shot 2024-03-20 at 4 47 56 PM Screen Shot 2024-03-20 at 4 48 05 PM Screen Shot 2024-03-20 at 4 51 23 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants