Skip to content

feat(web): improve UI design consistency and fix drilldown graph overlap - #600

Merged
kicchann merged 6 commits into
mainfrom
fix/web-ui-improvements
Mar 7, 2026
Merged

kicchann merged 6 commits into
mainfrom
fix/web-ui-improvements

Conversation

@kicchann

@kicchann kicchann commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • デザイン基盤: ブランドカラー(indigo系)、next/font Inter最適化、fadeInアニメーション、focus-visible統一
  • UI統一: ステータスカラー統一(approved=blue, implemented=emerald)、Badge/Button/Card等の共通コンポーネント追加
  • ダッシュボード改善: ヒーローカード、SVG警告アイコン、GitHub Issue直リンク、ソート可能テーブルヘッダ
  • アクセシビリティ: aria-sort, aria-label, role="tab", aria-selected, focus-visible
  • グラフページ修正: ドリルダウングラフのissueノード重なりを動的レイアウトで解消、欠落していた@xyflow/react CSSを追加

Test plan

  • 全1327テスト通過(88テスト新規追加)
  • pnpm test でフルスイート確認済
  • Playwrightスクリーンショットで /graph?req=req-000023 のissueノード重なり解消を目視確認
  • issueノード間の余白をboundingClientRectで数値確認(14px余白)

🤖 Generated with Claude Code

- Establish design foundation: brand color system (indigo), next/font Inter, fadeIn animation
- Unify status colors across all components (approved=blue, implemented=emerald)
- Add reusable UI components: Button (4 variants × 3 sizes), Card (default/hero)
- Improve dashboard: hero card gradient, SVG warning icons, GitHub-linked issues
- Enhance tables: sortable headers with aria-sort, zebra stripes, empty state with filter reset
- Improve accessibility: aria-sort, aria-label, role="tab", aria-selected, focus-visible
- Fix drilldown graph: dynamic layout to prevent issue node overlap, add missing xyflow CSS
- Add 88 new tests covering all UI changes (TDD)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude

claude Bot commented Mar 7, 2026 •

Copy link
Copy Markdown

Claude finished @kicchann's task in 1m 56s —— View job


コードレビュー結果

  • タスクリスト作成
  • CLAUDE.md 読み込み(存在しない)
  • 変更ファイルのレビュー
    • UIコンポーネント (badge, button, card, nav, tabs)
    • ダッシュボードコンポーネント
    • グラフコンポーネント(ドリルダウン修正)
    • テストコード
    • その他(globals.css, layout.tsx等)
  • レビュー結果をコメントに投稿

全体的に品質の高いPRです。デザイン基盤の整備、アクセシビリティ対応、グラフの重なり修正がよく実装されています。いくつか指摘事項を挙げます。


🐛 バグ・正確性の問題

1. aria-sort の配置場所が仕様に違反している

aria-sort は <th> 要素に付与すべきですが、現在は <th> 内の <button> に付与されています。WAI-ARIA仕様では aria-sort は columnheader / rowheader ロールを持つ要素(すなわち <th>)に設定するものです。

  • packages/web/src/components/requirement/requirement-table.tsx:102
  • packages/web/src/components/specification/specification-table.tsx:99
// 現在(誤)
<th ...>
  <button aria-sort={...}>...</button>  // ❌ button に aria-sort
</th>

// 正しくは
<th aria-sort={...}>                    // ✅ th に aria-sort
  <button>...</button>
</th>

Fix this →


2. role="tablist" が欠落している

packages/web/src/components/ui/tabs.tsx:16 の <nav> に role="tablist" がありません。role="tab" を持つ子要素が role="tablist" の親を必要とするのはWAI-ARIAの必須要件です(owned element)。

// 現在
<nav className="-mb-px flex space-x-8">

// 修正案
<nav className="-mb-px flex space-x-8" role="tablist">

Fix this →


3. バージョンの辞書順ソートが正しくない

packages/web/src/components/specification/specification-table.tsx:65 でバージョンを localeCompare でソートしています。セマンティックバージョン(例: "1.9.0" vs "1.10.0")の辞書順ソートは正しい結果になりません("1.10.0" < "1.9.0" となってしまう)。

// 現在(辞書順・不正確)
case "version":
  cmp = a.version.localeCompare(b.version);
  break;

バージョンが常に x.y.z 形式であれば、数値比較への変換が必要です。


4. ドリルダウングラフの要件ノードY座標の計算が不正確

packages/web/src/lib/drilldown-graph-data.ts:44-48 の要件ノードの垂直中央配置が lastSpecY / 2 になっていますが、これはグラフ全体の高さの中心ではなく、最後のspec開始位置の半分です。specが多い場合(特に最後のspecに多くのissueがある場合)にズレが生じます。

// 現在
const lastSpecY = specYPositions.length > 0 ? specYPositions[specYPositions.length - 1] : 0;
nodes.push({ position: { x: LAYOUT.REQ_X, y: lastSpecY / 2 }, ... });

// 正確な中心を求めるなら totalHeight / 2 が適切
const totalHeight = currentY; // ループ後の currentY がグラフ全体の高さ
nodes.push({ position: { x: LAYOUT.REQ_X, y: totalHeight / 2 }, ... });

⚠️ アクセシビリティの改善点

5. アクティブナビゲーションリンクに aria-current が欠落

packages/web/src/components/ui/nav.tsx:28-38 でアクティブなリンクの視覚的なスタイルは設定されていますが、スクリーンリーダー向けの aria-current="page" が設定されていません。

<Link
  aria-current={isActive ? "page" : undefined}  // ← 追加
  ...
>

Fix this →


🔧 コードの一貫性

6. フィルター入力のfocusスタイルがブランドカラーと不一致

packages/web/src/components/requirement/requirement-table.tsx:130-136 および specification-table.tsx:126-132 のフォーム要素に focus:border-blue-500 focus:ring-blue-500 が使われていますが、globals.css では brand-500 (indigo) がフォーカスカラーとして定義されています。

// 現在
className="... focus:border-blue-500 focus:ring-blue-500"

// ブランドカラーに統一
className="... focus:border-brand-500 focus:ring-brand-500"

7. feedback-filters.tsx のラベル表記が不統一

packages/web/src/components/feedback/feedback-filters.tsx:12-17 の TYPE_OPTIONS で、一部のラベルが小文字("bug", "improvement", "security")、一部が大文字始まり("Req Gap", "Spec Mismatch")になっています。

8. critical-path-display.tsx のGitHub URLがハードコード

packages/web/src/components/dashboard/critical-path-display.tsx:60 でリポジトリURLがハードコードされています(https://github.com/kicchann/reqord/issues/)。task.url のようなデータから生成するか、設定ファイルから読み込む方が望ましいです。


✅ 良い点

  • @xyflow/react/dist/style.css の追加 - これが重なりバグの根本原因の一つだったはずで、適切に対処されています
  • 動的レイアウト計算 (drilldown-graph-data.ts) - specごとのタスク数に基づいたY座標の累積計算はシンプルで効果的です
  • 共通コンポーネントの追加 (Button, Card) - 再利用性が高く、Props設計も適切です
  • aria-hidden="true" のSVGアイコン - 装飾的なSVGに正しく設定されています
  • aria-label の各フォーム要素への追加 - スクリーンリーダー対応として適切です
  • useMemo によるフィルタリング・ソート最適化 - 適切な依存配列で実装されています
  • テストカバレッジの拡充 - 88テスト追加は十分な品質保証です

Replace text-only "Reqord" brand link with the logo SVG from assets/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the web UI design system (brand colors, typography, focus styles), unifies common UI components, improves dashboard UX/accessibility, and fixes drilldown graph issue-node overlap via dynamic layout.

Changes:

  • Introduces brand theme colors, Inter font via next/font, global focus-visible styling, and a fade-in transition.
  • Adds shared UI primitives (Card/Button) and applies consistent status colors across badges and graph nodes.
  • Fixes drilldown graph overlap by dynamically computing spec/issue Y positions and adds missing @xyflow/react CSS import; expands a11y attributes across UI.

Reviewed changes

Copilot reviewed 44 out of 45 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
packages/web/src/lib/drilldown-graph-data.ts Dynamic Y positioning to avoid issue-node overlap in drilldown graphs.
packages/web/src/components/ui/tabs.tsx Adds role="tab" / aria-selected to tabs.
packages/web/src/components/ui/nav.tsx Refactors nav links into NAV_ITEMS and adds active styling based on pathname.
packages/web/src/components/ui/card.tsx Adds a shared Card component with variants.
packages/web/src/components/ui/button.tsx Adds a shared Button component with variants/sizes and focus-visible styling.
packages/web/src/components/ui/badge.tsx Updates status badge colors to the unified brand palette.
packages/web/src/components/specification/specification-table.tsx Improves table sorting UX/a11y, empty states, and filter controls styling.
packages/web/src/components/requirement/requirement-table.tsx Mirrors spec table improvements for requirements (sorting, empty state, filters).
packages/web/src/components/graph/specification-node.tsx Aligns node styling with brand palette and shows label when distinct from id.
packages/web/src/components/graph/requirement-node.tsx Updates status colors and visual polish (shadow/handle colors).
packages/web/src/components/graph/issue-node.tsx Updates status colors and badge styling for issue nodes.
packages/web/src/components/graph/edge-styles.ts Updates edge stroke colors to the new palette.
packages/web/src/components/graph/drilldown-graph.tsx Adds missing @xyflow/react stylesheet import and adjusts fit/zoom options.
packages/web/src/components/graph/drilldown-breadcrumb.tsx Updates back-button hover styling to brand colors.
packages/web/src/components/feedback/feedback-filters.tsx Adds friendly labels for filter types and refactors segmented-button options handling.
packages/web/src/components/dashboard/warning-alert.tsx Redesigns alert presentation and adds severity icons.
packages/web/src/components/dashboard/status-card.tsx Improves card styling and adds status-colored breakdown badges.
packages/web/src/components/dashboard/project-health.tsx Restyles as a hero card with indigo gradient and updated score colors.
packages/web/src/components/dashboard/progress-bar.tsx Updates progress bar height and transition styling.
packages/web/src/components/dashboard/critical-path-display.tsx Restyles items and adds GitHub issue number linking + priority badges.
packages/web/src/app/specifications/loading.tsx Improves loading skeleton to match updated filter/table layout.
packages/web/src/app/requirements/loading.tsx Improves loading skeleton to match updated filter/table layout.
packages/web/src/app/layout.tsx Applies Inter font via next/font/google to the app body.
packages/web/src/app/globals.css Adds brand theme tokens, fade-in animation, and global focus-visible outline.
packages/web/src/app/dashboard/page.tsx Reorganizes dashboard page sections into zones with updated spacing.
packages/web/src/tests/lib/drilldown-graph-data.test.ts Updates/adds tests for dynamic graph layout positioning.
packages/web/src/tests/components/ui/tabs.test.tsx Adds tabs accessibility tests.
packages/web/src/tests/components/ui/nav.test.tsx Adds nav rendering + active state tests.
packages/web/src/tests/components/ui/card.test.tsx Adds Card component tests.
packages/web/src/tests/components/ui/button.test.tsx Adds Button component tests.
packages/web/src/tests/components/ui/badge.test.tsx Adds badge styling tests aligned to new palette.
packages/web/src/tests/components/specification/specification-table.test.tsx Adds tests for sorting a11y, filters, empty state, and header styling.
packages/web/src/tests/components/requirement/requirement-table.test.tsx Adds tests for sorting a11y, filters, empty state, and header styling.
packages/web/src/tests/components/graph/specification-node.test.tsx Updates tests for new spec node styling and label rendering.
packages/web/src/tests/components/graph/requirement-node.test.tsx Adds tests for brand color system and updated visuals.
packages/web/src/tests/components/graph/issue-node.test.tsx Updates tests for issue node palette and badge styling.
packages/web/src/tests/components/graph/edge-styles.test.ts Updates tests for new edge stroke colors.
packages/web/src/tests/components/graph/drilldown-breadcrumb.test.tsx Adds test for brand hover styles on back button.
packages/web/src/tests/components/feedback/feedback-filters-improved.test.tsx Adds tests for shortened filter labels and padding changes.
packages/web/src/tests/components/dashboard/warning-alert.test.tsx Updates tests for new warning alert presentation.
packages/web/src/tests/components/dashboard/status-card.test.tsx Adds tests for new status-card styling and badge classes.
packages/web/src/tests/components/dashboard/project-health.test.tsx Updates tests for new hero styling and updated score colors.
packages/web/src/tests/components/dashboard/progress-bar.test.tsx Adds tests for new progress-bar track/fill styling.
packages/web/src/tests/components/dashboard/critical-path-display.test.tsx Adds tests for GitHub link rendering and priority badge styling.
Comments suppressed due to low confidence (2)

packages/web/src/lib/drilldown-graph-data.ts:83

  • Task-to-spec lookups are computed by filtering tasks multiple times (once per spec for specTaskCounts, and again per spec for specTasks). This is O(specs*tasks) twice and can get slow as task counts grow. Consider building a map from specId -> tasks[] in a single pass and reuse it for both counts and node generation.
    packages/web/src/components/ui/tabs.tsx:36
  • The markup is mixing a nav with role="tab" buttons, but it’s missing the required tablist semantics (role="tablist") and tab keyboard behavior (arrow keys), plus there are no id/aria-controls relationships to associated panels. Either implement the full ARIA Tabs pattern (tablist + tabs + panels) or drop role="tab" and keep these as regular buttons/links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 92 to +103
<th
key={column}
className="cursor-pointer px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 hover:text-gray-900"
onClick={() => handleSort(column)}
className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"
>
{label}{arrow}
<button
type="button"
onClick={() => handleSort(column)}
className={`inline-flex items-center gap-1 transition-colors ${
isActive ? "text-brand-600" : "hover:text-gray-900"
}`}
aria-sort={isActive ? (sortDir === "asc" ? "ascending" : "descending") : undefined}
>

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

aria-sort is being applied to the inner <button>, but per WAI-ARIA the attribute is intended for the column header element (e.g. the <th> with role="columnheader"). Screen readers may ignore aria-sort on a button. Move aria-sort onto the <th> (and consider scope="col"), and keep the button purely for the click target (optionally add an aria-label that includes current sort direction).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — moved aria-sort to <th> with scope="col", button now only handles click.

Comment on lines +12 to +16
const PRIORITY_BADGE_CLASSES: Record<string, string> = {
high: "bg-red-100 text-red-800",
medium: "bg-orange-100 text-orange-800",
low: "bg-gray-100 text-gray-800",
};

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

CriticalPathItem.priority is populated from task.priority (e.g. "P0"/"P1"/"P2"/"P3" in TaskEntrySchema), but PRIORITY_BADGE_CLASSES only handles "high"/"medium"/"low". This means real data will fall back to the gray default. Update the mapping (or normalize priority values in extractCriticalPath) so the badge colors match the actual priority values used in the data model.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — updated PRIORITY_BADGE_CLASSES to map P0/P1/P2/P3 instead of high/medium/low.

Comment on lines +104 to +107
{label}
<span className={`text-[10px] ${isActive ? "opacity-100" : "opacity-30"}`}>
{isActive && sortDir === "desc" ? "▼" : "▲"}
</span>

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

The sort indicator characters (▲/▼) are part of the button text and may be announced by screen readers as “black up-pointing triangle”, etc. Consider marking the indicator <span> as aria-hidden="true" (and/or providing a clearer aria-label that includes sort direction) so the accessible name stays clean.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — added aria-hidden="true" to the sort indicator <span>.

Comment on lines 89 to +100
<th
key={column}
className="cursor-pointer px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 hover:text-gray-900"
onClick={() => handleSort(column)}
className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"
>
{label}{arrow}
<button
type="button"
onClick={() => handleSort(column)}
className={`inline-flex items-center gap-1 transition-colors ${
isActive ? "text-brand-600" : "hover:text-gray-900"
}`}
aria-sort={isActive ? (sortDir === "asc" ? "ascending" : "descending") : undefined}
>

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

aria-sort is set on the <button> inside the table header, but assistive tech expects aria-sort on the header cell (<th> / role="columnheader"). Move aria-sort to the <th> (and consider scope="col") so sorting state is announced reliably.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — same fix as requirement-table: moved aria-sort to <th> with scope="col".

Comment on lines 24 to +37
</Link>
<div className="flex gap-4">
<Link
href="/dashboard"
className="text-sm font-medium text-gray-600 hover:text-gray-900"
>
Dashboard
</Link>
<Link
href="/requirements"
className="text-sm font-medium text-gray-600 hover:text-gray-900"
>
Requirements
</Link>
<Link
href="/specifications"
className="text-sm font-medium text-gray-600 hover:text-gray-900"
>
Specifications
</Link>
<Link
href="/feedback"
className="text-sm font-medium text-gray-600 hover:text-gray-900"
>
Feedback
</Link>
<Link
href="/graph"
className="text-sm font-medium text-gray-600 hover:text-gray-900"
>
Graph
</Link>
<div className="flex gap-1">
{NAV_ITEMS.map(({ href, label }) => {
const isActive =
pathname === href || pathname.startsWith(href + "/");
return (
<Link
key={href}
href={href}
className={`rounded-md px-3 py-2 text-sm font-medium transition-colors ${
isActive
? "bg-brand-50 text-brand-700"
: "text-gray-600 hover:bg-gray-100 hover:text-gray-900"
}`}

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

The active nav link is styled visually, but there is no semantic indicator for assistive tech. Add aria-current="page" (or aria-current={isActive ? "page" : undefined}) to the active <Link> so screen readers can announce the current page.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — added aria-current={isActive ? "page" : undefined} to active nav links.

Comment on lines +59 to +66
<a
href={`https://github.com/kicchann/reqord/issues/${item.issueNumber}`}
target="_blank"
rel="noopener noreferrer"
className="text-sm font-medium text-blue-600 hover:underline"
>
#{item.issueNumber}
</a>

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

The GitHub link is hard-coded to https://github.com/kicchann/reqord/issues/..., but CriticalPathItem already includes a url field. Using a hard-coded repo can produce incorrect links in other environments (forks, different org/repo). Prefer href={item.url} (optionally validate/fallback when missing).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — now uses item.url from the data model instead of hardcoded URL.

Comment on lines +34 to +38
return (
<button
className={`inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none disabled:opacity-50 ${variantClasses[variant]} ${sizeClasses[size]} ${className}`}
{...props}
>

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

This shared Button component doesn’t set a default type. In HTML the default is submit, which can cause accidental form submissions when the button is used inside a <form>. Consider defaulting type to "button" unless the caller explicitly passes type.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — added type="button" as default before the spread {...props}, so callers can still override to type="submit" when needed.

from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

The global fadeIn animation is applied to all direct children of <main>, but it doesn’t respect users who prefer reduced motion. Add a @media (prefers-reduced-motion: reduce) override to disable the animation (and potentially the transform) for accessibility.

Suggested change
@media (prefers-reduced-motion: reduce) {
main > * {
animation: none;
}
}

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — added @media (prefers-reduced-motion: reduce) block to disable the animation.

Comment on lines 39 to 52
<button
key={opt}
onClick={() => onChange(opt)}
aria-label={`${label} ${opt}`}
aria-pressed={value === opt}
className={`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${
value === opt
key={opt.value}
onClick={() => onChange(opt.value)}
aria-label={`${label} ${opt.value}`}
aria-pressed={value === opt.value}
className={`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${
value === opt.value
? "bg-blue-600 text-white"
: "bg-gray-100 text-gray-600 hover:bg-gray-200"
}`}
data-testid={`filter-${label.toLowerCase()}-${opt}`}
data-testid={`filter-${label.toLowerCase()}-${opt.value}`}
>
{opt}
{opt.label}
</button>

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

aria-label for each segmented button uses opt.value (e.g. "requirement-gap") even when the visible label is a friendlier opt.label (e.g. "Req Gap"). This can cause screen readers to announce the less readable internal value. Prefer basing the accessible name on opt.label (or omit aria-label and rely on the visible text).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — changed from opt.value to opt.label for the aria-label.

Comment on lines +101 to +105
{label}
<span className={`text-[10px] ${isActive ? "opacity-100" : "opacity-30"}`}>
{isActive && sortDir === "desc" ? "▼" : "▲"}
</span>
</button>

Copilot AI Mar 7, 2026

Copy link

Choose a reason for hiding this comment

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

The ▲/▼ sort glyph is included in the button’s accessible name and may be read out by screen readers. Consider aria-hidden="true" on the indicator <span> (and/or an explicit aria-label including sort direction) to avoid noisy announcements.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 059959c — added aria-hidden="true" to sort indicator glyphs in both tables.

kicchann and others added 3 commits March 7, 2026 17:27
Logo uses warm cream (#f5f2ed) + red accent (#ff3b2f), but UI was
using cool indigo. Switch brand palette to red-600 (#DC2626) base
to match the logo's design language.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The logo uses warm cream (#f5f2ed) with a small red accent dot (#ff3b2f).
Redesign the entire color system to match:

- Background: warm cream (warm-50/warm-100) instead of cool gray
- Nav bar: warm-100 background matching the logo's cream
- Brand colors: warm neutrals (#4A3F35 base) for primary UI elements
- Red accent: used only as small indicator (accent bar, danger button)
- Project Health: cream card with red accent line, not a red block
- All components updated to use warm-* tokens

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tton type)

- Move aria-sort from <button> to <th> per WAI-ARIA spec (requirement-table, specification-table)
- Add aria-hidden="true" to sort indicator glyphs (▲/▼)
- Fix PRIORITY_BADGE_CLASSES to use actual data values (P0/P1/P2/P3 instead of high/medium/low)
- Use item.url instead of hardcoded GitHub URL in critical-path-display
- Default Button type to "button" to prevent accidental form submissions
- Add @media (prefers-reduced-motion: reduce) for fadeIn animation
- Add aria-current="page" to active nav link
- Use opt.label instead of opt.value for feedback filter aria-label

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kicchann

kicchann commented Mar 7, 2026

Copy link
Copy Markdown
Owner Author

@copilot Thanks for the thorough review! All 8 actionable comments have been addressed in 059959c:

# Issue Fix
1 aria-sort on <button> Moved to <th> with scope="col"
2 Priority mapping mismatch Updated to P0/P1/P2/P3
3 Sort glyphs announced by SR Added aria-hidden="true"
4 aria-sort on spec table Same fix as #1
5 Missing aria-current="page" Added to active nav link
6 Hardcoded GitHub URL Now uses item.url from data
7 Button default type Set type="button" as default
8 No prefers-reduced-motion Added @media override
9 aria-label uses internal value Changed to opt.label
10 Sort glyphs on spec table Same fix as #3

Intentionally deferred (low-confidence suggestions):

  • Task lookup O(specs×tasks) → current data scale (~40 specs, ~80 tasks) doesn't warrant optimization
  • Full ARIA Tabs pattern → out of scope for this PR, will track separately

Copilot AI commented Mar 7, 2026

Copy link
Copy Markdown

@kicchann I've opened a new pull request, #601, to work on those changes. Once the pull request is ready, I'll request review from you.

@kicchann

kicchann commented Mar 7, 2026

Copy link
Copy Markdown
Owner Author

@claude 詳細なレビューありがとうございます!8件の指摘について対応状況をまとめます。

✅ 対応済み(059959c)

# 指摘 対応内容
1 aria-sort の配置場所が <button> → <th> に移動すべき <th scope="col" aria-sort={...}> に移動済み
5 aria-current="page" の欠落 nav.tsx に aria-current={isActive ? "page" : undefined} 追加済み
8 GitHub URLのハードコード item.url を直接使用するよう修正済み

🔄 延期(別タスクで対応予定)

# 指摘 理由
2 role="tablist" の欠落 完全なARIA Tabsパターン(role="tabpanel", aria-controls, キーボードナビゲーション等)との整合性を含めて別PRで対応予定
3 バージョンの辞書順ソート 現状バージョンは "1.0" 形式のみ。semver対応が必要になった時点で対応
4 要件ノードY座標 lastSpecY / 2 → totalHeight / 2 ご指摘の通りです。最後のspecにissueが多い場合にズレます。グラフレイアウト改善として別PRで対応
6 focusスタイル blue-500 → ブランドカラー デザインシステムの色をindigo→warmに変更済み(1ad29a3)のため、focus ringの統一はデザインシステム整備として別PRで対応
7 feedback-filters.tsx のラベル表記不統一 UIラベル表記の統一ルール策定と合わせて対応予定

良い点として挙げていただいた @xyflow/react CSSインポート追加、動的レイアウト計算、共通コンポーネント設計などのフィードバックも参考になりました。

@claude

claude Bot commented Mar 7, 2026 •

Copy link
Copy Markdown

Claude finished @kicchann's task in 45s —— View job


レビューフォローアップ確認

  • 対応済みの修正を確認
  • 延期項目の妥当性を評価

対応状況を確認しました。

✅ 対応済み修正の確認(059959c)

コードを直接確認した結果、すべて正しく実装されています:

修正 確認結果
aria-sort を <th scope="col"> に移動 requirement-table.tsx:92-96 で確認 ✅
ソート指示子に aria-hidden="true" requirement-table.tsx:106 で確認 ✅
aria-current={isActive ? "page" : undefined} nav.tsx:33 で確認 ✅
item.url を使用(ハードコードURL削除) critical-path-display.tsx:61 で確認 ✅
優先度マッピング P0/P1/P2/P3 critical-path-display.tsx:12-17 で確認 ✅

🔄 延期項目への所見

延期の判断はいずれも妥当です:

  • role="tablist" 欠落 — 完全なARIA Tabsパターン(キーボードナビ含む)は独立したPRでの対応が適切です
  • バージョンの辞書順ソート — "1.0" 形式のみである現状では実害なし。x.y.z 形式が使われるようになった際に対応で問題ありません
  • 要件ノードY座標 — lastSpecY / 2 の問題はグラフが複雑になった際に顕在化するため、別PRでのレイアウト改善として対応するのが合理的です
  • focusスタイルのブランドカラー統一 — デザインシステムの移行中(indigo→warm)という経緯を考えると、統一されたタイミングで一括対応が効率的です
  • フィードバックフィルターのラベル表記 — UX上の一貫性ルール策定と合わせての対応が望ましいです

このPRは品質の高い実装になっています。マージに問題はありません。
| Branch: fix/web-ui-improvements

- Remove eslint-disable comment for undefined @next/next/no-img-element rule
- Fix Requirement test mock: use FormatSchema union, add files field, remove nonexistent flags
- Fix Specification test mock: add files field, remove nonexistent flags

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kicchann
kicchann merged commit 5e943af into main Mar 7, 2026
3 checks passed
@kicchann
kicchann deleted the fix/web-ui-improvements branch March 7, 2026 09:04
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants