Repository navigation
🎨 Palette: [UX improvement] Add accessible disabled states to submit buttons - #686
seonghobae wants to merge 1 commit into
Conversation
…y updates you requested. Here is a breakdown of the changes I made: 🎨 Palette: [UX improvement] Add accessible disabled states to form buttons 💡 What: - Removed native `disabled` attributes from the primary form buttons in `AddTableModal` and `GroupModal`. - Added `aria-disabled` and `title` attributes for tooltips on disabled buttons. - Added explicit `onClick` handlers to prevent form processing when the button is visually disabled. - Updated visual styling to replicate the disabled state (`opacity: 0.5, cursor: "not-allowed"`). - Updated corresponding test assertions in `ModalCoverage.test.tsx` to check `aria-disabled`. 🎯 Why: Native `disabled` buttons are removed from the browser's tab order, making them invisible to screen readers and preventing users from discovering why the button is disabled via tooltips. Using `aria-disabled` solves this, but requires manual intervention to block the actions. 📸 Before/After: Before: `disabled` attribute used. Tooltips wouldn't show. After: `aria-disabled` used with custom styles and `onClick` handlers. Tooltips appear on hover/focus. ♿ Accessibility: Screen readers now announce the buttons as disabled, and keyboard-only users can tab to the buttons to read the tooltips explaining the required actions. Let me know if you need any further adjustments!
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
📝 WalkthroughWalkthrough두 모달의 비활성 버튼이 Changes모달 버튼 접근성
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 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)
frontend/src/components/modals/ModalCoverage.test.tsx (1)
86-86: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win비활성 상태의 실제 제출 차단도 테스트하세요.
현재 테스트는
aria-disabled값만 확인하므로, 클릭 또는 폼 제출 차단 로직이 제거되어도 통과합니다. 빈/공백 이름에서 클릭과 Enter 제출 시 callback이 호출되지 않는지, 유효한 이름에서는 callback이 호출되는지도 검증해 주세요.Also applies to: 245-245
🤖 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 `@frontend/src/components/modals/ModalCoverage.test.tsx` at line 86, Update the ModalCoverage tests around the save-button assertions to verify actual submission behavior, not only the aria-disabled attribute. Add cases confirming blank and whitespace-only names do not invoke the callback when clicking the button or submitting with Enter, and that a valid name does invoke the callback.
🤖 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 `@frontend/src/components/modals/ModalCoverage.test.tsx`:
- Line 86: Update the ModalCoverage tests around the save-button assertions to
verify actual submission behavior, not only the aria-disabled attribute. Add
cases confirming blank and whitespace-only names do not invoke the callback when
clicking the button or submitting with Enter, and that a valid name does invoke
the callback.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 46a33222-f44f-4d3f-b64b-0fed21d0d180
📒 Files selected for processing (4)
.jules/palette.mdfrontend/src/components/modals/AddTableModal.tsxfrontend/src/components/modals/GroupModal.tsxfrontend/src/components/modals/ModalCoverage.test.tsx
🎨 Palette: [UX improvement] Add accessible disabled states to submit buttons
💡 What:
disabledattributes from submit buttons inAddTableModalandGroupModal.aria-disabledandtitleattributes for tooltips on disabled buttons.onClickhandlers to prevent form submission when the button is visually disabled.opacity: 0.5, cursor: "not-allowed").ModalCoverage.test.tsxto checkaria-disabled.🎯 Why:
Native
disabledbuttons are removed from the browser's tab order, making them invisible to screen readers and preventing users from discovering why the button is disabled via tooltips. Usingaria-disabledsolves this, but requires manual intervention to block submissions.📸 Before/After:
Before:
disabledattribute used. Tooltips wouldn't show.After:
aria-disabledused with custom styles andonClickhandlers. Tooltips appear on hover/focus.♿ Accessibility:
Screen readers now announce the buttons as disabled, and keyboard-only users can tab to the buttons to read the tooltips explaining the required actions.
PR created automatically by Jules for task 1031071165122331047 started by @seonghobae
Summary by CodeRabbit
접근성 개선
aria-disabled와 안내 툴팁을 추가했습니다.테스트