Skip to content

F3: pseudo-row ARIA positions and full browser storage check (#52) - #90

Merged
DavidVFitzGerald merged 2 commits into
mainfrom
fix/52-tree-aria-storage
Nov 16, 2026
Merged

DavidVFitzGerald merged 2 commits into
mainfrom
fix/52-tree-aria-storage

Conversation

@DavidVFitzGerald

Copy link
Copy Markdown
Owner

Refs #52

Behaviour

  • Pseudo-row ARIA positions (AC1). Every process-tree pseudo row (loading, Load more, first-page error, later-page error, empty) is the last member of its branch's child set. aria-posinset is the number of rendered real children + 1. aria-setsize is -1 while the branch's load is incomplete, the same as its real siblings; otherwise it is the real children + 1, so an empty branch's row is 1 of 1. Real nodes are unchanged. This is the PM's default pattern, so no alternative needs justifying. The attributes now sit in TreeRow's shared props, so the five row kinds cannot drift apart. Nothing else in the tree changed: keyboard handling, focus, selection, paging, search and the roving tab stop are untouched.
  • Browser storage check (AC3). e2e/process-tree.spec.ts reads storage in the page after expanding five branches and before sign-out, and again after re-sign-in. It records localStorage keys and values, sessionStorage keys and the indexedDB.databases() names. It asserts that the key sets and database names are identical, that sessionStorage and IndexedDB are empty, and that no stored value contains expansion state. Expansion state means the expanded path segments (transport systems, operations, infrastructure) or the data-row-key of any expanded row. If indexedDB.databases is missing, the storage() helper throws, so the test fails instead of skipping. No product storage code was added.
    • Observed in both Chromium and Firefox, before and after: localStorage holds only lca-diff:mock-session:v1 (the mock auth session: uid, email, verified flag); sessionStorage []; IndexedDB [].

Evidence that the tests fail before the change

  • AC2: the five new tests in src/services/mock/process-tree.test.tsx ("process tree pseudo-row ARIA positions (F3: process tree pseudo-row ARIA positions and full browser storage check #52)") all failed on unmodified ProcessTree.tsx. In each case the level matched but aria-posinset/aria-setsize came back null. All 20 tests in the file pass after the change.
  • AC3 negative controls, as temporary copies of the spec that were not committed, in both browsers:
    • Deleting IDBFactory.prototype.databases through an init script fails with indexedDB.databases() is unavailable in this browser.
    • Writing "transport systems" into localStorage before the snapshot fails the not.toMatch(expansion) assertion.

Checks

Run in Compose project lca-diff-tree52; the results are in the #52 handoff comment.

Limitations

  • In Firefox, locator.evaluateAll on the expanded rows crashed the page ("Page crashed") on two runs in a row. The spec reads each row with locator.all() and getAttribute instead. This changes only how the test reads the rows, not what it asserts.
  • The check covers the mock build only. Real Firebase/IndexedDB persistence is still a Phase 2 integration check.

🤖 Generated with Claude Code

DavidVFitzGerald and others added 2 commits November 15, 2026 22:52
A Load more, loading, error or empty row is the last member of its branch's
child set: aria-posinset is the real children + 1 and aria-setsize is -1
while the branch is incomplete, else the real children + 1. Real nodes are
unchanged. Component tests assert exact positions for all five cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…52)

After expanding branches and before sign-out, then after re-sign-in, read
localStorage keys and values, sessionStorage keys and indexedDB.databases()
names; require identical key sets and database names and no stored tree
expansion state. A browser without indexedDB.databases() fails the test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@DavidVFitzGerald
DavidVFitzGerald merged commit ca68126 into main Nov 16, 2026
4 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.

1 participant