Skip to content

๐ŸŽจ Palette: [UX improvement] Add accessible disabled states to submit buttons - #686

Closed
seonghobae wants to merge 1 commit into
mainfrom
palette-accessible-disabled-buttons-1031071165122331047
Closed

๐ŸŽจ Palette: [UX improvement] Add accessible disabled states to submit buttons#686
seonghobae wants to merge 1 commit into
mainfrom
palette-accessible-disabled-buttons-1031071165122331047

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

๐ŸŽจ Palette: [UX improvement] Add accessible disabled states to submit buttons

๐Ÿ’ก What:

  • Removed native disabled attributes from submit buttons in AddTableModal and GroupModal.
  • Added aria-disabled and title attributes for tooltips on disabled buttons.
  • Added explicit onClick handlers to prevent form submission 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 submissions.

๐Ÿ“ธ 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.


PR created automatically by Jules for task 1031071165122331047 started by @seonghobae

Summary by CodeRabbit

  • ์ ‘๊ทผ์„ฑ ๊ฐœ์„ 

    • ํ…Œ์ด๋ธ” ๋ฐ ๊ทธ๋ฃน ์ƒ์„ฑ ๋ชจ๋‹ฌ์˜ ๋ฒ„ํŠผ์— aria-disabled์™€ ์•ˆ๋‚ด ํˆดํŒ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ์ž…๋ ฅ๊ฐ’์ด ์—†์„ ๋•Œ ๋ฒ„ํŠผ์˜ ํด๋ฆญ ๋ฐ ์ œ์ถœ ๋™์ž‘์„ ์ฐจ๋‹จํ•˜๋„๋ก ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ๋น„ํ™œ์„ฑ ์ƒํƒœ๊ฐ€ ์‹œ๊ฐ์ ์œผ๋กœ ๋ช…ํ™•ํžˆ ํ‘œ์‹œ๋˜๋„๋ก ํˆฌ๋ช…๋„์™€ ์ปค์„œ ์Šคํƒ€์ผ์„ ์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ํ…Œ์ŠคํŠธ

    • ๋ชจ๋‹ฌ ๋ฒ„ํŠผ์˜ ๋น„ํ™œ์„ฑ ์ƒํƒœ ๊ฒ€์ฆ์„ ARIA ์†์„ฑ ๊ธฐ์ค€์œผ๋กœ ์—…๋ฐ์ดํŠธํ–ˆ์Šต๋‹ˆ๋‹ค.

โ€ฆ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!
@google-labs-jules

Copy link
Copy Markdown

๐Ÿ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

๐Ÿ“ Walkthrough

Walkthrough

๋‘ ๋ชจ๋‹ฌ์˜ ๋น„ํ™œ์„ฑ ๋ฒ„ํŠผ์ด disabled ๋Œ€์‹  aria-disabled์™€ ํด๋ฆญ ์ด๋ฒคํŠธ ์ฐจ๋‹จ์„ ์‚ฌ์šฉํ•˜๋„๋ก ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋น„ํ™œ์„ฑ ์ƒํƒœ ์•ˆ๋‚ด์™€ ์Šคํƒ€์ผ์ด ์ถ”๊ฐ€๋˜์—ˆ๊ณ , ๊ด€๋ จ ํ…Œ์ŠคํŠธ๋Š” ARIA ์†์„ฑ์„ ๊ฒ€์ฆํ•˜๋„๋ก ๊ฐฑ์‹ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Changes

๋ชจ๋‹ฌ ๋ฒ„ํŠผ ์ ‘๊ทผ์„ฑ

Layer / File(s) Summary
๋น„ํ™œ์„ฑ ๋ฒ„ํŠผ ์ƒํƒœ์™€ ๊ฒ€์ฆ
.jules/palette.md, frontend/src/components/modals/AddTableModal.tsx, frontend/src/components/modals/GroupModal.tsx, frontend/src/components/modals/ModalCoverage.test.tsx
์ €์žฅ ๋ฐ ๊ทธ๋ฃน ์ถ”๊ฐ€ ๋ฒ„ํŠผ์ด aria-disabled, ์•ˆ๋‚ด title, ๋น„ํ™œ์„ฑ ์Šคํƒ€์ผ์„ ์‚ฌ์šฉํ•˜๊ณ , ์ž…๋ ฅ๊ฐ’์ด ์—†์„ ๋•Œ preventDefault()๋กœ ๊ธฐ๋ณธ ๋™์ž‘์„ ์ฐจ๋‹จํ•ฉ๋‹ˆ๋‹ค. ํ…Œ์ŠคํŠธ๋Š” aria-disabled ๊ฐ’์„ ๊ฒ€์ฆํ•˜๋„๋ก ๋ณ€๊ฒฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • ContextualWisdomLab/pg-erd-cloud#675: aria-disabled์™€ preventDefault()๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋™์ผํ•œ ์ ‘๊ทผ์„ฑ ๋ณ€๊ฒฝ ๋ฐฉํ–ฅ๊ณผ ๊ด€๋ จ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
๐Ÿšฅ Pre-merge checks | โœ… 5
โœ… Passed checks (5 passed)
Check name Status Explanation
Description Check โœ… Passed Check skipped - CodeRabbitโ€™s high-level summary is enabled.
Title check โœ… Passed ์ œ๋ชฉ์ด ์ œ์ถœ ๋ฒ„ํŠผ์˜ ์ ‘๊ทผ ๊ฐ€๋Šฅํ•œ ๋น„ํ™œ์„ฑ ์ƒํƒœ ์ถ”๊ฐ€๋ผ๋Š” ํ•ต์‹ฌ ๋ณ€๊ฒฝ์„ ์ •ํ™•ํžˆ ์š”์•ฝํ•ฉ๋‹ˆ๋‹ค.
Docstring Coverage โœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check โœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check โœ… Passed Check skipped because no linked issues were found for this pull request.
โœจ Finishing Touches
๐Ÿ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-accessible-disabled-buttons-1031071165122331047

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿงน 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

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 4bf3968 and 17735eb.

๐Ÿ“’ Files selected for processing (4)
  • .jules/palette.md
  • frontend/src/components/modals/AddTableModal.tsx
  • frontend/src/components/modals/GroupModal.tsx
  • frontend/src/components/modals/ModalCoverage.test.tsx

@seonghobae

Copy link
Copy Markdown
Collaborator Author

Closed as superseded/duplicate Palette a11y PR; keyboard/form a11y baseline already on main (#568/#567/#534). Remaining a11y land via priority PR or follow-up if needed.

@seonghobae seonghobae closed this Jul 31, 2026
@google-labs-jules

Copy link
Copy Markdown

Closed as superseded/duplicate Palette a11y PR; keyboard/form a11y baseline already on main (#568/#567/#534). Remaining a11y land via priority PR or follow-up if needed.

Understood. Acknowledging that this PR has been closed as superseded/duplicate, and stopping further work on this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant