Repository navigation
fix(app): Fix plan mode btn keyboard a11y issues #10330
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,13 +39,13 @@ export function Tooltip(props: TooltipProps) { | |
| onMount(() => { | ||
| const childElements = c() | ||
| if (childElements instanceof HTMLElement) { | ||
| childElements.addEventListener("focus", () => setOpen(true)) | ||
| childElements.addEventListener("blur", () => setOpen(false)) | ||
| childElements.addEventListener("focusin", () => setOpen(true)) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. focusin reference https://developer.mozilla.org/en-US/docs/Web/API/Element/focusin_event the main delta is bubbling, which is what is fixing the issue The risk of changing these all to bubble is that if focus can jump between two descendants of "childElements" the tooltip may possibly flicker for ex node of: The pros of getting better tooltip render for focused children is worth the possible flicker when focus shifts IMO. |
||
| childElements.addEventListener("focusout", () => setOpen(false)) | ||
| } else if (Array.isArray(childElements)) { | ||
| for (const child of childElements) { | ||
| if (child instanceof HTMLElement) { | ||
| child.addEventListener("focus", () => setOpen(true)) | ||
| child.addEventListener("blur", () => setOpen(false)) | ||
| child.addEventListener("focusin", () => setOpen(true)) | ||
| child.addEventListener("focusout", () => setOpen(false)) | ||
| } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the variant is called "ghost" so I can see why it was
transparentbut having a transparent hover focus bg-color doesn't make sense unless the color transitions from color X -> transparent on focus (with a visible delta)Blast radius
Selects that use "ghost" variant (disclaimer: search obtained via GPT 5.2 Codex xhigh) :
opencode/packages/app/src/components/session/session-new-view.tsx
Line 72 in af5e405
opencode/packages/app/src/components/prompt-input.tsx
Line 1826 in af5e405