MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-1313

8.16 Create-work-item modal renders "Explanation" twice (disclosure header + editor label)

Done
Description

Type: bug · Parent: Epic 8 (Launch readiness) · Discovered in: manual dogfooding (out-of-band)

Symptom

In the Create work item modal, the "Explanation" label shows twice when the section is expanded — once as the collapsible section header, then again immediately below as the editor's own label.

Root cause (verified against shipped code)

app/(authed)/_components/CreateIssueModal.tsx renders the same i18n string createIssue.explanation at two sites:

  • Line ~334 — the disclosure TOGGLE button (the collapsible "Explanation" section header): <button ... aria-expanded={explanationOpen}> <ChevronDown/> {t('createIssue.explanation')} </button>
  • Line ~357 — passed as the label prop of the editor: <MarkdownEditor label={t('createIssue.explanation')} ... /> which components/ui/MarkdownEditor.tsx (line ~327) renders as a visible <span> whenever labelHidden is false (the default).

So when expanded, the header label and the editor's visible label stack — a pure visual duplicate.

Fix direction

Hide the editor's VISIBLE label (the disclosure header already supplies the visible "Explanation"): pass labelHidden to the MarkdownEditor at CreateIssueModal line ~357. This is a11y-safe — MarkdownEditor sets 'aria-label': label on the editable region (MarkdownEditor.tsx line ~234) independent of labelHidden, so the accessible name is preserved while only the redundant visible <span> is dropped. (Add a failing component-test assertion: only ONE "Explanation" text node in the expanded modal.)

Resolution

Open — filled by the closing-out subtask.