Closed Bug 2027108 Opened 6 months ago Closed 4 months ago

[a11y] Links inside the smart window chat are not clickable via keyboard and don't change style on hover

Categories

(Core :: Machine Learning: Frontend, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2037565
Accessibility Severity s2

People

(Reporter: giulia, Unassigned)

References

Details

(Keywords: access, Whiteboard: [genai])

Attachments

(3 files, 3 obsolete files)

Attached video no-keyboard-access.mov —

As of the latest nightly (151):

  1. I can't click on links inside of the chat (for both full-page and sidebar) if I use my keyboard only.
  2. The links stay with the same color if I hover them - they keep the font color from the default state.

Seems like the issue is not happening all the time, as pointed out in this slack thread.

Noticed now that if I click inside the chat content (in an empty space, not in a link), the links will be focused by the keyboard.

Accessibility Severity: --- → s2

while there seem to be a workaround for being able to activate the in-chat links at the end of the day, but it does rely on using a mouse (which would not be possible for keyboard-only users), and it is a not expected and hard to guess behavior, thus marking the issue as access-S2.

Lack of hover styling alone would be an access-S3 bug.

No longer blocks: 2024316
See Also: → 2024316

The severity field is not set for this bug.
:Mardak, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(edilee)
Attachment #9582919 - Attachment is obsolete: true

Oops apologies for the noise, just doing some debugging :)

Attached file 2027108.html —

I think I minimized this to the following test case.

  • Download 2027108.html and 2027108-inner.html
  • Start a server via python -m http.server
  • Open localhost:8000/2027108.html
  • Tabbing into the iframe often focuses the last element that was focused in it:
  • Click "last", tab forward till you reach the iframe again, "first" won't be focused.
  • Click "first", tab backwards till you reach the iframe again, "last" won't be focused.

This seems to be a bit flaky though.

Claude says

nsFocusManager::GetNextTabbableContent has two code paths for finding the next tabbable element. When the currently focused element is inside a shadow DOM scope, it takes the scope-traversal path (GetNextTabbableContentInAncestorScopes). This path correctly identifies the next tabbable element — in the AI window case, aichat-browser — but unlike the frame-iterator path, it doesn't check whether that element is a remote (OOP) browser. Instead of calling NavigateByKey(forward=true) (which would tell the child process to move focus to its first element), it returns the browser frame to the caller, which ends up calling SetFocusInner on it. That restores the child's last-focused element (the Retry button) rather than moving to the first one.

Tabbing backward from Retry works because that navigation starts entirely inside the child process, where the focus manager walks normally through the message content.

The fix is to add the same remote browser check that already exists in the frame-iterator path (lines ~4634–4648) into the scope-traversal path as well.

See Also: → 2037530
Depends on: 2037565

Comment on attachment 9583694 [details]
WIP: Bug 2027108 - Call NavigateByKey for OOP frames found via shadow DOM scope traversal. r=NeilDeakin,hsivonen

Revision D298825 was moved to bug 2037565. Setting attachment 9583694 [details] to obsolete.

Attachment #9583694 - Attachment is obsolete: true
Attachment #9583433 - Attachment is obsolete: true

(In reply to Vincent Hilla [:vhilla] from comment #6)

Created attachment 9583193 [details]
2027108.html

I verified this testcase is fixed in Nightly by bug 2037565. The issue seen in the video in comment 0 also doesn't reproduce anymore for me.

I heard the video doesn't show all focus issues, maybe someone else can verify whether this bug is fixed?

Severity: -- → S2
Status: NEW → RESOLVED
Closed: 4 months ago
Duplicate of bug: 2037565
Flags: needinfo?(edilee)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: