Skip to content

๐ŸŽจ Palette: [UX improvement] Improve disabled button accessibility - #640

Closed
seonghobae wants to merge 1 commit into
mainfrom
palette-export-modal-a11y-15750217097380166131
Closed

๐ŸŽจ Palette: [UX improvement] Improve disabled button accessibility#640
seonghobae wants to merge 1 commit into
mainfrom
palette-export-modal-a11y-15750217097380166131

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

๐Ÿ’ก What:
'๊ณต์œ  ๋ฐ ๋‚ด๋ณด๋‚ด๊ธฐ' ๋ชจ๋‹ฌ์˜ '์ ‘๊ทผ ๊ด€๋ฆฌ' ๋ฒ„ํŠผ์—์„œ ๋„ค์ดํ‹ฐ๋ธŒ disabled ์†์„ฑ์„ ์ œ๊ฑฐํ•˜๊ณ  aria-disabled={true} ๋ฐ onClick={(e) => e.preventDefault()} ํ•ธ๋“ค๋Ÿฌ๋กœ ๋Œ€์ฒดํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด์™€ ํ•จ๊ป˜ ๊ด€๋ จ Vitest ํ…Œ์ŠคํŠธ๋ฅผ ์—…๋ฐ์ดํŠธํ–ˆ์Šต๋‹ˆ๋‹ค.

๐ŸŽฏ Why:
๋„ค์ดํ‹ฐ๋ธŒ disabled ์†์„ฑ์ด ์žˆ๋Š” ๋ฒ„ํŠผ์€ ํ‚ค๋ณด๋“œ ํƒญ(Tab) ํฌ์ปค์Šค ์ˆœ์„œ์—์„œ ์ œ์™ธ๋ฉ๋‹ˆ๋‹ค. ์ด ๋•Œ๋ฌธ์— ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ๋ฐ ํ‚ค๋ณด๋“œ ์ „์šฉ ์‚ฌ์šฉ์ž๋Š” ํ•ด๋‹น ๋ฒ„ํŠผ์— ์ ‘๊ทผํ•  ์ˆ˜ ์—†์–ด, ์™œ ๋ฒ„ํŠผ์ด ๋น„ํ™œ์„ฑํ™”๋˜์—ˆ๋Š”์ง€(aria-describedby๋กœ ์—ฐ๊ฒฐ๋œ ์•ˆ๋‚ด ๋ฌธ๊ตฌ)๋ฅผ ์ธ์ง€ํ•˜์ง€ ๋ชปํ•˜๋Š” ์ ‘๊ทผ์„ฑ ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“ธ Before/After:

  • Before: <button disabled aria-describedby="...">์ ‘๊ทผ ๊ด€๋ฆฌ</button> (ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค ๋ถˆ๊ฐ€, ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์•ˆ๋‚ด ๋ถˆ๊ฐ€)
  • After: <button aria-disabled={true} onClick={(e) => e.preventDefault()} aria-describedby="...">์ ‘๊ทผ ๊ด€๋ฆฌ</button> (ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค ๊ฐ€๋Šฅ, ํด๋ฆญ ๋ฐฉ์ง€, ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์•ˆ๋‚ด ์ •์ƒ ์ž‘๋™)

โ™ฟ Accessibility:
์ด์ œ ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž๊ฐ€ ํƒญ ํ‚ค๋ฅผ ์‚ฌ์šฉํ•ด '์ ‘๊ทผ ๊ด€๋ฆฌ' ๋ฒ„ํŠผ์— ๋„๋‹ฌํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์š”์†Œ๊ฐ€ ๋น„ํ™œ์„ฑํ™” ์ƒํƒœ์ž„์„ ์Œ์„ฑ์œผ๋กœ ์•ˆ๋‚ด๋ฐ›๊ณ  ์—ฐ๊ฒฐ๋œ ๋„์›€๋ง ํ…์ŠคํŠธ("์ ‘๊ทผ ๊ถŒํ•œ ๊ด€๋ฆฌ๋Š” ํ”„๋กœ์ ํŠธ ๊ถŒํ•œ ์„ค์ •์—์„œ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค.")๋ฅผ ํ•จ๊ป˜ ๋“ค์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์‹œ๊ฐ์  ์Šคํƒ€์ผ๋ง์€ ๊ธฐ์กด .exportModal__disabledHintButton ํด๋ž˜์Šค๋ฅผ ํ†ตํ•ด ๋™์ผํ•˜๊ฒŒ ์œ ์ง€๋ฉ๋‹ˆ๋‹ค.


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

This changes the disabled button in the export modal from using the
native `disabled` attribute to `aria-disabled=true` along with
a `preventDefault` onClick handler. This maintains keyboard focus
for screen reader users so they can hear the aria-describedby
hint explaining why the button is disabled.
Copilot AI review requested due to automatic review settings July 25, 2026 14:00
@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.

Copilot AI 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.

Pull request overview

This PR improves keyboard/screen-reader accessibility in the โ€œ๊ณต์œ  ๋ฐ ๋‚ด๋ณด๋‚ด๊ธฐโ€ modal by making the โ€œ์ ‘๊ทผ ๊ด€๋ฆฌโ€ button focusable while still conveying a disabled state and its help text via ARIA.

Changes:

  • Replaced native disabled on the โ€œ์ ‘๊ทผ ๊ด€๋ฆฌโ€ button with aria-disabled and a click guard to keep it in the tab order.
  • Updated the corresponding Vitest assertion to validate aria-disabled instead of toBeDisabled().

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
frontend/src/components/modals/ExportModal.tsx Makes the โ€œ์ ‘๊ทผ ๊ด€๋ฆฌโ€ button focusable while indicating disabled state via ARIA.
frontend/src/components/modals/ExportModal.test.tsx Updates tests to align with the new ARIA-disabled behavior.

๐Ÿ’ก Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

type="button"
disabled
aria-disabled={true}
onClick={(e) => e.preventDefault()}
Comment on lines 171 to 173
const accessManagementButton = screen.getByRole('button', { name: '์ ‘๊ทผ ๊ด€๋ฆฌ' });
expect(accessManagementButton).toBeDisabled();
expect(accessManagementButton).toHaveAttribute('aria-disabled', 'true');
expect(accessManagementButton).toHaveAttribute('aria-describedby', 'share-export-access-hint');
@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 work is superseded and stopping 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.

2 participants