summaryrefslogtreecommitdiff
path: root/web/source/settings/views/moderation/domain-permissions/excludes/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/source/settings/views/moderation/domain-permissions/excludes/index.tsx')
-rw-r--r--web/source/settings/views/moderation/domain-permissions/excludes/index.tsx23
1 files changed, 13 insertions, 10 deletions
diff --git a/web/source/settings/views/moderation/domain-permissions/excludes/index.tsx b/web/source/settings/views/moderation/domain-permissions/excludes/index.tsx
index 915d6f5cc..207f94d61 100644
--- a/web/source/settings/views/moderation/domain-permissions/excludes/index.tsx
+++ b/web/source/settings/views/moderation/domain-permissions/excludes/index.tsx
@@ -186,21 +186,24 @@ function ExcludeListEntry({ permExclude, linkTo, backLocation }: ExcludeEntryPro
return <ErrorC error={new Error("id was undefined")} />;
}
+ const onClick = () => {
+ // When clicking on a exclude, direct
+ // to the detail view for that exclude.
+ 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 domain-permission-exclude entry`}
aria-label={`Exclude ${domain}`}
title={`Exclude ${domain}`}
- onClick={() => {
- // When clicking on a exclude, direct
- // to the detail view for that exclude.
- 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}
>