Skip to content

๐ŸŽจ Palette: ์ ‘๊ทผ์„ฑ ๊ฐœ์„  - ContextSection ํ† ๊ธ€์˜ ARIA ์†์„ฑ ์ถ”๊ฐ€#110

Closed
seonghobae wants to merge 11 commits into
developmentalfrom
feat/palette-ux-context-section-aria-10943410953225494199
Closed

๐ŸŽจ Palette: ์ ‘๊ทผ์„ฑ ๊ฐœ์„  - ContextSection ํ† ๊ธ€์˜ ARIA ์†์„ฑ ์ถ”๊ฐ€#110
seonghobae wants to merge 11 commits into
developmentalfrom
feat/palette-ux-context-section-aria-10943410953225494199

Conversation

@seonghobae

Copy link
Copy Markdown

๐Ÿ’ก What

  • ContextSection ์ปดํฌ๋„ŒํŠธ ๋‚ด ํ† ๊ธ€ ๋ฒ„ํŠผ์— aria-controls ์†์„ฑ ์ถ”๊ฐ€ ๋ฐ ์ฝ˜ํ…์ธ  ์˜์—ญ id ์ž๋™ ์ƒ์„ฑ ๋งคํ•‘
  • ๋ฐฉํ–ฅ์„ฑ ํ™”์‚ดํ‘œ ์•„์ด์ฝ˜(Chevron)์— aria-hidden="true" ์†์„ฑ ๋ถ€์—ฌ
  • 100% ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ ์œ„ํ•œ context-section.test.tsx ์ถ”๊ฐ€ ๋ฐ vitest ์„ค์ • ์—…๋ฐ์ดํŠธ (happy-dom ์‚ฌ์šฉ)

๐ŸŽฏ Why

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

๐Ÿ“ธ Before/After

(์‹œ๊ฐ์ ์ธ ๋ณ€ํ™”๋Š” ์—†์œผ๋ฉฐ ๋‚ด๋ถ€ ์ ‘๊ทผ์„ฑ ์†์„ฑ๋งŒ ๊ฐœ์„ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.)

โ™ฟ Accessibility

  • aria-expanded์™€ aria-controls์˜ ์™„๋ฒฝํ•œ ์ง์„ ๋งž์ถ”์–ด ํ‚ค๋ณด๋“œ ๋ฐ ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ์‚ฌ์šฉ์ž์—๊ฒŒ ์ปจํ…์ŠคํŠธ ์„น์…˜์˜ ๋ช…ํ™•ํ•œ ์ƒํƒœ์™€ ๋Œ€์ƒ ์ „๋‹ฌ.

PR created automatically by Jules for task 10943410953225494199 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`๋ฅผ ์ ์šฉํ•˜์—ฌ ๋ถˆํ•„์š”ํ•œ ๋ฆฌ๋ Œ๋”๋ง ์ตœ์ ํ™”.
- `aria-controls`๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ํ† ๊ธ€ ๋ฒ„ํŠผ๊ณผ ์ฝ˜ํ…์ธ  ์˜์—ญ ๊ฐ„์˜ ์—ฐ๊ด€ ๊ด€๊ณ„ ์„ค์ •
- `Chevron` ์•„์ด์ฝ˜์— `aria-hidden="true"`๋ฅผ ๋ถ€์—ฌํ•˜์—ฌ ์Šคํฌ๋ฆฐ ๋ฆฌ๋” ๋ถˆํ•„์š”ํ•œ ๋…ธ์ด์ฆˆ ์ตœ์†Œํ™”
- 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.

Copilot AI review requested due to automatic review settings June 23, 2026 22:13

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 the accessibility of the ContextSection toggle in the web dashboard reports by wiring up aria-controls/aria-expanded and hiding decorative chevron icons from assistive tech, and adds component-level tests by enabling a DOM-like Vitest environment.

Changes:

  • Add aria-controls mapping via a generated content id and set chevron icons to aria-hidden="true".
  • Add ContextSection component tests and expand Vitest to include .test.tsx files.
  • Add Testing Library and happy-dom dev dependencies to support DOM-based tests.

Reviewed changes

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

Show a summary per file
File Description
pnpm-lock.yaml Adds happy-dom/Testing Library deps and updates lock resolutions.
packages/web/vitest.config.ts Switches test environment and expands include patterns for TSX tests.
packages/web/src/components/dashboard/reports/context-section.tsx Adds ARIA attributes and hides decorative icons.
packages/web/src/components/dashboard/reports/context-section.test.tsx Adds unit tests for toggle behavior and ARIA wiring.
packages/web/package.json Adds Testing Library + happy-dom devDependencies for Vitest/RTL.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

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

'use client'

import { useState, type ReactNode } from 'react'
import React, { useState, useId, type ReactNode } from 'react'
Comment on lines 36 to 40
{open && (
<div className="px-4 pb-4 pt-1">
<div id={contentId} className="px-4 pb-4 pt-1">
{children}
</div>
)}
Comment on lines 24 to +26
test: {
environment: 'node',
include: ['src/**/*.test.ts'],
environment: 'happy-dom',
include: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
@@ -0,0 +1,59 @@
import * as React from 'react'
Comment thread pnpm-lock.yaml
Comment on lines 99 to +104
next:
specifier: '15'
version: 15.5.18(@babel/core@7.29.7)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
version: 15.5.18(@babel/core@7.29.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5)
next-auth:
specifier: 5.0.0-beta.30
version: 5.0.0-beta.30(next@15.5.18(@babel/core@7.29.7)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react@19.2.5)
version: 5.0.0-beta.30(next@15.5.18(@babel/core@7.29.0)(react-dom@19.2.5(react@19.2.5))(react@19.2.5))(react@19.2.5)
@seonghobae

Copy link
Copy Markdown
Author

Closing as superseded during org-wide PR triage. Keeping #210 as the canonical PR for the same overlapping topic: ContextSection/accessibility accordion. This PR is stale/conflicted or has review blockers, so retaining one current PR reduces duplicated review and merge conflict work.

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

Copy link
Copy Markdown

Closing as superseded during org-wide PR triage. Keeping #210 as the canonical PR for the same overlapping topic: ContextSection/accessibility accordion. This PR is stale/conflicted or has review blockers, so retaining one current PR reduces duplicated review and merge conflict work.

Understood. Acknowledging that this work is now obsolete 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