Skip to content

fix(e2e): hide ariaLabelledByElements in the Firefox journeys - #51

Merged
jonikanerva merged 3 commits into
mainfrom
fix/e2e-firefox-aria-reflection
Nov 27, 2026
Merged

jonikanerva merged 3 commits into
mainfrom
fix/e2e-firefox-aria-reflection

Conversation

@jonikanerva

@jonikanerva jonikanerva commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Purpose

The Firefox of Playwright 1.65.1 (Firefox 159.0, build 1572) crashes its content process when Playwright's utility world and the page's main world both read ariaLabelledByElements of one element. A role query with a name, then axe-core, on an element with aria-labelledby gives "Page crashed". This PR adds a Firefox-only workaround to the shared e2e fixture, the tests that compensate for it, lint rules that keep the fixture in front of every page, and the accepted scoped exception (ADR 0015, STACK.md §13).

Review results and conditions

Condition Answer
C1, equivalence scope ADR 0015 (Decision 4) and the §13 row now state: each slice that adds a page or a state with an axe check adds it to the equivalence test. The equivalence test now covers the pages and states of main after PR #48 (below).
C2 / F1, lint claim The rule is fixed, not the claim weakened. no-restricted-imports now covers e2e/** (every file, also a subdirectory and a helper) and allows type imports only from @playwright/test, playwright, playwright/test, and playwright-core. Only e2e/support.ts and e2e/playwright.config.ts are exempt. A new rule no-restricted-properties for e2e/** rejects newContext, launch, launchPersistentContext, launchServer, connect, connectOverCDP (any object), and browser.newPage outside e2e/support.ts. Mutations below. Known limits: see "Lint limits".
C3, date 2027-02-28 Open for the owner. No issue is created without the owner's authorisation (repository contract). The date stays in ADR 0015 and in the §13 row, as for the other dated exceptions of §13. The lead asks the owner about the issue. Round 2 agrees that C3 is open and not blocking.
C4, Accepted status ADR 0015 is "Accepted", 28 November 2026, decided by the lead within delegated authority, with the review and addendum URLs. The §13 row cites the ADR and names no reviewer.

How C2 changes the compensating evidence: the lint rules are now part of the evidence, with the limits stated. A new test, the context test, checks that a second page of the fixture context and a page of a context from newBrowserContext hide the property in Firefox. The other five tests are unchanged in what they prove; the equivalence test has more cases (C1), and each case now states whether its page has aria-labelledby, which the test checks.

Because .oxlintrc.json and the test code changed, the new head needs a delta review.

Lint limits (ADR 0015, corrected)

The rules find: a value import, default import, namespace import, or re-export from @playwright/test, playwright, playwright/test, or playwright-core in any file under e2e/ except e2e/support.ts and e2e/playwright.config.ts; a literal import() (no-restricted-imports); a plain require() (typescript/no-require-imports); the property names newContext, launch, launchPersistentContext, launchServer, connect, and connectOverCDP on any object, when named directly, with a string literal key, or in a destructuring pattern; and browser.newPage.

Known limits:

  • They do not find an import() with a computed module name, or a require function from createRequire. A literal import() fails no-restricted-imports, and a plain require() fails typescript/no-require-imports.
  • They do not find a computed property name, for example browser[name]() with const name = 'newContext'. In Firefox, a page of such a context does not get the workaround, and no check fails.
  • The rule for newPage names the object browser only. A Browser under another name, or reached through an expression such as page.context().browser(), can call newPage without a finding.

Checked with one throwaway spec (not committed) on head 21c211f, Oxlint 1.95.0 and tsc 7.0.2: await import('@playwright/test') fails no-restricted-imports; require('@playwright/test') fails typescript/no-require-imports; await import(specifier) with a const specifier, createRequire(import.meta.url)('@playwright/test'), and browser[method]() with const method = 'newContext' pass Oxlint and tsc.

Rebase onto main after PR #48

The branch is rebased onto 9a55902 (PR #48, login). This rewrote the history of this branch; the review SHA 0edb518 no longer exists on the branch.

  • login.spec.ts and auth-support.ts now take test, expect, and the helpers from support.ts.
  • Contexts in PR feat: web login, sessions, and the session guard (S2) #48: login.spec.ts uses context.newPage() on the fixture context (the page gets the init script, the context test proves it) and playwright.request.newContext() for an API request context with no page. The API call now goes through newRequestContext of support.ts, so that only support.ts calls newContext. No test of PR feat: web login, sessions, and the session guard (S2) #48 opened a browser context with browser.newContext() or a popup.
  • No luck dependency: with the fixture switched off, the Firefox journeys of login.spec.ts and smoke.spec.ts pass (21 passed). The reason: on main, the only element with aria-labelledby is the section of the not-found page (web/src/shell/NotFound.tsx). No journey runs axe or a main-world read on that page in Firefox. PR feat: web login, sessions, and the session guard (S2) #48 removed aria-labelledby from three sections; this PR does not restore it.

Facts and sources

Reproduction of all eight reflection properties (Firefox 159.0 build 1572, macOS arm64, two runs): only ariaLabelledByElements crashed. The other seven are not read by the utility world of Playwright 1.65.1, so their crash is "not reachable", not "proven absent". Firefox build 1584 (160.0), driven by Playwright 1.65.1, did not crash. Build 1575 was not tested locally.

Change (compared with main)

  • e2e/support.ts: exports test and expect; the context fixture adds the init script in Firefox; newBrowserContext, newRequestContext, firefoxExecutablePath, pinnedFirefoxBuild.
  • e2e/smoke.spec.ts, e2e/e4-cookie.spec.ts, e2e/login.spec.ts, e2e/auth-support.ts: imports from support.ts; login.spec.ts uses newRequestContext.
  • e2e/firefox-aria-reflection.spec.ts: the compensating tests.
  • .oxlintrc.json: the two overrides for e2e/** and the exemption for e2e/support.ts and e2e/playwright.config.ts.
  • docs/adr/0015-firefox-aria-reflection-workaround.md (Accepted), STACK.md §6 (browser builds) and §13 (exception row).

Files changed compared with 0edb518, apart from what main brought: .oxlintrc.json, e2e/support.ts, e2e/firefox-aria-reflection.spec.ts, e2e/login.spec.ts, e2e/auth-support.ts, e2e/smoke.spec.ts (merge of the import change with the login beforeEach of PR #48), docs/adr/0015-firefox-aria-reflection-workaround.md, STACK.md.

No application markup changes.

Equivalence cases (Chromium and WebKit, both colour schemes)

Protected start page; start page, unavailable state; start page, reload banner; not-found page (has aria-labelledby); login page; login page, wrong password; login page, throttled; login page, server unavailable; logout failure view. Each run starts with resetAuth and a new context. Result: equal in all 18 runs (9 cases × 2 engines).

Mutation results

Each mutation was applied to the working tree of the new code, run, and reverted. Runs on macOS arm64, E2E_PORT=4401.

# Mutation Guard Result
M1 Fixture inactive Regression test (Firefox) Fails: ariaLabelledByElements must be hidden in the main world, then page.evaluate: Page crashed
M2 Workaround also hides the aria-labelledby attribute from the main world Challenge test (Firefox) Fails: violations ["#resolved", "#missing"], expected ["#missing"]
M3 Same as M2 Equivalence test (Chromium, WebKit) Fails for the not-found page in both engines (2 failed, 16 passed): the duplicate-id-aria pass of #not-found-title is missing in both colour schemes. The other cases pass, because their pages have no aria-labelledby.
M4 web/src/mutation-probe.ts reads element.ariaLabelledByElements Source check Fails: web/src/mutation-probe.ts: ariaLabelledByElements
M5 FIXED_FIREFOX_BUILD = 1572 Removal guard Fails: "The pinned Playwright ships Firefox build 1572, which has the fix of Mozilla bug 2090055. Remove the workaround …"
M6 newBrowserContext does not apply the workaround Context test (Firefox) Fails: hasReflection expected false, received true (line 118)
L1 import test from '@playwright/test' in e2e/probe-default.spec.ts no-restricted-imports error eslint(no-restricted-imports): '@playwright/test' import is restricted
L2 import { test } from '@playwright/test' in e2e/sub/probe-sub.spec.ts no-restricted-imports Same error for e2e/sub/probe-sub.spec.ts
L3 Helper e2e/probe-helper.ts: export { test } from '@playwright/test' no-restricted-imports Same error for e2e/probe-helper.ts
L4 import { firefox } from 'playwright'; import * as core from 'playwright-core' no-restricted-imports Errors for 'playwright' and 'playwright-core'
L5 browser.newContext(), browser.newPage(), const { newContext } = browser, browser['newContext']() no-restricted-properties Four errors: 'newContext' is restricted (3) and 'browser.newPage' is restricted (1)

The type imports of the clean tree (import type { Page } from '@playwright/test') pass.

Verification

  • Head eaa714cbcf3afa2270b91385705f3143277ccd6c is a document-only commit on 21c211f (git diff 21c211f eaa714c --stat: only docs/adr/0015-firefox-aria-reflection-workaround.md, 18 insertions, 7 deletions). mise run lint on it: exit 0. No new full verify for this document-only commit; the full verify below is for 21c211f.
  • CI run 46065355410 on head 21c211f: ci, vuln, image-check green (round 2).
  • mise run verify on head 21c211f53dddc6b92dfb3d1de30d95f8d7dd679f (base 9a55902, clean tree), macOS arm64, TEST_DATABASE_URL of the Neon branch test, E2E_PORT=4401: exit 0. nextest 592 passed, 3 skipped; server tests (test-server) 199 passed, 1 skipped; doctests pass; Vitest 201 passed; Playwright 89 passed, 19 skipped (engine-specific tests skip in the other projects).
  • CI on the new head: see the checks of this PR. The ci job gives the Linux Firefox evidence.
  • Earlier CI run 46060523618 (head 0edb518): ci, vuln, image-check green.

Exception (accepted)

  • Scope: the Playwright project firefox of e2e/, Playwright 1.65.1, Firefox build 1572. Only ariaLabelledByElements.
  • Reason: Firefox 159 build 1572 crashes on the two-world read (Mozilla bug 2090055); no stable Playwright has the fixed build.
  • Consequence: in Firefox, axe does not check a reference that a script sets only through ariaLabelledByElements without the content attribute. The application sets none. A context that bypasses newBrowserContext through a gap of the lint rules does not get the workaround.
  • Compensating controls: the regression, challenge, context, equivalence, source-check, and removal-guard tests; the lint rules with their stated limits.
  • Responsible lead: the lead agent of the delivery task. Approving independent reviewer: qa-enforcer, review linked above.
  • Expiry: a stable Playwright release with Firefox build 1575 or later is older than 1440 minutes, or 2027-02-28, whichever comes first. The removal guard enforces the first condition when the pin changes. The date has no check (C3).

Unverified

  • Whether a stock Firefox 159 crashes for a real user on a page with aria-labelledby, for example with a browser extension that reads the property in a second world. The addendum gives a test procedure; not run.
  • Build 1575 was not run locally; the threshold rests on Playwright PR 43982 and its triage result.
  • Whether the other seven reflection properties crash when two worlds read them.
  • A frame or a popup page of a fixture context was not tested; the context test covers a second page of the context.
  • The mutations ran on macOS arm64 only.

vuln input

This PR changes no vuln input and no image input. No new dependency; the Playwright pin is unchanged.

Follow-up (not in this PR)

PR #48 removed aria-labelledby from three sections as a reaction to this crash. The slice that restores it must (round 2 review):

  • set labelledBy: true for each restored page in the equivalence test;
  • show equal axe results with and without the deletion in Chromium and WebKit for those pages;
  • run the mutation with the fixture off, so that a real Firefox journey crashes and the fixture is shown to carry load;
  • update the four stale comments that say the root cause of the crash is not known: web/src/auth/LoginFormView.tsx:34, web/src/auth/RouteUnavailable.tsx:12, web/src/auth/LogoutFailureView.tsx:22, web/src/routes/index.tsx:20.

Note (N3 of round 2): e2e/tsconfig.json includes only top-level *.ts files. Oxlint checks a spec in a subdirectory, but tsc does not type-check it. This does not affect the workaround.

🤖 Generated with Claude Code

@jonikanerva jonikanerva left a comment

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.

Verdict: PASS

Independent review (qa-enforcer, separate context). The review covers head 0edb518ae44f3d0a13cb537c2661afef8cebe257 with base 6d84065b2314f836eaee104727d8e2204f9e5f1b. The base is an ancestor of the head. Thus the tested tree is the head.

Exception approval

I approve the scoped exception of ADR 0015 and the new STACK.md §13 row, as they are at this head. The approval covers only the Playwright project firefox, Playwright 1.65.1, Firefox build 1572, and the property ariaLabelledByElements. Expiry: as the ADR states (a stable Playwright with Firefox build 1575 or later that is older than 1440 minutes, or 2027-02-28).

The basis for the approval is the five tests of e2e/firefox-aria-reflection.spec.ts: regression, challenge, equivalence, source check, and removal guard. The lint rule is not part of the basis (see finding F1).

The lead records the acceptance in ADR 0015 with this review URL, as for ADR 0011. A status-only edit of the ADR is a document delta. A change of .oxlintrc.json (F1) changes a gate. That change needs lint, verify, CI, and a delta review on the new head.

Reviewer verification (P9)

  • Environment: macOS arm64, a detached worktree at the head, mise trust, mise run setup, TEST_DATABASE_URL of the Neon branch test (from .env.test, not printed), E2E_PORT=4417, nice -n 19.
  • mise run verify: exit 0. nextest 492 passed, 2 skipped. Server tests (test-server) 99 passed. Doctests pass. Vitest 49 passed. Playwright 36 passed, 12 skipped. The four Firefox tests and the eight equivalence tests (Chromium, WebKit) pass.
  • CI run 46060523618, event pull_request, head 0edb518: ci, vuln, and image-check are green.

Challenge checks by the reviewer

  • M1 (fixture inactive), Firefox regression test: fails with page.evaluate: Page crashed, after the soft check "ariaLabelledByElements must be hidden in the main world". The workaround is reverted after the run.
  • Fix threshold 1575: Playwright PR 43982 (roll to r1575) patches Element::GetAttrAssociatedElementsForBindings in dom/base/Element.cpp (aUseCachedValue && guard). In Playwright issue 44135, the triage bot reports that the crash cases pass with build 1575. FIXED_FIREFOX_BUILD = 1575 thus has primary-source support.
  • Pin is current: npm view @playwright/test dist-tags gives latest 1.65.1 and next 1.66.0-alpha-2026-11-27. browsers.json of playwright-core 1.65.1 gives Firefox revision 1572.
  • Linux crash: the CI job 140692284877 (branch feat/battery-view) shows six [firefox] failures with "Page crashed".
  • Tool behaviour: the getIdrefsValue function of axe-core 4.14.1 reads the property first. When the value is null or undefined, the function falls back to the aria-labelledby attribute. playwright-core 1.65.1 lib reads only ariaLabelledByElements of the reflection properties (getAriaLabelledByElements). Both claims are correct.
  • Built bundle: web/dist of the head names no aria*Element(s) property. The source check does not scan third-party code, but the bundle has no such read now.
  • Dependency freshness (P7): the last recorded mise run deps run is in PR #46 (27 November 2026), within 7 days. The PR changes no pin.

Findings

F1 (non-blocking): the lint rule has gaps, and three records overstate it.

  • Location: .oxlintrc.json (override e2e/*.spec.ts), PR body ("a new spec ... cannot skip the fixture"), ADR 0015 Decision 2, STACK.md §13 row ("the lint rule that every spec imports test from e2e/support.ts").
  • Evidence (scratch worktree, reverted):
    • import test from '@playwright/test' in e2e/x.spec.ts passes Oxlint and tsc. @playwright/test has a default export (export default test). playwright test --list runs the spec.
    • e2e/sub/x.spec.ts with import { test } from '@playwright/test' passes Oxlint. The files glob does not match subdirectories, but testMatch: '*.spec.ts' finds the spec.
    • A helper file e2e/h.ts that re-exports base from @playwright/test is not in the scope of the rule.
    • The named and namespace imports fail correctly.
  • Impact: low. A spec without the fixture runs stock Firefox. Such a spec either has the full axe check or crashes loudly, so it cannot hide a failure. The records claim more enforcement than the rule gives.
  • Minimum fix: "files": ["e2e/**/*.spec.ts"] and "importNames": ["default", "test", "expect"]. I tested this change in the scratch worktree with Oxlint 1.95.0. The default import and the subdirectory spec then fail, and the clean tree passes. Also state the helper-file gap in ADR 0015 and in §13, or remove the claim that the rule is a compensating control.
  • Verify: mise run lint with the two probe specs above must fail. Then run mise run verify and CI on the new head.

Limitations (not verified by the reviewer)

  • I did not run mutations M2 to M5 and the lint mutation of the PR body. They come from the PR record.
  • My run was on macOS arm64 only. The Linux evidence is the CI job.
  • No check enforces the expiry date 2027-02-28. The lead reassesses on that date.
  • I did not read the Bugzilla status of bug 2090055 myself. The 1575 threshold rests on the patch and the bot result above.
  • Build 1575 was not run locally, by the PR or by me. Only build 1584 was run by the implementer.
  • A context that a test opens with browser.newContext() does not get the workaround (as documented). After a rebase, PR #48 login.spec.ts fails the new lint rule, because it imports test from @playwright/test. The lead must check its contexts.
  • This PASS does not approve a merge where an owner reservation applies. The lead owns acceptance.

Reviewed: PR #51 @ 0edb518 (base 6d84065, round 1)

@jonikanerva

Copy link
Copy Markdown
Owner Author

Addendum to the PASS review of PR #51 @ 0edb518 (base 6d84065). The verdict does not change. This comment adds the decisions that the review did not state.

Authority

The exception is within the delegated authority of the lead. It changes only test code, a lint rule, and documents. It adds no cost, no provider, and no data flow. It does not change the product or a product check. All axe rules and all three engines stay. The Firefox axe check loses only references that a script sets through ariaLabelledByElements without the content attribute. The application sets no such reference. It does not need the owner.

Conditions of the approval

  1. C1, equivalence scope. The equivalence test covers only the pages and states of smoke.spec.ts. ADR 0015 does not state that later slices must extend the test. Add one sentence to ADR 0015 (Decision or Consequences) and to the §13 row: "Each slice that adds a page or a state with an axe check adds the page or state to the equivalence test." This is a document-only change. The lead checks the delta.
  2. C2, lint claim (F1). Fix the rule as F1 states, or remove the claim that the lint rule is a compensating control from the PR body, ADR 0015, and the §13 row. A change of .oxlintrc.json needs lint, verify, CI, and a delta review on the new head.
  3. C3, expiry date. No check enforces 2027-02-28. This is acceptable for a test-only exception, because the removal guard covers the main condition. The lead must carry the date in a GitHub issue with that due date.
  4. C4, Accepted status. The plan is acceptable: one document-only commit sets ADR 0015 to "Accepted", names the decider (lead) and this review as the approval, and folds in C1 (and C2 when C2 is only text). The lead checks that delta. Without a .oxlintrc.json change, no new full review round is necessary.

Effect on what the checks prove

  • axe-core 4.14.1 (getIdrefsValue) uses the content attribute when the property is absent. Playwright 1.65.1 reads no other reflection property in its utility world, so the other properties need no deletion now. A Playwright update that reads another property shows as a Firefox crash in the journeys, not as a silent pass.
  • The built web/dist holds React, TanStack Router and Query, and Zod. It names no aria*Element(s) property. Thus no application or dependency code can detect the deletion by that name. A computed property name is not checked. That gap is the same as the Oxlint gap of a computed import(x).
  • The fixture uses context.addInitScript (e2e/support.ts). The Playwright documentation states that such a script runs in every page and frame of the context after each navigation, before page scripts. Thus a popup of that context also gets it. I did not test a frame or a popup. A context from browser.newContext() does not get it (ADR 0015, Consequences). See the note about login.spec.ts of PR feat: web login, sessions, and the session guard (S2) #48.

The user question (not verified)

The question is open: can a stock Firefox 159 crash on an application page with aria-labelledby for a real user? An extension content script runs in an isolated world. Such a script that reads the property could cause the same two-world read. Recommendation: the product does not react now. There is one user. A crash of one tab is visible and recoverable. The data path does not depend on the browser. Firefox 163 contains the fix. Evidence that settles the question: open the deployed page in a stock Firefox 159 with a small test extension. The content script of the extension reads ariaLabelledByElements of the labelled element after the page script reads it. If the tab crashes, report the result to the owner, with the option to label the element through aria-label or a <label> until Firefox 163.

Reviewed: PR #51 @ 0edb518 (base 6d84065, round 1, addendum)

jonikanerva and others added 2 commits November 28, 2026 03:34
The Firefox of Playwright 1.65.1 (Firefox 159.0, build 1572) crashes its
content process when the utility world of Playwright and the main world
of the page both read ariaLabelledByElements of one element (Mozilla bug
2090055). A role query with a name followed by axe-core triggers the
crash. CI on linux/amd64 crashed six Firefox journeys of the battery
view for this reason.

The shared fixture of e2e/support.ts now deletes the property from
Element.prototype in the main world, in the Firefox project only. axe
then reads aria-labelledby from the content attribute. Chromium and
WebKit run unchanged. Only ariaLabelledByElements is deleted, because
the utility world of Playwright 1.65.1 reads no other reflection
property, and a reproduction crashed for no other property.

support.ts is the only e2e file that imports values from Playwright and
opens a context. A further browser context comes from
newBrowserContext, which applies the same workaround. Two lint rules for
e2e/** enforce this: no-restricted-imports allows type imports only from
the Playwright modules (also for a default import, a re-export, a spec
in a subdirectory, and a helper file), and no-restricted-properties
rejects newContext, launch, connect, and browser.newPage. The login
journeys and auth-support.ts now take test, expect, and the request
context helper from support.ts.

firefox-aria-reflection.spec.ts holds the compensating evidence: the
regression test of the two-world read, an axe challenge test with a
missing and a resolved reference, a context test of newBrowserContext,
an axe equivalence test in Chromium and WebKit on each page and state
with an axe check, a check that the application source uses no hidden
property, and a removal guard that fails when the pinned Playwright
ships Firefox build 1575 or later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workaround of the Firefox journeys is a scoped exception under the
Exceptions section of DOCTRINE.md. An independent reviewer approved it
in PR #51 with conditions. The ADR records the approval, the lint rules
and their known limits, the context helper, and the rule that each
slice adds its pages and states with an axe check to the equivalence
test. The STACK.md section 13 row states the same scope and evidence.

STACK.md section 6 names the browser builds of the pinned Playwright,
because the removal condition depends on the Firefox build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonikanerva
jonikanerva force-pushed the fix/e2e-firefox-aria-reflection branch from 0edb518 to 21c211f Compare November 27, 2026 20:41

@jonikanerva jonikanerva left a comment

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.

Verdict: FAIL (documentation only; the code, the tests, and the lint rules pass)

Independent delta review (qa-enforcer, separate context), round 2. Head 21c211f53dddc6b92dfb3d1de30d95f8d7dd679f, base 9a55902065870780d701c0779cc1e32381eeda44. The base is an ancestor of the head. The tested tree is the head.

The FAIL has two causes. Both are text in ADR 0015 and the PR body. One documentation commit fixes both (minimum fix below). The code needs no change.

Delta since round 1

Round 1 reviewed git diff 6d84065 0edb518. The object 0edb518 still exists locally. I compared it with git diff 9a55902...21c211f and read every new or changed line.

  • New since round 1: .oxlintrc.json (e2e/** scope, four Playwright modules with allowTypeImports, the rule no-restricted-properties, the exemption of e2e/support.ts and e2e/playwright.config.ts); e2e/support.ts (newBrowserContext, newRequestContext, value imports only here); e2e/firefox-aria-reflection.spec.ts (context test, nine equivalence cases, the labelledBy flag); e2e/login.spec.ts and e2e/auth-support.ts (imports from support.ts, newRequestContext); e2e/smoke.spec.ts (merge with the login beforeEach of PR #48); ADR 0015 (Accepted, decisions 2 to 4, limits); STACK.md §6 browser builds and the §13 row.
  • Not changed: application source, Dockerfiles, mise tasks, CI files, scripts, package.json, pnpm-lock.yaml. The Playwright pin stays 1.65.1. The browser builds in STACK.md §6 (Chromium 1255, Firefox 159.0 build 1572, WebKit 2388) equal browsers.json of playwright-core 1.65.1.

What I ran

Environment: macOS arm64, this detached checkout at the head (real path, no symlink), mise trust, mise run setup (exit 0), nice -n 19, E2E_PORT=4423.

  • mise run lint: exit 0. The lint task runs Oxlint over packages web e2e and tsc of e2e/tsconfig.json. verify → checks → lint, and the CI job runs mise run ci → checks → lint. So the rules run in verify and in CI.
  • mise run test-web: exit 0. Vitest 201 passed. Playwright 89 passed, 19 skipped (three engines). The five Firefox tests and the 18 equivalence runs (9 cases × Chromium, WebKit) pass.
  • CI run 46065355410 (event pull_request, head 21c211f): ci, vuln, image-check pass.
  • I did not run the full mise run verify. This delta changes test code, a lint configuration, and documents. It is not a data-path, security, or release-path change (DOCTRINE.md P9). I rely on the implementer's recorded verify on 21c211f (exit 0, PR body) and on the CI run above. I found no reason to run it myself.

Mutations (each reverted; tree clean after)

# Mutation Result
R1 Fixture inactive, Firefox project, all specs 3 failed: the regression test (must be hidden, then Page crashed), the challenge test, the context test. 24 passed: login 14, smoke 7, e4 1, source check, removal guard.
R2 newBrowserContext without the workaround The context test fails at line 118 (hasReflection true). The other Firefox tests pass.
R3 labelledBy false for not-found, true for login page Both cases fail at line 286.
R4 The treatment also removes the aria-labelledby attributes Not-found fails at line 290 in Chromium and WebKit: 12 passes are missing (aria-*-attr, duplicate-id-aria).

Lint bypass table (Oxlint 1.95.0 and tsc 7.0.2, probe files under e2e/, removed)

Probe Lint Status
import test from '@playwright/test' fails enforced
import * as pw from '@playwright/test' fails enforced
export { test } from / export * from '@playwright/test' in a helper fails enforced
e2e/sub/x.spec.ts with a value import fails enforced
playwright, playwright/test, playwright-core fails (also tsc: not resolvable) enforced
@playwright/test/reporter, playwright-core/lib/server tsc fails (no value test; not resolvable) enforced by tsc
import type { test } used as a value tsc TS1361 enforced by tsc
require('@playwright/test') fails (typescript/no-require-imports) enforced
createRequire(import.meta.url)('@playwright/test') passes listed ("require()")
await import('@playwright/test'), literal fails (no-restricted-imports) enforced; ADR says it is a gap (B2)
await import(specifier), const variable passes listed ("dynamic import()")
b = browser; b.newContext() fails enforced
context.browser()?.newContext() fails enforced
const { newContext } = browser, also renamed fails enforced
browser['newContext'](), literal key fails enforced
browserType.launch() fails enforced
b.newPage(), page.context().browser()?.newPage() passes listed ("names the object browser only")
Reflect.apply(browser.newPage, …), browser.newPage.bind fails enforced
const method = 'newContext'; browser[method]() passes, also tsc not listed (B1)

Findings

Blocking

B1. An unlisted lint gap. docs/adr/0015-firefox-aria-reflection-workaround.md:85 says that the rule fails on newContext "of any object". The limits list (lines 125 to 133) does not name a computed property name. const method = 'newContext'; await browser[method]() in a spec passes Oxlint and tsc. In Firefox, a page of that context does not get the workaround, and no check fails. This is outside the listed limits. Impact is low: such a page has the full axe check or crashes loudly. No rule can catch a computed key. So the fix is the text, not the rule.

B2. A false statement about the limits. docs/adr/0015-firefox-aria-reflection-workaround.md:128 and the C2 row of the PR body say that the rules do not find a dynamic import() or a require(). A literal import('@playwright/test') fails no-restricted-imports. A plain require() fails typescript/no-require-imports. Only a computed specifier and createRequire pass. The statement understates the enforcement, but it is false as written.

Minimum fix (one documentation commit): replace the limits in ADR 0015 and in the PR body with:

  • They do not find an import() with a computed module name, or a require function from createRequire. A literal import() fails no-restricted-imports, and a plain require() fails typescript/no-require-imports.
  • They do not find a computed property name, for example browser[name]() with const name = 'newContext'.
  • The rule for newPage names the object browser only. A Browser under another name, or reached through an expression such as page.context().browser(), can call newPage without a finding.

Add the URL of this review to the status line of ADR 0015. The STACK.md §13 row refers to the ADR for the limits and needs no change. This is a document-only delta. The lead checks it against this text and records the check on the PR. It needs no new independent review round and no new full verify. CI must be green on the new head.

Non-blocking

  • N1 (outside the diff). web/src/auth/LoginFormView.tsx:34, web/src/auth/RouteUnavailable.tsx:12, web/src/auth/LogoutFailureView.tsx:22, and web/src/routes/index.tsx:20 say that the root cause of the crash is not known. ADR 0015 now records it. The slice that restores aria-labelledby updates these comments.
  • N2. The equivalence result is a projection: rule id, target, impact, and each check id with its message. It does not compare data or relatedNodes. For this exception the projection is enough, because R4 shows that it detects a change of the aria-labelledby results.
  • N3. e2e/tsconfig.json includes *.ts only. Oxlint checks a spec in a subdirectory, but tsc does not type-check it. This does not affect the workaround.

Answers to the review questions

  • Fixture and helpers. A page of the fixture context, a page from context.newPage(), and a page of a newBrowserContext context get the init script. The context test proves the second and third cases, and R2 shows that it can fail. newRequestContext returns an APIRequestContext, which has no page. Frames and popups are not tested (stated in the PR).
  • Equivalence (C1). The nine cases equal the eight states that smoke.spec.ts (lines 56, 67, 77) and login.spec.ts (lines 146, 219, 235, 248, 359) check with axe, plus the not-found page. Each case waits for a visible sign of its state. Violations, passes, and incomplete results are compared in both colour schemes, with and without the deletion. Only the not-found page has aria-labelledby. So, on this head, the equivalence test gives one real-page proof of the attribute fallback. For the other eight pages it proves only that the deletion has no side effect. The exception still rests mainly on the routed regression and challenge tests. That is enough for the approval, because no other page has the attribute, and an element without the attribute cannot hit the crash or lose a check. The slice that restores aria-labelledby must: set labelledBy: true on each restored case; show the equal axe result in Chromium and WebKit; and run a fixture-off mutation that crashes a real Firefox journey, so that the fixture is shown to carry load.
  • Login journeys without the fixture. R1 confirms the claim: login 14 and smoke 7 pass, which equals the implementer's 21. The logic is right. The crash needs one element with aria-labelledby, a utility-world read of its name, and a main-world read of the same element. On main only web/src/shell/NotFound.tsx:7 has the attribute. The not-found journey (e2e/smoke.spec.ts:80 to 84) queries a heading, not the region, and runs no axe. No journey reads both worlds on that element. So the pass does not depend on luck.
  • C3. Open and not blocking. The lead may not create the issue without the owner. The date stays in ADR 0015 and the §13 row, as for the other dated exceptions. The removal guard enforces the main condition when the pin changes. I do not recommend a test that fails after 2027-02-28: it reads the ambient clock (DOCTRINE.md P5), it is not repeatable, and it turns every unrelated PR red on that date, also an urgent fix. The lead must ask the owner about the issue and report C3 as open in the completion report.

Conditions

Condition State
C1 Met. ADR 0015 decision 4, the §13 row, and the comment of the case list.
C2 Met for the rules (all three round-1 gaps fail now). The limits text has B1 and B2.
C3 Open, not blocking (above).
C4 Met. ADR 0015 is "Accepted" with the round-1 URLs. The §13 row names no reviewer (P8).

Exception approval

My approval of the exception of ADR 0015 from round 1 holds for this head, including the new compensating evidence (the context test, the extended equivalence test, the lint rules), on one condition: the limits text is corrected as in B1 and B2. The approval covers the text after that fix. It does not cover the current lines 125 to 133.

Gaps

  • macOS arm64 only. The Linux evidence is the CI run.
  • No frame or popup of a fixture context was tested.
  • Build 1575 was not run.
  • The user-crash question of the round-1 addendum stays open.

Reviewed: PR #51 @ 21c211f (base 9a55902, round 2, delta)

The delta review of PR #51 found two wrong statements about the lint
rules. A literal import() and a plain require() of a Playwright module
fail the lint, so they are not gaps. A computed module name, a require
function from createRequire, and a computed property name such as
browser[name]() pass the lint and tsc, so they are gaps. The ADR now
states what the rules find and lists these gaps. The status line names
the delta review, which keeps the approval on the condition of this
correction.

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

Copy link
Copy Markdown
Owner Author

Lead acceptance of head eaa714cbcf3afa2270b91385705f3143277ccd6c

  • Reviews: round 1 (PASS, exception approved with conditions C1 to C4, own full mise run verify) and the delta review of head 21c211f (code, tests, and lint rules correct; FAIL on two statements of ADR 0015; the exception approval holds on the condition of the corrected limits; the lead checks a document-only commit).
  • Delta: git diff 21c211f eaa714c changes docs/adr/0015-firefox-aria-reflection-workaround.md only (18 insertions, 7 deletions). The lead read it: the limits list states the computed property name, the computed module name, and createRequire; the false statements about a literal import() and a plain require() are gone; the status line names the delta review. The implementer verified the five statements with a throwaway spec.
  • Checks: the implementer's full mise run verify passed on 21c211f; ci, vuln, and image-check are green on this head. The base is the current main 9a55902.
  • Release: the PR changes no watch path of a Railway service, so the merge starts no deployment.
  • Condition C3 stays open for the owner: no issue exists for the date 2027-02-28, because the lead creates backlog items only with the owner's authorisation. The date is in ADR 0015 and in STACK.md section 13.

Follow-ups for the slice that restores aria-labelledby are in the PR body.

@jonikanerva
jonikanerva merged commit bf6a6ed into main Nov 27, 2026
3 checks passed
@jonikanerva
jonikanerva deleted the fix/e2e-firefox-aria-reflection branch November 27, 2026 21:08
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