Skip to content
Closed
4 changes: 2 additions & 2 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
**Action:** Always include a `skip-link` right after the body tag and set `id="main-content"` on the primary content container.

## 2024-07-11 - Skip-to-Content Link Target Focus
**Learning:** Adding a `skip-link` pointing to `#main-content` is not enough for keyboard accessibility; the target `<main>` element must be programmatically focusable (`tabindex="-1"`) and its default focus outline should be removed (`outline: none;`) to ensure the user's focus correctly shifts into the main content area without displaying an unnecessary visual artifact.
**Action:** Always add `tabindex="-1"` and `outline: none;` to the primary content container that serves as the skip link target.
**Learning:** `#main-content`λ₯Ό κ°€λ¦¬ν‚€λŠ” `skip-link`λ₯Ό μΆ”κ°€ν•˜λŠ” κ²ƒλ§ŒμœΌλ‘œλŠ” ν‚€λ³΄λ“œ 접근성에 μΆ©λΆ„ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€; 마우슀 클릭 μ‹œ λΆˆν•„μš”ν•œ μ‹œκ°μ  μ•„ν‹°νŒ©νŠΈ 없이 μ‚¬μš©μžμ˜ 초점이 μ˜¬λ°”λ₯΄κ²Œ 메인 μ½˜ν…μΈ  μ˜μ—­μœΌλ‘œ 이동할 수 μžˆλ„λ‘ λŒ€μƒ `<main>` μš”μ†ŒλŠ” ν”„λ‘œκ·Έλž˜λ° λ°©μ‹μœΌλ‘œ μ΄ˆμ μ„ 맞좜 수 μžˆμ–΄μ•Ό ν•˜λ©°(`tabindex="-1"`), κΈ°λ³Έ 초점 μœ€κ³½μ„ μ„ 제거(`outline: none;`)ν•΄μ•Ό ν•©λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ ν‚€λ³΄λ“œ μ‚¬μš©μžκ°€ skip linkκ°€ μž‘λ™ν–ˆμŒμ„ μ‹œκ°μ μœΌλ‘œ 인지할 수 μžˆλ„λ‘ `:focus-visible` μƒνƒœκ°€ ν•„μš”ν•©λ‹ˆλ‹€.
**Action:** skip link λŒ€μƒ 역할을 ν•˜λŠ” κΈ°λ³Έ μ½˜ν…μΈ  μ»¨ν…Œμ΄λ„ˆμ— `:focus` μƒνƒœλ₯Ό μœ„ν•œ `tabindex="-1"` 및 `outline: none;`을 항상 μΆ”κ°€ν•˜κ³ , ν‚€λ³΄λ“œ μ‚¬μš©μžκ°€ 초점이 μ΄λ™ν•œ μœ„μΉ˜λ₯Ό λ³Ό 수 μžˆλ„λ‘ `:focus-visible` μœ€κ³½μ„ μ„ ν•¨κ»˜ μ μš©ν•˜μ„Έμš”.

## 2024-07-12 - HTML 리포트의 ν™”λ©΄ μ „ν™˜ 효과 μ΅œμ†Œν™” (Reduced Motion)
**Learning:** λ…λ¦½ν˜• HTML λ¦¬ν¬νŠΈμ—λŠ” μ‹œκ°μ  λΆ€λ“œλŸ¬μ›€μ„ μœ„ν•΄ CSS μ „ν™˜ 효과(예: skip-link μŠ¬λΌμ΄λ”©, ν…Œμ΄λΈ” ν–‰ ν˜Έλ²„ 효과)κ°€ ν¬ν•¨λ˜μ–΄ μžˆμœΌλ‚˜, μ΄λŠ” μ „μ •κΈ°κ΄€ μž₯μ• κ°€ μžˆλŠ” μ‚¬μš©μžμ—κ²Œ λΆˆνŽΈν•¨μ„ 쀄 수 μžˆμŠ΅λ‹ˆλ‹€. 접근성을 μ™„μ „νžˆ ν™•λ³΄ν•˜λ €λ©΄ μ‹œμŠ€ν…œ μ„€μ •μ—μ„œ μ• λ‹ˆλ©”μ΄μ…˜ μ΅œμ†Œν™”(prefers-reduced-motion)λ₯Ό μ„ νƒν•œ μ‚¬μš©μžλ₯Ό μœ„ν•΄ 이λ₯Ό λΉ„ν™œμ„±ν™”ν•˜λŠ” λ―Έλ””μ–΄ 쿼리가 ν•„μˆ˜μ μ΄λΌλŠ” 점을 λ°°μ› μŠ΅λ‹ˆλ‹€.
Expand Down
6 changes: 6 additions & 0 deletions python/fast_mlsirm/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,12 @@ def _css() -> str:
outline: none;
}

main:focus-visible {
outline: 3px solid var(--teal);
outline-offset: 2px;
border-radius: 8px;
}

.hero {
min-height: 172px;
display: flex;
Expand Down
Loading