fix(a11y): complete KRDS tab keyboard interaction - #144
Open
seonghobae wants to merge 6 commits into
Open
Conversation
📝 WalkthroughWalkthroughKRDS 탭 예제에 roving ChangesKRDS 탭 접근성
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Keyboard
participant KRDS_Tab
participant activateTab
participant TabPanel
Keyboard->>KRDS_Tab: Arrow/Home/End 입력
KRDS_Tab->>activateTab: 다음 탭 선택
activateTab->>KRDS_Tab: aria-selected와 tabindex 갱신
activateTab->>TabPanel: hidden 상태 갱신
activateTab->>KRDS_Tab: 선택 탭에 포커스 이동
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/test_component_gallery_security.py (1)
148-161: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift브라우저 수준 상호작용 테스트를 추가하십시오.
현재 테스트는 문자열 존재만 확인합니다. 키 매핑, 순환 인덱스,
aria-selected,tabindex,hidden, 포커스 전환이 잘못되어도 필요한 문자열이 남아 있으면 테스트가 통과합니다. 실제 DOM에서ArrowLeft,ArrowRight,Home,End의 순환 이동과 상태 전환을 검증하십시오.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/test_component_gallery_security.py` around lines 148 - 161, Replace the string-presence assertions in test_tab_script_supports_complete_horizontal_keyboard_navigation with a browser-level DOM interaction test that executes the gallery tab script. Dispatch ArrowLeft, ArrowRight, Home, and End keyboard events and assert their index/wrapping behavior, selected tab and tabindex updates, panel hidden states, focus movement, and default-prevention behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/test_component_gallery_security.py`:
- Around line 148-161: Replace the string-presence assertions in
test_tab_script_supports_complete_horizontal_keyboard_navigation with a
browser-level DOM interaction test that executes the gallery tab script.
Dispatch ArrowLeft, ArrowRight, Home, and End keyboard events and assert their
index/wrapping behavior, selected tab and tabindex updates, panel hidden states,
focus movement, and default-prevention behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a978e106-1537-4afb-a56f-cae5842c8eb9
📒 Files selected for processing (5)
CHANGELOG.mdcomponents/index.htmlcomponents/krds-gallery.jsdocs/doctoring/tab-keyboard-interaction.mdtests/test_component_gallery_security.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tabindexArrowLeft,ArrowRight,Home, andEndwith wraparound and automatic activationaria-selected, tab stops, and panel visibilitydocs/doctoring/tab-keyboard-interaction.mdWhy
The previous gallery required keyboard users to tab through every tab and did not implement the WAI-ARIA horizontal tabs keyboard model. This current-base replacement also covers Home/End behavior and panel focusability that the stale predecessor omitted.
Verification required at the exact current head
python3 -m pytest tests/References
Supersedes stale, conflicting PR #86 with the same valid product intent on the current
mainbase.Summary by CodeRabbit
접근성 개선
문서