Skip to content

FIX Make conversation panel and attack history rows keyboard-accessible#1990

Merged
hannahwestra25 merged 3 commits into
microsoft:mainfrom
hannahwestra25:hannahwestra25/gui-keyboard-a11y
Jun 12, 2026
Merged

FIX Make conversation panel and attack history rows keyboard-accessible#1990
hannahwestra25 merged 3 commits into
microsoft:mainfrom
hannahwestra25:hannahwestra25/gui-keyboard-a11y

Conversation

@hannahwestra25

Copy link
Copy Markdown
Contributor

Summary

Two clickable surfaces in the GUI were unreachable by keyboard:

  1. ConversationPanel — conversation rows were a plain <div onClick=…> with no role, tabIndex, or key handler, so keyboard-only users could not select a conversation.
  2. AttackTable — the history <TableRow> was clickable for mouse but had no keyboard affordance on the row itself.

Changes

  • Added tabIndex={0}, aria-label, and an onKeyDown handler (Enter / Space activate) to both elements.
  • ConversationPanel row also gets role=\"button\" and aria-current for selection state, since it's a <div>. Fluent's TableRow keeps its native row semantics, so I did not override its role there.
  • Added a :focus-visible outline on both row styles so the focus ring is visible.
  • Added unit tests covering Enter/Space activation and the new ARIA attributes.

Validation

  • npx jest on both touched suites → 34/34 pass
  • npx eslint on touched files → clean
  • npx tsc --noEmit → clean
  • Full npm test → 650/651 pass; single failure was a pre-existing flake in CreateTargetDialog.test.tsx (passes in isolation, unrelated to these files)

ConversationPanel and AttackTable rows were clickable but unreachable by keyboard. Add tabIndex, role/aria-label, and Enter/Space onKeyDown handlers so keyboard users can select conversations and open attacks, with matching focus-visible outlines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread frontend/src/components/History/AttackTable.test.tsx Outdated
hannahwestra25 and others added 2 commits June 12, 2026 12:12
Addresses review feedback on PR microsoft#1990 — the new keyboard-accessibility test for AttackTable was using fireEvent.keyDown, but per frontend-test.instructions.md user interactions should use @testing-library/user-event. Switched to user.keyboard with focused row.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hannahwestra25 hannahwestra25 enabled auto-merge June 12, 2026 16:26
@hannahwestra25 hannahwestra25 added this pull request to the merge queue Jun 12, 2026
Merged via the queue into microsoft:main with commit fa2e3f7 Jun 12, 2026
47 checks passed
@hannahwestra25 hannahwestra25 deleted the hannahwestra25/gui-keyboard-a11y branch June 12, 2026 16:50
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.

3 participants