Skip to content

Commit d923bab

Browse files
akjclaude
andcommitted
fix(web): project picker in the composer heading is reachable in browse mode
The heading's aria-label made NVDA render the label in place of the heading's children, so the inline project picker disappeared from browse mode. Without the label, the heading's computed name is the same sentence and the picker stays in the virtual buffer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 50647de commit d923bab

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

‎apps/web/src/components/chat/DraftHeroHeadline.tsx‎

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -363,18 +363,6 @@ export function DraftHeroHeadline({
363363
</button>
364364
);
365365

366-
// The composer hero is a sentence, so the heading's accessible name must be
367-
// a complete sentence too. The project picker is a control rendered inline
368-
// in the h1; without an explicit label its widget state bleeds into the
369-
// announced phrase.
370-
const headingLabel = isScratchDraft
371-
? "What should we work on?"
372-
: hasResolvedProject
373-
? `What should we build in ${activeProjectDisplayName}?`
374-
: canChooseProject
375-
? `${activeProjectDisplayName ?? "Choose a project"} to start`
376-
: "Add a project to start";
377-
378366
// One click out of the project, phrased as the alternative to the question
379367
// above it. Focus moves to the project picker once this line has gone.
380368
const noProjectShortcut = shortcutLabelForCommand(keybindings, "chat.newWithoutProject");
@@ -404,10 +392,10 @@ export function DraftHeroHeadline({
404392

405393
return (
406394
<div className="mx-auto flex w-full max-w-5xl flex-col items-center">
407-
<h1
408-
aria-label={headingLabel}
409-
className="w-full text-center font-normal text-2xl text-foreground tracking-tight sm:text-3xl"
410-
>
395+
{/* No aria-label on the h1: NVDA's browse mode renders a heading's
396+
explicit label in place of its children, which would hide the inline
397+
project picker. */}
398+
<h1 className="w-full text-center font-normal text-2xl text-foreground tracking-tight sm:text-3xl">
411399
{isScratchDraft ? (
412400
<>What should we work on?</>
413401
) : hasResolvedProject ? (

0 commit comments

Comments
 (0)