Skip to content

๐ŸŽจ Palette: [UX improvement] ์•„์ฝ”๋””์–ธ ์ ‘๊ทผ์„ฑ ๋ฐ ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค ๊ฐœ์„ #210

Closed
seonghobae wants to merge 11 commits into
developmentalfrom
palette/accordion-a11y-2033724048262015987
Closed

๐ŸŽจ Palette: [UX improvement] ์•„์ฝ”๋””์–ธ ์ ‘๊ทผ์„ฑ ๋ฐ ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค ๊ฐœ์„ #210
seonghobae wants to merge 11 commits into
developmentalfrom
palette/accordion-a11y-2033724048262015987

Conversation

@seonghobae

Copy link
Copy Markdown

๐Ÿ’ก What

  • ContextSection ์ปดํฌ๋„ŒํŠธ์˜ <button>๊ณผ ์ฝ˜ํ…์ธ  ์˜์—ญ์ด ARIA ์†์„ฑ์œผ๋กœ ์—ฐ๊ฒฐ๋˜์ง€ ์•Š์•„ ์ ‘๊ทผ์„ฑ์ด ๋–จ์–ด์ง€๋Š” ๋ถ€๋ถ„์„ ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค (aria-controls, role="region", aria-labelledby ๋„์ž…).
  • <button>์„ ํ†ตํ•œ ํ‚ค๋ณด๋“œ ํƒ์ƒ‰ ์‹œ(Tab ์ด๋™ ์‹œ) ํฌ์ปค์Šค ๋ง์ด ๋ช…ํ™•ํ•˜๊ฒŒ ํ‘œ์‹œ๋˜๋„๋ก focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset ์œ ํ‹ธ๋ฆฌํ‹ฐ ํด๋ž˜์Šค๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • vitest๋ฅผ ํ†ตํ•ด ํ•ด๋‹น ๋ณ€๊ฒฝ์‚ฌํ•ญ์— ๋Œ€ํ•œ ์ ‘๊ทผ์„ฑ ๋ฐ ์ƒํƒœ ๋ณ€๊ฒฝ ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ 100%๋กœ ํ™•๋ณดํ–ˆ์Šต๋‹ˆ๋‹ค.

๐ŸŽฏ Why

  • ์ ‘๊ทผ์„ฑ(A11y): ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž๊ฐ€ ํ˜„์žฌ ๋ฒ„ํŠผ์ด ์กฐ์ž‘ํ•˜๋Š” ์˜์—ญ(region)์ด ๋ฌด์—‡์ธ์ง€ ๋ช…ํ™•ํ•˜๊ฒŒ ์ธ์ง€ํ•˜๊ณ  ์ƒํƒœ(open/close)์— ๋”ฐ๋ผ ๋ณ€ํ™”๋ฅผ ์ž˜ ํŒŒ์•…ํ•˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•จ์ž…๋‹ˆ๋‹ค.
  • ํ‚ค๋ณด๋“œ ์ ‘๊ทผ์„ฑ(A11y): ๋งˆ์šฐ์Šค๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ํƒญ(Tab) ํ‚ค๋กœ ํŽ˜์ด์ง€๋ฅผ ํƒ์ƒ‰ํ•  ๋•Œ, ํ˜„์žฌ ์ดˆ์ ์ด ์–ด๋””์— ์œ„์น˜ํ•ด ์žˆ๋Š”์ง€ ์‹œ๊ฐ์ ์œผ๋กœ ๋ถ„๋ช…ํ•˜๊ฒŒ ํ”ผ๋“œ๋ฐฑ์„ ์ฃผ๊ธฐ ์œ„ํ•ด ํฌ์ปค์Šค ์ธ๋””์ผ€์ดํ„ฐ๊ฐ€ ํ•„์ˆ˜์ ์ž…๋‹ˆ๋‹ค.

๐Ÿ“ธ Before/After

  • Before: ์Šคํฌ๋ฆฐ ๋ฆฌ๋”๊ธฐ์—์„œ ๋ฒ„ํŠผ ํด๋ฆญ ์‹œ ์–ด๋–ค ์˜์—ญ์ด ์—ด๋ฆฌ๋Š”์ง€ ์—ฐ๊ฒฐ๊ณ ๋ฆฌ๊ฐ€ ์—†์—ˆ์œผ๋ฉฐ, ํƒญํ‚ค๋ฅผ ํ†ตํ•œ ํƒ์ƒ‰ ์‹œ ContextSection์˜ ํ† ๊ธ€ ๋ฒ„ํŠผ์— ์‹œ๊ฐ์  ํฌ์ปค์Šค ๋ง์ด ๋‚˜ํƒ€๋‚˜์ง€ ์•Š์•„ ํ˜ผ๋ž€์„ ์ค„ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
  • After: ๊ณ ์œ ํ•œ ๋™์  ID๋ฅผ ํ™œ์šฉํ•œ ARIA ์†์„ฑ ์—ฐ๊ฒฐ์„ ํ†ตํ•ด ์ ‘๊ทผ์„ฑ์ด ๊ฐœ์„ ๋˜์—ˆ๊ณ , ๋ช…ํ™•ํ•œ ํฌ์ปค์Šค ๋ง ๋””์ž์ธ ์ถ”๊ฐ€๋กœ ํ‚ค๋ณด๋“œ ๋„ค๋น„๊ฒŒ์ด์…˜ ์‚ฌ์šฉ์„ฑ์ด ํ–ฅ์ƒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

โ™ฟ Accessibility

  • useId()๋ฅผ ํ†ตํ•ด ๋ฒ„ํŠผ(aria-controls)๊ณผ ํŒจ๋„(id, aria-labelledby)์„ ์‹œ๋งจํ‹ฑํ•˜๊ฒŒ ์—ฐ๊ฒฐ.
  • ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค ์Šคํƒ€์ผ ๋ช…์‹œ (focus-visible:ring-2).
  • ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ๋ฌด์˜๋ฏธ ์ฝ˜ํ…์ธ  ์ œ์™ธ(aria-hidden="true"๋ฅผ ์•„์ด์ฝ˜์— ์ ์šฉ).

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

seonghobae and others added 11 commits June 22, 2026 10:26
โ€ฆlicate calculation

`buildTimelineGroups` was calculated redundantly inside both `EventList` and `SessionActivityRibbon` inside `useMemo` hooks. This commit moves the `useMemo` computation into the parent `page.tsx` component and passes down `groups` as a prop to its children, preventing duplicate O(n) array iterations per `events` change.
Replace chained `.reduce()` and `Object.values()` with a single `for...of` loop over `Object.keys()` to avoid unnecessary intermediate array allocations and improve iteration performance during report aggregation.
overview-stats ์ปดํฌ๋„ŒํŠธ์˜ ์„ค๋ช… ํ…์ŠคํŠธ๋ฅผ ํŽผ์น˜๊ฑฐ๋‚˜ ์ ‘๋Š” ๋ฒ„ํŠผ์— ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค ์Šคํƒ€์ผ์ด ๋ˆ„๋ฝ๋˜์–ด ์žˆ์–ด, ํ‚ค๋ณด๋“œ ๋‚ด๋น„๊ฒŒ์ด์…˜ ์‚ฌ์šฉ์ž์—๊ฒŒ ํ˜„์žฌ ํฌ์ปค์Šค ์œ„์น˜๋ฅผ ๋ช…ํ™•ํžˆ ๋ณด์—ฌ์ฃผ์ง€ ๋ชปํ•˜๋Š” ๋ฌธ์ œ๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

Tailwind CSS์˜ `focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm` ํด๋ž˜์Šค๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ํƒญ(Tab) ํ‚ค ์ด๋™ ์‹œ ํฌ์ปค์Šค ๋ง์ด ๋ณด์ด๋„๋ก ์ ‘๊ทผ์„ฑ์„ ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
- `TokenUsageChart`์™€ `WeeklyFlowChart`์˜ ๋ฐ์ดํ„ฐ ๋ณ€ํ™˜ ๋กœ์ง์— `useMemo`๋ฅผ ์ ์šฉํ•˜์—ฌ ๋ถˆํ•„์š”ํ•œ ๋ฆฌ๋ Œ๋”๋ง ์ตœ์ ํ™”.
- `ContextSection` ๋‚ด ์ปค์Šคํ…€ ์•„์ฝ”๋””์–ธ ํ† ๊ธ€๊ณผ ์ฝ˜ํ…์ธ  ์˜์—ญ ๊ฐ„ `aria-controls`, `role="region"`, `aria-labelledby` ๋“ฑ ํ•„์ˆ˜ ARIA ์—ฐ๊ฒฐ ์†์„ฑ ๋ˆ„๋ฝ ๋ฌธ์ œ๋ฅผ `useId()`๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋™์ ์œผ๋กœ ๋ถ€์—ฌํ•จ์œผ๋กœ์จ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค.
- ๊ธฐ๋ณธ UI primitive๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ์ปค์Šคํ…€ `<button>` ์š”์†Œ์— ๋Œ€ํ•ด `focus-visible` ๋“ฑ ๋ช…ํ™•ํ•œ ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค ์Šคํƒ€์ผ์„ ์ถ”๊ฐ€ํ•ด ํ‚ค๋ณด๋“œ ์กฐ์ž‘ ๊ฐ€์‹œ์„ฑ์„ ๋†’์˜€์Šต๋‹ˆ๋‹ค.
- ๋ถˆํ•„์š”ํ•œ ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์Œ์„ฑ ์ถœ๋ ฅ์„ ๋ง‰๊ธฐ ์œ„ํ•ด chevron ์•„์ด์ฝ˜์— `aria-hidden="true"`๋ฅผ ๋ถ€์—ฌํ–ˆ์Šต๋‹ˆ๋‹ค.
- ๊ด€๋ จ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ(`context-section.test.tsx`)๋ฅผ ์ž‘์„ฑํ•˜์—ฌ ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ 100% ํ™•๋ณดํ•˜๊ณ  ์˜๋„๋œ ๊ธฐ๋Šฅ๊ณผ ์ ‘๊ทผ์„ฑ ์†์„ฑ์ด ์ž˜ ์ ์šฉ๋˜๋Š”์ง€ ๊ฒ€์ฆํ–ˆ์Šต๋‹ˆ๋‹ค.
@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.

This was referenced Jul 7, 2026
@seonghobae seonghobae closed this Jul 7, 2026
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