Skip to content

fix(site/src/modules/notifications): expose inbox notifications as a list - #31602

Merged
bartekgatzcoder merged 2 commits into
mainfrom
a11y/aria-state-property-missing-2
Nov 1, 2026
Merged

bartekgatzcoder merged 2 commits into
mainfrom
a11y/aria-state-property-missing-2

Conversation

@jeremyruppel

Copy link
Copy Markdown
Collaborator

Each inbox notification had role="menuitem", but there was no role="menu" owner and no menu keyboard model. NVDA therefore could not announce a notification's position, such as "1 of 6". Notifications are content with their own links and buttons, not menu commands. They are now role="listitem" inside a role="list" named "Notifications", and screen readers get the set size and position from the list.

"Load more" now sits outside the list, so the list owns only list items. When it shows, the list gets a bottom border, so the separator above it looks the same as before.

Closes DEQ-533

Ticket UI surface
DEQ-533 Notifications inbox popover (navbar bell)

No screenshots: the change only touches roles. The separator above "Load more" is unchanged, and the new InboxPopover/WithLoadMore story lets Pixel capture it.

Grouping and decision log
  • Batch aria-state-property-missing has two tickets with different root causes. DEQ-144 (breadcrumb aria-current) is in a separate PR.
  • List instead of menu: role="menu" would require arrow-key roving focus, and a menu's owned elements can only be menu items, which rules out the "Load more" button. It would also wrap interactive action links in menu items. List semantics match what the popover is and give the requested "n of N" announcement.
  • div role="list" instead of <ul>: this keeps the existing markup and styles. oxlint's no-redundant-roles rule would reject <ul role="list">, and Safari can drop list semantics from <ul> elements with list-style: none.
  • The InboxItem story wraps the item in role="list" so axe aria-required-parent passes when the item renders on its own.
  • Play-function queries go through the named list, so list items inside notification markdown or a toaster cannot shift the index.
  • Self-review: frontend-deep-review flagged a structure-only Vitest (FE1/TS2) and a missing Load more story (TS1/TS7). I removed the test and added the story. frontend-review passed. frontend-accessibility: axe on InboxPopover/Default, InboxPopover/WithLoadMore, InboxItem/Unread, InboxItem/Markdown, and NotificationsInbox/Default reports no aria-required-parent, aria-required-children, or list violations.
  • Pre-existing notes, untouched: aria-dialog-name on the Radix popover content, and the per-item "mark as read" button only appears on hover or click focus, so keyboard users cannot reach it (WCAG 2.1.1). This needs its own ticket.
  • Dropped nits: replacing the [&>[role=listitem]] border selectors with divide-y (the selectors already existed and were only renamed), and querying with screen instead of within(body) (this matches the existing pattern in those files).

🤖 Generated by Coder Agents on behalf of @jeremyruppel.

@linear-code

linear-code Bot commented Oct 30, 2026

Copy link
Copy Markdown

DEQ-533

@jeremyruppel
jeremyruppel marked this pull request as ready for review October 30, 2026 23:33

@bartekgatzcoder bartekgatzcoder left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inbox notifications are now listitems in a list named "Notifications", with Load more outside the list, which gives NVDA the "n of N" position that DEQ-533 asks for. In the WithLoadMore story, the accessibility tree shows the list with 3 items, and the list border keeps the separator above Load more. No nits. Follow-ups for pre-existing problems: DEQ-610 (mark as read cannot be reached by keyboard), DEQ-611 (popover dialog has no name), and a comment on DEQ-508 (the bell button's name).

🤖 Generated by Coder Agents on behalf of @bartekgatzcoder.

@bartekgatzcoder
bartekgatzcoder merged commit bb72d39 into main Nov 1, 2026
54 of 55 checks passed
@bartekgatzcoder
bartekgatzcoder deleted the a11y/aria-state-property-missing-2 branch November 1, 2026 20:30
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants