summaryrefslogtreecommitdiff
path: root/web/source/settings/views/moderation/reports/search.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/source/settings/views/moderation/reports/search.tsx')
-rw-r--r--web/source/settings/views/moderation/reports/search.tsx23
1 files changed, 13 insertions, 10 deletions
diff --git a/web/source/settings/views/moderation/reports/search.tsx b/web/source/settings/views/moderation/reports/search.tsx
index 0ae3ec0e0..bae0a2004 100644
--- a/web/source/settings/views/moderation/reports/search.tsx
+++ b/web/source/settings/views/moderation/reports/search.tsx
@@ -184,21 +184,24 @@ function ReportListEntry({ report, linkTo, backLocation }: ReportEntryProps) {
const created = new Date(report.created_at).toLocaleString();
const title = `${status}. @${target.account.acct} was reported by @${from.account.acct} on ${created}. Reason: "${comment}"`;
+ const onClick = () => {
+ // When clicking on a report, direct
+ // to the detail view for that report.
+ setLocation(linkTo, {
+ // Store the back location in history so
+ // the detail view can use it to return to
+ // this page (including query parameters).
+ state: { backLocation: backLocation }
+ });
+ };
+
return (
<span
className={`pseudolink report entry${report.action_taken ? " resolved" : ""}`}
aria-label={title}
title={title}
- onClick={() => {
- // When clicking on a report, direct
- // to the detail view for that report.
- setLocation(linkTo, {
- // Store the back location in history so
- // the detail view can use it to return to
- // this page (including query parameters).
- state: { backLocation: backLocation }
- });
- }}
+ onClick={onClick}
+ onKeyDown={e => e.key === "Enter" && onClick()}
role="link"
tabIndex={0}
>