Repository navigation
Reports: one Actions menu per site; Scan again on Issues - #54
Merged
Merged
Conversation
Reports replaces its "Report" column with "Actions": a disclosure button per site row that opens "Open latest scan" and "Scan again". A site with no completed scan gets only "Scan again", from its latest scan. The panel is position: fixed so the table's scroll region cannot clip it, opens upward near the bottom, and supports Escape, arrow keys, Home and End like the Export menu. ScanAgainLink opens New scan with a report's settings filled in. It is used in the Reports Actions menu and beside Export report on Issues (not for sign-in reports).
There was a problem hiding this comment.
🟡 Changes recommended
Scroll and resize dismissal hide focused links without restoring visible keyboard focus.
1 open issue
What changed in this PR
Groups site actions on Reports and adds a reusable Scan again link to Issues.
Changes:
- Adds a keyboard-accessible Actions disclosure with viewport-aware positioning.
- Adds Scan again beside export on unprotected reports.
- Extends Reports tests for menu behavior and accessibility.
| File | Description |
|---|---|
| tests/ui/test_reports_table.py | Tests Actions links, keyboard navigation, and accessibility. |
| src/audit/web/frontend/src/routes/Scans.tsx | Integrates Actions menus into site rows. |
| src/audit/web/frontend/src/routes/Issues.tsx | Adds Scan again for unprotected reports. |
| src/audit/web/frontend/src/components/ScanAgainLink.tsx | Shares the settings-prefilled scan link. |
| src/audit/web/frontend/src/components/RowActionsMenu.tsx | Implements action links, positioning, and dismissal. |
Review effort: Balanced
- Scrolling or resizing closes the Actions panel; if focus was on one of its links, it now goes back to the Actions button (preventScroll), as Escape does, instead of staying on a hidden link. - Scan again's screen-reader text says "report #N" mid-sentence, the sentence case the other controls use (test_control_label_case). - test_reports_refresh finds the site toggle by its own name; the row's "Actions for <site>" button also matched the bare site name.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

What changed
Reports (
routes/Scans.tsx)New
RowActionsMenucomponentExportMenu(norole="menu").aria-label.position: fixed, so the table's sideways-scrolling area can't clip it.ScanAgainLink(new) and IssuesScanAgainLinkopens New scan with a report's settings filled in. It is used in the Reports Actions menu and next to "Export report" on Issues.Why
The aim was to put a row's actions in one place, at the end of the row.
For reviewers
Testing
make frontend-build,make lintandmake typecheck: all clean.uv run pytest tests/ui/test_reports_table.py tests/ui/test_accessibility_axe.py tests/ui/test_control_text_purpose.py: all passing.test_reports_table.pynow covers: