Repository navigation
fix(site/src/pages/AuditPage): toggle audit log diffs with a real disclosure button - #31858
Merged
Merged
Conversation
…closure button The audit log row header was a div with role="button" that contained links and the request details tooltip trigger, which axe reports as nested-interactive. The chevron is now a CollapsibleTrigger button, and clicking elsewhere on the row stays as a mouse-only shortcut.
bartekgatzcoder
approved these changes
Nov 10, 2026
bartekgatzcoder
left a comment
Collaborator
There was a problem hiding this comment.
Clean fix: the row header is no longer a focusable role=button wrapping links, and the chevron is a real Radix CollapsibleTrigger button with working aria-expanded/aria-controls. Verified in Storybook (axe: no nested-interactive on WithDiff, WithOrganization, LongDiffRow; Tab reaches "View changes" with a visible ring; Enter, Space, and row click each toggle once), and AuditPage.test.tsx passes. Nits: AuditLogRow.tsx:228 p-0 border-0 bg-transparent text-inherit cursor-pointer duplicate preflight/base styles; onClick={toggle} at :74 is now attached to no-diff rows too (harmless, toggle returns early); the row-click shortcut has no test.
🤖 Generated by Coder Agents on behalf of @bartekgatzcoder.
bartekgatzcoder
pushed a commit
that referenced
this pull request
Nov 10, 2026
…template cards (#31865) The base template card in the template builder was a `<div role="radio" tabIndex={0}>` with its own Enter and Space handling, and it contained the "View details" link, so axe reports `nested-interactive` on every card. The card now uses the shared `RadioGroupItem` in place of the hand-drawn indicator, labelled by the template name, and `BaseInfraSelectStep` wraps the grid in the shared `RadioGroup` controlled by `selectedBaseId`. The group gets one Tab stop with arrow-key navigation. The card keeps its click handler as a mouse-only shortcut with no role, tab stop, or key handler, matching `ModuleCard` (#30540). Closes DEQ-50 Closes DEQ-60 Closes DEQ-61 Closes DEQ-166 Closes DEQ-197 Closes DEQ-205 Closes DEQ-242 Closes DEQ-445 Closes DEQ-452 | Ticket | Surface | |---|---| | DEQ-50, DEQ-60, DEQ-61, DEQ-166, DEQ-197, DEQ-205, DEQ-242, DEQ-445, DEQ-452 | Template builder, step 1 (pick a base template) | <details> <summary>Decision log</summary> - The radio has no change handler. Clicks, Space, and Radix's arrow-key selection all reach the card as clicks, so the card's `onClick` is the only caller of `onSelect` and a selection is never counted twice. Covered by `TemplateCard.test.tsx`. - Kept the card-wide click for mouse users with an `oxlint-disable-next-line jsx-a11y/click-events-have-key-events` comment, as `ModuleCard` does. - The selected radio now uses the shared style (gray border, 10px dot) instead of the custom one (white border, 8px dot). Size and position are unchanged. Focus moves from a ring around the whole card to a ring around the radio, offset against the card surface. - Clicking "View details" still selects the card on the way out, as before and as in `ModuleCard`. - `TemplateCard` stories render inside a `RadioGroup` decorator, which the radio needs. - Verified with axe-core in Storybook: `TemplateCard` Default and Selected go from `nested-interactive` and `target-size` (1 node each) to 0. `TemplateBuilderPageView` Default goes from 2 nodes each to 0. A pre-existing `link-in-text-block` hit in the page subtitle remains. - Related `nested-interactive` fixes: #31856 (`Autocomplete`), #31857 (templates list), #31858 (audit log). </details> 🤖 Generated by Coder Agents on behalf of @jeremyruppel.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The audit log row header was a
<div role="button" tabIndex={0} aria-expanded>that contained the description links and the request details tooltip trigger, so axe reportsnested-interactiveon every expandable row.The chevron is now a real disclosure button (
CollapsibleTriggeraround a<button aria-label="View changes">), which getsaria-expandedandaria-controlsfrom Radix and handles Enter and Space natively. The header div keeps its click handler as a mouse-only shortcut, with no role, tab stop, or key handler. The button stops propagation so a click toggles once.Closes DEQ-28
Closes DEQ-106
Closes DEQ-211
Closes DEQ-250
Closes DEQ-317
Closes DEQ-392
Closes DEQ-438
/audit) expandable rowsDecision log
oxlint-disable-next-line jsx-a11y/click-events-have-key-eventscomment, asModuleCarddoes (fix(site/src/pages/TemplateBuilder): use shared Checkbox in ModuleCard #30540). Keyboard users use the disclosure button. Dropping the row click would avoid the comment but shrink the mouse target to the 24px chevron.aria-expanded.fireEvent.keyDowntests inAuditPage.test.tsx, which exercised the removed row key handler, with oneuserEventtest that toggles the button with Enter, Space, and a click and checks it toggles once each time.pages/AuditPage/AuditLogRowWithDiff, WithOrganization, NoDiff):nested-interactivegoes from 1 node to 0 in the diff stories. Atarget-sizehit on the request details tooltip trigger in WithOrganization also clears, since it no longer sits inside the oversized row button.nested-interactivefixes: fix(site/src): move the Autocomplete clear button out of the trigger #31856 (Autocomplete), fix(site/src/pages/TemplatesPage): link template names instead of making rows buttons #31857 (templates list).🤖 Generated by Coder Agents on behalf of @jeremyruppel.