Skip to content

Follow-up to #248: Affinity Debug toggle broken + reversed carets; group-row aria-expanded on mobile #254

Closed

Description

@dborup

Follow-up from the review of #248 (#189 group caret, merged as c12aa60b). Both items were outside that PR's scope. Line numbers refer to master c12aa60b.

1. Node page "Affinity Debug" toggle cannot open, and its carets are reversed

public/nodes.js:920: the <h4> heading of the #node-affinity-debug card has an inline onclick. That onclick is a double-quoted attribute, but it contains the Phosphor sprite markup with its own double quotes (class="ph-icon", aria-hidden="true"). The browser therefore cuts the attribute off at the first inner ". The handler that remains is not valid JavaScript (reported as "Invalid or unexpected token"), so clicking the heading does nothing, and the debug body stays hidden.

The break came with the emoji-to-Phosphor migration (30627454, upstream #1648 M2), the same change that caused #189.

The carets also contradict the convention #248 chose (collapsed = caret-right, expanded = caret-down): the toggle shows caret-down while collapsed and caret-up while open.

The card is only shown when debugAffinity is enabled (client config or the local-storage flag), which is probably why nobody noticed.

Expected:

  • the heading toggles the debug body;
  • collapsed shows caret-right and expanded shows caret-down;
  • the toggle is a delegated handler instead of an inline onclick with nested markup;
  • ideally the heading is a <button> with aria-expanded, or follows the same pattern as the packets group rows.

Tests:

  • a unit test that renders the card and asserts that the toggle opens and closes and the caret follows;
  • a mutant check: put the old inline markup back and the test must fail.

2. Packets group rows announce aria-expanded on mobile, but activation selects instead

public/packets.js:2444 (from #248) sets aria-expanded on multi-observation group rows. On mobile, public/mobile-page-actions.js (upstream #1461 #7) rewrites data-action="toggle-select" to select-hash on click, and the expand column is hidden. A screen-reader user therefore hears "collapsed" on a row that opens the detail pane instead of expanding.

This is a minor a11y issue and not a blocker. Options:

  • drop aria-expanded (or render the row with select-hash) under the mobile breakpoint, so the announced state matches what activation does;
  • or keep the attribute and document why.

Tests: a narrow-viewport E2E (or a unit test with isMobile() stubbed) asserting that the row has no aria-expanded when activation selects.

Not in scope

Evidence

Activity

  1. added
    bugSomething isn't working
    type:bugSomething broken
    on Oct 5, 2026
  2. added a commit that references this issue on Oct 5, 2026
  3. dborup commented on Oct 5, 2026

    @dborup
    OwnerAuthor

    Fixed by #255 (merged as 3bb2cb89).

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

    bugSomething isn't workingtype:bugSomething broken

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions