-
Notifications
You must be signed in to change notification settings - Fork 970
fix: resolve react-doctor diagnostics across desktop, marketing, and web #1579
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 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -102,12 +102,16 @@ export function BasePaneWindow({ | |||||||||||||||||||||||||||||||||
| onDragStart={() => setDragging(paneId, tabId)} | ||||||||||||||||||||||||||||||||||
| onDragEnd={() => clearDragging()} | ||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||
| {/* biome-ignore lint/a11y/useKeyWithClickEvents lint/a11y/noStaticElementInteractions: Focus handler for pane */} | ||||||||||||||||||||||||||||||||||
| <div | ||||||||||||||||||||||||||||||||||
| role="group" | ||||||||||||||||||||||||||||||||||
| ref={containerRef} | ||||||||||||||||||||||||||||||||||
| className={contentClassName} | ||||||||||||||||||||||||||||||||||
| style={isDragging ? { pointerEvents: "none" } : undefined} | ||||||||||||||||||||||||||||||||||
| onClick={handleFocus} | ||||||||||||||||||||||||||||||||||
| onKeyDown={(e) => { | ||||||||||||||||||||||||||||||||||
| if (e.target !== e.currentTarget) return; | ||||||||||||||||||||||||||||||||||
| if (e.key === "Enter" || e.key === " ") handleFocus(); | ||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+111
to
+114
Contributor
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.
The guard To make the keyboard shortcut reachable, add 🛠️ Proposed fix <div
role="group"
+ tabIndex={0}
ref={containerRef}
className={contentClassName}
style={isDragging ? { pointerEvents: "none" } : undefined}
onClick={handleFocus}
onKeyDown={(e) => {
if (e.target !== e.currentTarget) return;
if (e.key === "Enter" || e.key === " ") handleFocus();
}}
>Note: adding 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||
| {children} | ||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
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.
role="form"missing accessible name — landmark won't be announced by screen readersPer the WAI-ARIA spec, a
formlandmark is only exposed (and navigable) by assistive technologies when it carries an accessible name viaaria-labeloraria-labelledby. Without one, the role is silently dropped by most screen readers.The
<h1>on line 159 is the natural label — adding anidto it and referencing it witharia-labelledbyis the minimal fix:♿ Proposed fix
Alternatively, a native
<form>element provides the same semantics without requiring an explicitrole(its landmark is implicit when labelled) and allows usingonSubmitinstead of anonKeyDownintercept, which is cleaner:✨ Optional: prefer native <form>
📝 Committable suggestion
🤖 Prompt for AI Agents