From 0fdd7ef6d64909ac7e2f95b799f9881932df8e04 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Mon, 4 May 2026 20:15:53 +0100 Subject: [PATCH] aria fixes --- .../src/components/common/avatar-uploader.tsx | 10 ++++++++++ .../src/components/common/recent-changes.tsx | 6 +++--- .../src/components/icons/icon-people-circle.tsx | 6 +++--- .../ee/security/components/sso-provider-list.tsx | 9 ++++++++- .../features/favorite/components/star-button.tsx | 12 +++++++----- .../src/features/home/components/created-by-me.tsx | 6 +++--- .../features/home/components/favorites-pages.tsx | 6 +++--- .../components/notification-popover.tsx | 3 +++ .../page/components/header/page-header-menu.tsx | 14 +++++++++++--- .../components/spaces-page/all-spaces-list.tsx | 10 +++++----- .../members/components/members-action-menu.tsx | 6 +++++- 11 files changed, 61 insertions(+), 27 deletions(-) diff --git a/apps/client/src/components/common/avatar-uploader.tsx b/apps/client/src/components/common/avatar-uploader.tsx index 8d9552f6..750e4ba6 100644 --- a/apps/client/src/components/common/avatar-uploader.tsx +++ b/apps/client/src/components/common/avatar-uploader.tsx @@ -80,6 +80,12 @@ export default function AvatarUploader({ } }; + const ariaLabel = { + [AvatarIconType.AVATAR]: t("Change avatar"), + [AvatarIconType.SPACE_ICON]: t("Change space icon"), + [AvatarIconType.WORKSPACE_ICON]: t("Change workspace icon"), + }[type]; + const handleRemove = async () => { if (disabled) return; @@ -104,6 +110,8 @@ export default function AvatarUploader({ ref={fileInputRef} onChange={handleFileInputChange} accept="image/png,image/jpeg,image/jpg" + aria-label={ariaLabel} + tabIndex={-1} style={{ display: "none" }} /> @@ -115,6 +123,8 @@ export default function AvatarUploader({ size={size} avatarUrl={currentImageUrl} name={fallbackName} + aria-label={ariaLabel} + aria-haspopup="menu" style={{ cursor: disabled || isLoading ? "default" : "pointer", opacity: isLoading ? 0.6 : 1, diff --git a/apps/client/src/components/common/recent-changes.tsx b/apps/client/src/components/common/recent-changes.tsx index 277ceb81..8e0e56f2 100644 --- a/apps/client/src/components/common/recent-changes.tsx +++ b/apps/client/src/components/common/recent-changes.tsx @@ -4,7 +4,7 @@ import { UnstyledButton, Badge, Table, - ActionIcon, + ThemeIcon, Button, } from "@mantine/core"; import { Link } from "react-router-dom"; @@ -49,9 +49,9 @@ export default function RecentChanges({ spaceId }: Props) { > {page.icon || ( - + - + )} diff --git a/apps/client/src/components/icons/icon-people-circle.tsx b/apps/client/src/components/icons/icon-people-circle.tsx index 99695896..1a2daf73 100644 --- a/apps/client/src/components/icons/icon-people-circle.tsx +++ b/apps/client/src/components/icons/icon-people-circle.tsx @@ -1,11 +1,11 @@ -import { ActionIcon, rem } from "@mantine/core"; +import { ThemeIcon } from "@mantine/core"; import React from "react"; import { IconUsersGroup } from "@tabler/icons-react"; export function IconGroupCircle() { return ( - + - + ); } diff --git a/apps/client/src/ee/security/components/sso-provider-list.tsx b/apps/client/src/ee/security/components/sso-provider-list.tsx index 3603f959..7f74df8c 100644 --- a/apps/client/src/ee/security/components/sso-provider-list.tsx +++ b/apps/client/src/ee/security/components/sso-provider-list.tsx @@ -141,6 +141,7 @@ export default function SsoProviderList() { handleEdit(provider)} > @@ -152,7 +153,13 @@ export default function SsoProviderList() { withinPortal > - + diff --git a/apps/client/src/features/favorite/components/star-button.tsx b/apps/client/src/features/favorite/components/star-button.tsx index 6a99e01e..7ff8ff77 100644 --- a/apps/client/src/features/favorite/components/star-button.tsx +++ b/apps/client/src/features/favorite/components/star-button.tsx @@ -53,15 +53,17 @@ export default function StarButton(props: StarButtonProps) { } }; + const label = isFavorited + ? t("Remove from favorites") + : t("Add to favorites"); + return ( - + diff --git a/apps/client/src/features/home/components/created-by-me.tsx b/apps/client/src/features/home/components/created-by-me.tsx index 70137b10..99051357 100644 --- a/apps/client/src/features/home/components/created-by-me.tsx +++ b/apps/client/src/features/home/components/created-by-me.tsx @@ -4,7 +4,7 @@ import { UnstyledButton, Badge, Table, - ActionIcon, + ThemeIcon, Button, } from "@mantine/core"; import { Link } from "react-router-dom"; @@ -61,13 +61,13 @@ export default function CreatedByMe({ spaceId }: Props) { > {page.icon || ( - - + )} {page.title || t("Untitled")} diff --git a/apps/client/src/features/home/components/favorites-pages.tsx b/apps/client/src/features/home/components/favorites-pages.tsx index eb87216e..aed8e653 100644 --- a/apps/client/src/features/home/components/favorites-pages.tsx +++ b/apps/client/src/features/home/components/favorites-pages.tsx @@ -4,7 +4,7 @@ import { UnstyledButton, Badge, Table, - ActionIcon, + ThemeIcon, Button, } from "@mantine/core"; import { Link } from "react-router-dom"; @@ -62,13 +62,13 @@ export default function FavoritesPages({ spaceId }: Props) { > {fav.page.icon || ( - - + )} {fav.page.title || t("Untitled")} diff --git a/apps/client/src/features/notification/components/notification-popover.tsx b/apps/client/src/features/notification/components/notification-popover.tsx index 161ac1e6..751b9edf 100644 --- a/apps/client/src/features/notification/components/notification-popover.tsx +++ b/apps/client/src/features/notification/components/notification-popover.tsx @@ -58,6 +58,9 @@ export function NotificationPopover() { variant="subtle" color="dark" size="sm" + aria-label={t("Notifications")} + aria-haspopup="dialog" + aria-expanded={opened} onClick={() => setOpened((o) => !o)} > toggleAside("comments")} > @@ -109,6 +110,7 @@ export default function PageHeaderMenu({ readOnly }: PageHeaderMenuProps) { toggleAside("toc")} > @@ -420,9 +422,15 @@ function ConnectionWarning() { openDelay={250} withArrow > - + - + ); } diff --git a/apps/client/src/features/space/components/spaces-page/all-spaces-list.tsx b/apps/client/src/features/space/components/spaces-page/all-spaces-list.tsx index dd1ada85..5a7a50fd 100644 --- a/apps/client/src/features/space/components/spaces-page/all-spaces-list.tsx +++ b/apps/client/src/features/space/components/spaces-page/all-spaces-list.tsx @@ -49,15 +49,15 @@ function WatchButton({ spaceId, watchedIds, size = 16 }: { spaceId: string; watc } }; + const label = isWatching ? t("Stop watching space") : t("Watch space"); + return ( - + diff --git a/apps/client/src/features/workspace/components/members/components/members-action-menu.tsx b/apps/client/src/features/workspace/components/members/components/members-action-menu.tsx index e9376dda..ce1c588a 100644 --- a/apps/client/src/features/workspace/components/members/components/members-action-menu.tsx +++ b/apps/client/src/features/workspace/components/members/components/members-action-menu.tsx @@ -83,7 +83,11 @@ export default function MemberActionMenu({ userId, deactivatedAt }: Props) { arrowPosition="center" > - +