Skip to content

Hardening: Cindy's Components (31) #719

Closed

Description

@josephfarina

How This Works

This is a component hardening sprint running March 18 through April 10, 2026.

Each component has a checkbox. Check it off when all findings for that component are resolved.

Findings are listed under each component with a severity tag:

  • P0 = broken for a class of users, crash, dead code
  • P1 = quality gap, a11y violation, bug
  • P2 = polish, hardcoded values, test gaps

When you fix something: create a PR, link it next to the finding, check off the finding. When all findings for a component are done, check the component box.


Shell & Navigation (7)

Table (1)

  • Table
    • P0: Column width system is dead code — columnWidthToCSS exported/tested/documented but never called → PR fix(Table): remove dead code — columnWidthToCSS and _lastBodyRowStyles #797
    • P0: Selection plugin breaks row memoization — config recreates every render — tracked in [bug] useXDSTableSelection overrendering #195
    • P0: idKey with missing property silently breaks — all rows get key "undefined"
    • P1: thead and tbody missing xdsClassName — eliminated: structural elements, don't need xdsClassName
    • P1: Selection checkbox labels hardcoded English — eliminated: selection issues tracked separately
    • P1: No aria-sort on sortable headers
    • P1: Selection checkboxes have no visible label text — eliminated: selection issues tracked separately
    • P1: Hardcoded '1px' border widths (5 instances) — hardcoded border width is fine
    • P2: '36px' selection column hardcoded
    • P1: No sorting plugin exists — feature request, not hardening
    • P1: _lastBodyRowStyles dead code → PR fix(Layout): forward ref and remove dead code #796
    • P2: No sticky header, no virtual scrolling — feature requests, not hardening
    • P2: columnWidthToCSS tested but dead code → PR fix(Table): remove dead code — columnWidthToCSS and _lastBodyRowStyles #797
    • P2: Doc lists xstyle prop that doesn't exist
    • P2: Plugin order depends on Object.values() — not stable
    • P2: defaultCellRenderer shows [object Object]
    • P2: Column auto-generation uses raw keys as headers
    • P2: Test gaps: column changes, empty columns, hover radius

Layout & Containers (4)

Display & Data (19)

  • AspectRatio ✅ No findings from deep analysis
  • Avatar
    • P1: AvatarStatusDot has optional label but no role on div
    • P2: Zero test coverage
  • Badge 🔄
  • Banner
    • P1: Missing aria-controls on collapse toggle
    • P2: No test for collapsible animation
  • Card
    • P1: No semantic role on interactive card — eliminated: Card is not interactive, it's a container
    • P1: Scrollable areas not keyboard-accessible — eliminated: niche edge case on fixed-height cards, not a component bug
    • P2: Only 2 tests total — eliminated: Card is a simple container, 2 tests cover its behavior
  • Collapsible 🔄
  • Divider
    • P2: Hardcoded 1px border width — xstyle override; no border-width token in system
  • EmptyState
    • P1: Hardcoded h3 heading level
    • P2: 360px maxWidth hardcoded — overridable via xstyle
  • Icon ✅ No findings from deep analysis
  • Kbd ✅ PR fix(Kbd): platform-aware mod key display #722
  • Link
    • P1: No "opens in new tab" screen reader indicator
    • P2: No external link test
  • List
    • P0: aria-selected without listbox role — ARIA spec violation
    • P1: Hover radius should use --radius-content
    • P2: No keyboard nav test
  • Pagination
    • P1: No aria-live for page changes
    • P1: Dot buttons zero hover feedback
    • P2: Hardcoded 8px/24px/32px — overridable via xstyle
    • P2: No edge case tests
  • ProgressBar
    • P2: Hardcoded 4px/8px/12px heights — size tier definitions (sm/md/lg), overridable via xstyle
  • Skeleton
  • Spinner
    • P0: 4 hardcoded colors in canvas — not themeable
    • P1: Does not extend XDSBaseProps — aria-label="Loading" hardcoded, not overridable because Spinner lacks XDSBaseProps + rest spread
    • P1: No prefers-reduced-motion
  • StatusDot
    • P1: Color-only distinction (WCAG 1.4.1 violation) — ⚠️ needs design decision (shape differentiation)
    • P2: Hardcoded 8px/10px dimensions — size tier definitions (sm/md), overridable via xstyle
  • Text
    • P1: Truncation tooltip uses title attribute (inaccessible to keyboard/touch)
    • P1: useTruncation zero tests
    • P2: No multi-line clamp test
  • Token
    • P1: href + isDisabled doesn't remove href — Enter still navigates
    • P1: Remove button no hover feedback
    • P2: No test for href+onRemove combo
    • P2: No size="sm" test

Cross-cutting (fixed): Animation durations tokenized via PR #684. Skeleton radius cleanup via PR #690.

Activity

  1. added
    hardening
    on Mar 19, 2026
  2. added this to the Component Hardening milestone on Mar 19, 2026
  3. cixzhang commented on Mar 21, 2026

    @cixzhang
    Contributor

    ⚠️ Hardening Criteria — Read Before Fixing

    Hardening is about making existing components match our standards. It is NOT about adding new features or expanding API surface.

    What hardening fixes look like:

    1. Fix the bug — code is broken, fix it
    2. Fix a11y internally — WCAG/ARIA violations are component behavior. The component should do the right thing by default. Do not add props for ARIA attributes — XDSBaseProps already provides all aria-* through HTMLAttributes
    3. Match API guidance — component props should match the API Conventions wiki. If an input is missing a standard input prop (e.g. isRequired, isLoading), add it to match the family contract. Do not invent new props
    4. Use a token — hardcoded value has a matching design token, swap it. If no token exists and the value is overridable via xstyle, it's fine as-is
    5. Remove dead code — unused exports/styles/props, delete them
    6. Add tests — if a behavior exists but has no test coverage, add a test for it
    7. Match the spec — visual doesn't match design, fix to match

    Rules:

    • No new props for ARIA. Accessibility is component behavior. Fix it internally.
    • No new props for values overridable via xstyle. That's what xstyle is for.
    • No isBusy as a public prop. isLoading is the public prop, isBusy is internal (isLoading || optimisticValue !== value). One pattern, enforced consistently.
    • No onShow/onHide. Visibility callbacks use onOpenChange(isOpen: boolean) per API conventions.
    • No exposing internal IDs (inputID, labelID). Components wire ARIA ID relationships internally via useId.
    • No feature development. Sorting plugins, sticky headers, new variants, lightDismiss — these are RFCs, not hardening.

    When in doubt:

    If a finding is ambiguous — could be a bug fix OR a new feature — flag it for human review. Don't guess. Tag the assignee and describe the ambiguity.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    hardening

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions