Skip to content

fix(hub-ui): prevent hidden dock elements from receiving input - #492

Merged
antfu merged 4 commits into
devframes:mainfrom
tonoizer:fix/floating-dock-pointer-accessibility
Nov 18, 2026
Merged

antfu merged 4 commits into
devframes:mainfrom
tonoizer:fix/floating-dock-pointer-accessibility

Conversation

@tonoizer

Copy link
Copy Markdown
Contributor

Summary

The embedded floating dock fades its centered brand mark with opacity, which leaves the decoration eligible for pointer hit testing. Its minimized control wrappers also remain exposed to accessibility queries and keyboard focus after pointer events are disabled.

  • Make the decorative brand mark ignore pointer input and hide it from accessibility tools.
  • Make both the Unauthorized controls and trusted dock controls inert and aria-hidden while minimized.
  • Keep the dock expanded while a control holds keyboard focus, so inactivity cannot remove focus during keyboard use.
  • Add browser regressions for horizontal and vertical center clicks, the shadow-root hit stack, hidden controls, tab order, focus across inactivity, hover restoration, and dragging. The tests use the real embedded custom element and mock only its transport context.

Testing

  • pnpm lint
  • pnpm knip
  • pnpm test --run: 1,847 passed, 26 skipped; no type errors
  • pnpm typecheck: 43 tasks passed
  • pnpm build: 29 tasks passed
  • pnpm exec playwright test --workers=4: all 31 Chromium tests passed
  • All 10 new dock tests passed three times with four parallel workers (30 passes).
  • Independent review, including a second review after adding focus retention.

Validation ran on Windows with Node 24.19.0 and the repository's pnpm 12.18.0. The unit suite used a temporary directory outside the user-home tree so package-manager detection in the existing onboarding tests did not inherit a home-level Yarn configuration.

Risks

Runtime browser coverage is Chromium-only. The focused fixture exercises the shared embedded dock directly; it does not add separate React and Vue application fixtures. Existing opacity transitions, hover reveal, and dragging remain covered.

@vercel

vercel Bot commented Nov 13, 2026

Copy link
Copy Markdown

@tonoizer is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

👁️‍🗨️ Review this pull request with grouped, summarized diffs at:
👉 https://pulls.review/gh/devframes/devframe/492?from=github-actions[bot]

raw result

💭 analyzed by vercel-ai-gateway/anthropic/claude-sonnet-5
🕰️ 2026-11-18 00:41 UTC
🔗 head 4cc85a0
🤖 automated by pulls.review

{
  "headSha": "4cc85a0224b355eec4484312875242ee1a26a63a",
  "result": {
    "overallSummary": "This PR fixes an accessibility/input-handling bug in the embedded floating dock: the fading brand-mark decoration could still receive pointer hits, and minimized control wrappers stayed reachable by screen readers and keyboard focus. It also keeps the dock expanded while a control is focused, and adds Playwright e2e regression tests against the real custom element to lock in the fix. An unrelated `prepare` script tweak was carried over from a merged branch.",
    "groups": [
      {
        "key": "dock-fix",
        "label": "Dock input/focus fix",
        "summary": "Fixes the floating dock so decorative elements no longer intercept pointer input, minimized controls are removed from the accessibility tree and tab order via `inert`/`aria-hidden`, and the dock stays expanded while a control holds keyboard focus instead of collapsing from inactivity.",
        "category": "ui",
        "filePaths": [
          "packages/hub-ui/src/client/components/dock/Dock.vue"
        ],
        "critical": true,
        "fileNotes": [
          {
            "path": "packages/hub-ui/src/client/components/dock/Dock.vue",
            "text": "Adds `pointer-events-none`/`aria-hidden` to the decorative brand mark, `inert`/`aria-hidden` to the minimized control wrappers, and keeps `isMinimized` false while the dock has focus within it.",
            "critical": true
          }
        ]
      },
      {
        "key": "dock-e2e-tests",
        "label": "Dock e2e regression tests",
        "summary": "Adds Playwright browser tests exercising the real embedded dock (centered-click hit testing, shadow-root hit stack, hidden/minimized controls, tab order, focus retention through inactivity, hover restoration, and dragging), plus a small fixture app/page serving it; the knip entry list is updated so the fixture script isn't flagged as unused.",
        "category": "tests",
        "filePaths": [
          "tests/e2e/floating-dock.spec.ts",
          "tests/e2e/_support/floating-dock/index.html",
          "tests/e2e/_support/floating-dock/main.ts",
          "knip.jsonc"
        ],
        "fileNotes": [
          {
            "path": "tests/e2e/floating-dock.spec.ts",
            "text": "Uses a temporary Vite dev server plus Playwright's clock to simulate the inactivity timeout and verifies behavior across both trusted and unauthorized, horizontal and vertical dock configurations."
          }
        ]
      },
      {
        "key": "chore-build",
        "label": "Build/package chores",
        "summary": "Unrelated chore carried over from a merge: runs `simple-git-hooks` directly in the `prepare` script instead of via `npx`.",
        "category": "build",
        "filePaths": [
          "package.json"
        ],
        "critical": false
      }
    ],
    "schemaVersion": 1,
    "source": "llm",
    "generatedAt": "2026-11-18T00:41:47.246Z",
    "model": "vercel-ai-gateway/anthropic/claude-sonnet-5",
    "locale": "en"
  }
}

SaKaNa-Y and others added 3 commits November 16, 2026 14:32
@antfu
antfu merged commit 3690113 into devframes:main Nov 18, 2026
14 of 15 checks passed
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.

4 participants