Skip to content

Event list-row a11y nesting + share-link param encoding cleanups #65

Closed

Description

@Ardnived

Two small, independent event-surface cleanups surfaced (and dismissed as pre-existing) by the /finalize-pr code-review + security pass on #58.

1. Invalid list-row nesting (a11y)

List renders a <ul> whose direct children are the row components, each of which renders <Link> (an <a>) wrapping an <li> — so the DOM is <ul> > <a> > <li> and the <li> is not a direct child of the list. The List divider selector [&>*+*] therefore targets the <a> rather than the row. Screen-reader list-item semantics/counts become unreliable.

Carried over byte-identical from the deleted EventCard/RegionCard through the EventListItem/ListItem rename, so it's pre-existing, not a regression.

Fix: restructure to <li><Link className={listRow()}>…</Link></li>; confirm the List divider (inset-x-6) and the active:/hover: press-state still land correctly (the divider just moves to the <li>). Verify both stories + a region/event list in Ladle.
Files: src/components/molecules/EventListItem/EventListItem.tsx, src/components/molecules/ListItem/ListItem.tsx, src/components/molecules/List/List.tsx.

2. Share params use encodeURI (should be encodeURIComponent)

ShareContent does encodeURI(label)/encodeURI(url) then interpolates the result as query-param values (?u=${url}, ?text=${url}, ?body=${url}). encodeURI leaves & ? # / intact, so a value containing & can append a stray param to the third-party sharer URL.

Not exploitable — every outer scheme is fixed and safe (mailto:/facebook/x/linkedin/flipboard) so it can't change the scheme, and the copy field renders the URL as React-escaped text — but worth hardening.

Fix: use encodeURIComponent(label)/encodeURIComponent(url) for the query-string interpolations; add a test that a value with &/? round-trips encoded.
Files: src/components/molecules/ShareContent/ShareContent.tsx.

Activity

  1. added a commit that references this issue on Jul 21, 2026
    c82046c
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

    No labels
    No labels

    Type

    No type

    Fields

    Hold Until

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions