Skip to content
Open
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
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@
## 2024-07-01 - Testing components with focusable disabled button wrappers
**Learning:** When native disabled buttons are wrapped in a focusable `span` to provide accessible tooltips, tests that previously found and clicked the `button` (by temporarily removing the `disabled` attribute) may fail or become overly complex. It is cleaner and more accurate to query the wrapper element (e.g. via its `title`) and fire events on it, reflecting the actual accessible DOM structure.
**Action:** When testing UI components that wrap disabled buttons in a focusable span for accessibility (e.g., using a tooltip/title), use `screen.getByTitle(...)` to query the wrapper element for interactions like `fireEvent.click` rather than `screen.getByRole('button')`.
## 2026-07-06 - 슀크린 리더 ν…μŠ€νŠΈ μ ‘κ·Όμ„± 및 ARIA 속성 주의점
**Learning:** λΉ„ν™œμ„±ν™”λœ λ²„νŠΌμ„ `span`으둜 감싸 νˆ΄νŒμ„ μ œκ³΅ν•  λ•Œ, `role="button"`κ³Ό `aria-disabled="true"` 속성이 적용된 μƒνƒœμ—μ„œ μ‹œκ°μ μœΌλ‘œ μˆ¨κ²¨μ§„ 슀크린 리더 μ „μš© ν…μŠ€νŠΈ(`sr-only`)λ₯Ό μžμ‹ μš”μ†Œλ‘œ μΆ”κ°€ν•˜λ©΄ ν™”λ©΄ λ¦¬λ”κΈ°μ—μ„œ 툴팁 λ‚΄μš©μ΄ μ€‘λ³΅ν•΄μ„œ μ½νžˆκ±°λ‚˜ ν˜Όλž€μ„ 쀄 수 μžˆμŠ΅λ‹ˆλ‹€. λ°˜λŒ€λ‘œ, 포컀슀 κ°€λŠ₯ν•˜κ²Œ λ§Œλ“  μ—˜λ¦¬λ¨ΌνŠΈμ— μ—­ν• (role)이 μ—†λŠ” μƒνƒœλ‘œ `tabIndex={0}`만 있으면 접근성에 μ–΄κΈ‹λ‚©λ‹ˆλ‹€. κΈ°μ‘΄ κ΅¬ν˜„μ˜ μ˜λ„λ₯Ό μ •ν™•νžˆ νŒŒμ•…ν•˜μ—¬ ARIA 속성 μœ μ§€ μ—¬λΆ€λ₯Ό μ‹ μ€‘ν•˜κ²Œ κ²°μ •ν•΄μ•Ό ν•©λ‹ˆλ‹€.
**Action:** μ ‘κ·Όμ„± κ°œμ„  μž‘μ—… μ‹œ κΈ°μ‘΄ κ΅¬ν˜„μ˜ `role`κ³Ό `aria-disabled` 속성을 μž„μ˜λ‘œ μ‚­μ œν•˜μ§€ 말고, 슀크린 λ¦¬λ”μ—μ„œ μ½μ–΄μ£ΌλŠ” κΈ°μ‘΄ ν…μŠ€νŠΈ(예: `title` μ†μ„±μ΄λ‚˜ `aria-label`)와 μΆ©λŒν•˜κ±°λ‚˜ 쀑볡을 μ΄ˆλž˜ν•˜λŠ” `sr-only` ν…μŠ€νŠΈ μΆ”κ°€λ₯Ό ν”Όν•΄μ•Ό ν•©λ‹ˆλ‹€.
1 change: 1 addition & 0 deletions apps/desktop/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ export function App() {
</Button>
) : (
<span tabIndex={0} role="button" aria-disabled="true" title="Analyze a song to enable saving" className="inline-block cursor-not-allowed rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300">
<span className="sr-only">Analyze a song to enable saving</span>
<Button
disabled
variant="outline"
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/src/features/workspace/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,15 @@ export function Workspace({ song, sourceBootstrap = null, onSongUpdate }: Worksp
<p className="mt-1 text-sm font-semibold text-slate-100">{activeRoleDetails?.name ?? activeRole}</p>
<div className="mt-3 flex flex-wrap gap-2">
<span tabIndex={0} role="button" aria-disabled="true" title="Coming soon" className="inline-block cursor-not-allowed rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300">
<span className="sr-only">Coming soon</span>
<Button type="button" disabled variant="outline" className="min-h-11 border-white/10 bg-white/5 text-slate-400">Play stem</Button>
</span>
<span tabIndex={0} role="button" aria-disabled="true" title="Coming soon" className="inline-block cursor-not-allowed rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300">
<span className="sr-only">Coming soon</span>
<Button type="button" disabled variant="outline" className="min-h-11 border-white/10 bg-white/5 text-slate-400">Loop section</Button>
</span>
<span tabIndex={0} role="button" aria-disabled="true" title="Coming soon" className="inline-block cursor-not-allowed rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300">
<span className="sr-only">Coming soon</span>
<Button type="button" disabled variant="outline" className="min-h-11 border-white/10 bg-white/5 text-slate-400">Solo / mute others</Button>
</span>
{canTranscribeBass ? (
Expand All @@ -331,6 +334,7 @@ export function Workspace({ song, sourceBootstrap = null, onSongUpdate }: Worksp
</Button>
) : (
<span tabIndex={0} role="button" aria-disabled="true" title={`${activeRoleDetails?.name ?? "This role"} transcription is coming soon. Bass is ready first.`} className="inline-block cursor-not-allowed rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300">
<span className="sr-only">{`${activeRoleDetails?.name ?? "This role"} transcription is coming soon. Bass is ready first.`}</span>
<Button
type="button"
disabled
Expand Down