diff --git a/src/renderer/src/pages/notifications/local-notification-item.tsx b/src/renderer/src/pages/notifications/local-notification-item.tsx index 6ebc703b..1003f9d5 100644 --- a/src/renderer/src/pages/notifications/local-notification-item.tsx +++ b/src/renderer/src/pages/notifications/local-notification-item.tsx @@ -69,6 +69,11 @@ export function LocalNotificationItem({ "notification-item--unread": !notification.isRead, })} onClick={handleClick} + onKeyDown={(e) => { + if (e.key === "Enter" || e.key === " ") { + handleClick(); + } + }} role="button" tabIndex={0} > diff --git a/src/renderer/src/pages/notifications/notification-item.tsx b/src/renderer/src/pages/notifications/notification-item.tsx index eb31ee36..96ede5e8 100644 --- a/src/renderer/src/pages/notifications/notification-item.tsx +++ b/src/renderer/src/pages/notifications/notification-item.tsx @@ -177,6 +177,11 @@ export function NotificationItem({ "notification-item--unread": !notification.isRead, })} onClick={handleClick} + onKeyDown={(e) => { + if (e.key === "Enter" || e.key === " ") { + handleClick(); + } + }} role="button" tabIndex={0} > diff --git a/src/renderer/src/pages/profile/profile-content/all-friends-modal.tsx b/src/renderer/src/pages/profile/profile-content/all-friends-modal.tsx index 9593c0f2..735d88c1 100644 --- a/src/renderer/src/pages/profile/profile-content/all-friends-modal.tsx +++ b/src/renderer/src/pages/profile/profile-content/all-friends-modal.tsx @@ -76,6 +76,7 @@ export function AllFriendsModal({ setHasMore(true); fetchFriends(0, false); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [visible, userId]); const handleScroll = useCallback(() => { @@ -152,6 +153,11 @@ export function AllFriendsModal({ key={friend.id} className="all-friends-modal__item" onClick={() => handleFriendClick(friend.id)} + onKeyDown={(e) => { + if (e.key === "Enter" || e.key === " ") { + handleFriendClick(friend.id); + } + }} role="button" tabIndex={0} >