summaryrefslogtreecommitdiff
path: root/web/source/settings/views/moderation/domain-permissions/subscriptions/common.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/source/settings/views/moderation/domain-permissions/subscriptions/common.tsx')
-rw-r--r--web/source/settings/views/moderation/domain-permissions/subscriptions/common.tsx23
1 files changed, 13 insertions, 10 deletions
diff --git a/web/source/settings/views/moderation/domain-permissions/subscriptions/common.tsx b/web/source/settings/views/moderation/domain-permissions/subscriptions/common.tsx
index 8668caa4b..808d03dcf 100644
--- a/web/source/settings/views/moderation/domain-permissions/subscriptions/common.tsx
+++ b/web/source/settings/views/moderation/domain-permissions/subscriptions/common.tsx
@@ -109,21 +109,24 @@ export function SubscriptionListEntry({ permSub, linkTo, backLocation }: Subscri
successfullyFetchedAtStr = new Date(successfullyFetchedAt).toDateString();
}
+ const onClick = () => {
+ // When clicking on a subscription, direct
+ // to the detail view for that subscription.
+ 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-subscription entry`}
aria-label={ariaLabel}
title={ariaLabel}
- onClick={() => {
- // When clicking on a subscription, direct
- // to the detail view for that subscription.
- 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}
>