Skip to content

fix: enhance dropdown menu trigger styles for better accessibility an… - #750

Merged
pikann merged 2 commits into
masterfrom
fix/fix-failed-e2e-testings
Nov 14, 2026
Merged

pikann merged 2 commits into
masterfrom
fix/fix-failed-e2e-testings

Conversation

@pikann

@pikann pikann commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the mobile-safari failures in the e2e run 43557275321.

The options ("⋮" / "…") trigger on activity and comment entries in the shared activity pane was opacity-0 group-hover:opacity-100 and only 20px wide. Touch devices have no hover, so the button was invisible and too small to tap. This is a real mobile usability bug, and it made the two document-history e2e specs fail: the "updated content" entry rendered, but its menu never opened.

Changes

apps/web/src/components/shared/activity-pane.tsx, applied to both the comment menu and the activity-entry menu:

  • Always visible on coarse pointers (pointer-coarse:opacity-100).
  • Larger hit target on coarse pointers (pointer-coarse:size-8).
  • Visible on keyboard focus (focus-visible:opacity-100), so the control is reachable without a mouse.
  • Desktop behavior is unchanged: still revealed on hover.

Fixes

docs.spec.ts › Document history:

  • User can view what changed in a document update
  • User can revert a document update

Not changed

Four other tests (mfa, automation, environments, task-statuses) were flaky in that run, failing once on the post-sign-in "Good morning" heading 5s timeout and passing on retry. They look load-related and are out of scope here.

Testing

  • biome check and tsc -b pass for apps/web.
  • The e2e specs have not been re-run locally; verification is the CI e2e run on mobile-safari.

@pullfrog pullfrog Bot 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.

Important

The trigger styling is a real improvement for touch users, but opacity and hit-target size are not what blocks those two document-history specs. Please confirm against an actual mobile-safari run before merging under a "Fixes" claim.

Reviewed changes — the full diff of the single commit on this branch (1 file, 2 lines).

  • Comment-menu trigger (activity-pane.tsx:692) — always visible and 32px on coarse pointers, revealed on keyboard focus.
  • Activity-entry trigger (activity-pane.tsx:749) — same treatment for the "⋮" menu that hosts View diff / Revert.

⚠️ The failing assertion is a click that never opens the menu, so opacity cannot be the cause

In the cited run the force-click on the trigger succeeds on every retry and only the menuitem assertion fails, and the sibling comment-menu trigger — same opacity-0, same 20px, also never hovered on a phone — opens fine in that same mobile-safari run. That makes the "invisible and too small to tap" premise unsupported: these two specs most likely stay red after this change.

Technical details
# The CSS change does not explain the observed failure

## Affected sites
- `apps/web/src/components/shared/activity-pane.tsx:692`, `:749` — the only changed lines.
- `apps/e2e/tests/docs/docs.spec.ts:496-510` — `openUpdateEntryMenu`, the helper the two failing tests use.

## Evidence
- Run 43557275321 (`Playwright (mobile-safari)`) fails only on `getByRole('menuitem')` with `element(s) not found` (`docs.spec.ts:509`). The `trigger.click({ force: true })` inside the `toPass` callback never throws, so the click is dispatched and only the menu never opens.
- Playwright considers `opacity:0` elements visible and hit-testable, and `force: true` skips actionability including the hit-target check, so it dispatches at the center of a 20px box either way. `pointer-coarse` does match in this project (WebKit + `hasTouch`), so the utilities compile and apply — they just do not change click delivery.
- Control in the same run: `openCommentOptions` (`docs.spec.ts:622-627`) force-clicks the `activity-pane.tsx:692` trigger, untouched by this PR, and `User can edit their own comment` / `User can delete their own comment` pass. The failing specs click `:749`, which has no other coverage, but nothing about the two buttons differs in visibility or hit area.

## Required outcome
- No "Fixes ..." claim for these two specs without a green `mobile-safari` run showing it.
- If they still fail, the real cause needs its own look rather than being folded into this styling change.

## Suggested approach (optional)
- Keep the className change as a standalone touch a11y fix and drop the e2e framing, or land it together with a fix that targets the actual interaction.
- Leads for the real cause: Base UI `Menu.Trigger` opens on `mousedown` and its `mouseup` cancel-open guard can close the popup within the same gesture, and the retry loop at `docs.spec.ts:506-509` re-clicks a `toggle: true` trigger, so one attempt can close what a previous attempt opened. The run's trace / `error-context.md` artifacts should settle it.
- `docs.spec.ts:502-504` and `:620-621` still describe the trigger as hover-only and unnamed, which this change makes stale.

</details>

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes — the delta since the prior pullfrog review (commit 393b1a3):

  • Accessible names on both activity-pane menus — the comment-card MoreHorizontal and activity-entry MoreVertical triggers now carry aria-label={t("activityPane.actions")}, closing the unnamed-icon-button gap from the styling commit.
  • New activityPane.actions locale key — added to all nine shared.json bundles with localized values; key sets still match en for the locales.test.ts parity contract, and the typed shared resource in react-i18next.d.ts resolves.

The remaining inline concern is resolved, and the delta adds no behavioral risk: aria-label only changes the computed accessible name, so existing getByRole('button') locators in the e2e helpers still resolve to the same single element.

@pikann
pikann merged commit 967e384 into master Nov 14, 2026
2 checks passed
@pikann
pikann deleted the fix/fix-failed-e2e-testings branch November 14, 2026 07:22
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