Skip to content

[GEN-09] RelaySignalButton popover lacks Escape handling and focus trap #352

@intendednull

Description

@intendednull

Audit finding from #300 (commit 679f9fe)

Severity: low
Category: a11y
File: crates/web/src/components/relay_signal_button.rs:92
Obvious fix: yes

Description

The <div role="dialog"> opens via toggle with aria-haspopup="dialog" but has no Escape-to-close handler scoped to the popover (it relies on the global stack, which doesn't know about it) and no initial focus into the dialog. Keyboard users tab past the floating dialog content, then back into page chrome.

Impact / Threat

User-facing — keyboard / screen-reader users can't reliably dismiss the popover.

Suggested fix

Add a local keydown listener that closes on Escape while open=true, and node_ref().focus() the change relay in settings button on open. Also add aria-modal="false" since it's non-modal.

Verify

rg "role=\"dialog\"" crates/web/src/components/relay_signal_button.rs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions