Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2024-05-19 - Replace HTML disabled with aria-disabled="true" for Accessible Tooltips
**Learning:** Native HTML `disabled` attributes completely hide elements from screen readers and block all pointer/hover events, preventing tooltips from functioning for disabled elements.
**Action:** Replace `disabled` with `aria-disabled="true"`, enforce block click handlers via `e.preventDefault()`, and add a title tooltip directly to the element to maintain full tooltip accessibility and keyboard focus support for visually impaired and mouse users.

## 2026-08-07 - Score μ»΄ν¬λ„ŒνŠΈ λ²„νŠΌμ˜ 툴팁 및 μ ‘κ·Όμ„± κ°•ν™”
**Learning:** μ•„μ΄μ½˜λ§Œ μžˆλŠ” κΈ°λŠ₯μ„± λ²„νŠΌ(ScoreViewer, ScoreView)듀에 μ μ ˆν•œ `title` 속성이 μ—†μœΌλ©΄ 마우슀 μ‚¬μš©μž 및 슀크린 리더 μ‚¬μš©μžμ—κ²Œ κΈ°λŠ₯이 λͺ…ν™•νžˆ μ „λ‹¬λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λ˜ν•œ, HTML κΈ°λ³Έ `disabled` 속성은 이벀트λ₯Ό λͺ¨λ‘ 차단해 λΉ„ν™œμ„± μƒνƒœμ—μ„œμ˜ 툴팁 μ œκ³΅μ„ λ§‰μŠ΅λ‹ˆλ‹€. (단, Base UI 같은 μ„œλ“œνŒŒν‹° 라이브러리둜 감싸진 μ»€μŠ€ν…€ <Button>은 κΈ°μ‘΄ `disabled` prop을 μœ μ§€ν•΄μ•Ό ν•©λ‹ˆλ‹€.)
**Action:** κΈ°λ³Έ HTML `<button>` μš”μ†Œμ—λŠ” `aria-disabled="true"`와 `title` 속성을 μΆ”κ°€ν•˜κ³  λ₯Ό ν™œμš©ν•˜μ—¬ 접근성을 λ†’μ˜€μœΌλ©°, μ»€μŠ€ν…€ `<Button>` μš”μ†Œλ“€μ—λŠ” `title` μ†μ„±λ§Œ μΆ”κ°€ν•΄ νˆ΄νŒμ„ μ œκ³΅ν–ˆμŠ΅λ‹ˆλ‹€.

## 2026-08-07 - Score μ»΄ν¬λ„ŒνŠΈ λ²„νŠΌμ˜ 툴팁 및 μ ‘κ·Όμ„± κ°•ν™”
**Learning:** μ•„μ΄μ½˜λ§Œ μžˆλŠ” κΈ°λŠ₯μ„± λ²„νŠΌ(ScoreViewer, ScoreView)듀에 μ μ ˆν•œ `title` 속성이 μ—†μœΌλ©΄ 마우슀 μ‚¬μš©μž 및 슀크린 리더 μ‚¬μš©μžμ—κ²Œ κΈ°λŠ₯이 λͺ…ν™•νžˆ μ „λ‹¬λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λ˜ν•œ, HTML κΈ°λ³Έ `disabled` 속성은 이벀트λ₯Ό λͺ¨λ‘ 차단해 λΉ„ν™œμ„± μƒνƒœμ—μ„œμ˜ 툴팁 μ œκ³΅μ„ λ§‰μŠ΅λ‹ˆλ‹€. (단, Base UI 같은 μ„œλ“œνŒŒν‹° 라이브러리둜 감싸진 μ»€μŠ€ν…€ <Button>은 κΈ°μ‘΄ `disabled` prop을 μœ μ§€ν•΄μ•Ό ν•©λ‹ˆλ‹€.)
**Action:** κΈ°λ³Έ HTML `<button>` μš”μ†Œμ—λŠ” `aria-disabled="true"`와 `title` 속성을 μΆ”κ°€ν•˜κ³  `e.preventDefault()`λ₯Ό ν™œμš©ν•˜μ—¬ 접근성을 λ†’μ˜€μœΌλ©°, μ»€μŠ€ν…€ `<Button>` μš”μ†Œλ“€μ—λŠ” `title` μ†μ„±λ§Œ μΆ”κ°€ν•΄ νˆ΄νŒμ„ μ œκ³΅ν–ˆμŠ΅λ‹ˆλ‹€.
2 changes: 1 addition & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^1.24.0",
"pdfjs-dist": "6.1.200",
"pdfjs-dist": "^6.2.108",
"react": "^19.2.4",
"react-dom": "^19.2.7",
"sonner": "^2.0.7",
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/features/score/ScoreView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe("ScoreView", () => {

expect(screen.getByText("Scores attach to the active analysis project.")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Add score" })).toBeDisabled();
expect(screen.getByRole("button", { name: "Open score: opener.pdf" })).toBeDisabled();
expect(screen.getByRole("button", { name: "Open score: opener.pdf" })).toHaveAttribute("aria-disabled", "true");
expect(screen.getByRole("button", { name: "Remove: opener.pdf" })).toBeDisabled();

fireEvent.click(screen.getByRole("button", { name: "Open score: opener.pdf" }));
Expand Down
8 changes: 5 additions & 3 deletions apps/desktop/src/features/score/ScoreView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,12 @@ export function ScoreView({ song, projectId, onSongUpdate }: ScoreViewProps) {
>
<button
type="button"
onClick={projectId ? () => void openAttachment(projectId, attachment) : undefined}
disabled={!projectId}
onClick={!projectId ? (e) => e.preventDefault() : () => void openAttachment(projectId, attachment)}
aria-disabled={!projectId ? "true" : undefined}
aria-current={selected?.id === attachment.id ? "true" : undefined}
aria-label={`${t("scoreOpen")}: ${attachment.fileName}`}
className="flex min-h-10 min-w-0 flex-1 items-center gap-2 text-left text-sm font-semibold text-slate-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300 disabled:cursor-not-allowed disabled:opacity-60"
title={`${t("scoreOpen")}: ${attachment.fileName}`}
className="flex min-h-10 min-w-0 flex-1 items-center gap-2 text-left text-sm font-semibold text-slate-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300 aria-disabled:cursor-not-allowed aria-disabled:opacity-60"
>
<FileMusic className="size-4 shrink-0 text-cyan-300" aria-hidden="true" />
<span className="truncate">{attachment.fileName}</span>
Expand All @@ -198,6 +199,7 @@ export function ScoreView({ song, projectId, onSongUpdate }: ScoreViewProps) {
onClick={projectId ? () => void handleRemove(projectId, attachment) : undefined}
disabled={!projectId}
aria-label={`${t("scoreRemove")}: ${attachment.fileName}`}
title={`${t("scoreRemove")}: ${attachment.fileName}`}
className="size-10 border-rose-300/25 text-rose-200 hover:bg-rose-400/10"
>
<Trash2 className="size-4" aria-hidden="true" />
Expand Down
5 changes: 5 additions & 0 deletions apps/desktop/src/features/score/ScoreViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export function ScoreViewer({ data, fileName, onStatusChange }: ScoreViewerProps
size="icon-lg"
className="size-12"
aria-label={t("scoreViewerZoomOut")}
title={t("scoreViewerZoomOut")}
onClick={zoomOut}
>
<ZoomOut aria-hidden="true" />
Expand All @@ -267,6 +268,7 @@ export function ScoreViewer({ data, fileName, onStatusChange }: ScoreViewerProps
size="icon-lg"
className="size-12"
aria-label={t("scoreViewerZoomIn")}
title={t("scoreViewerZoomIn")}
onClick={zoomIn}
>
<ZoomIn aria-hidden="true" />
Expand All @@ -275,6 +277,7 @@ export function ScoreViewer({ data, fileName, onStatusChange }: ScoreViewerProps
variant={fitWidth ? "secondary" : "outline"}
className="h-12 px-4 text-base"
aria-label={t("scoreViewerFitWidth")}
title={t("scoreViewerFitWidth")}
aria-pressed={fitWidth}
onClick={fitToWidth}
>
Expand All @@ -292,6 +295,7 @@ export function ScoreViewer({ data, fileName, onStatusChange }: ScoreViewerProps
size="icon-lg"
className="size-14"
aria-label={t("scoreViewerPrevPage")}
title={t("scoreViewerPrevPage")}
disabled={pageNumber <= 1}
onClick={goToPreviousPage}
>
Expand All @@ -305,6 +309,7 @@ export function ScoreViewer({ data, fileName, onStatusChange }: ScoreViewerProps
size="icon-lg"
className="size-14"
aria-label={t("scoreViewerNextPage")}
title={t("scoreViewerNextPage")}
disabled={pageNumber >= pageCount}
onClick={goToNextPage}
>
Expand Down
Loading
Loading