fix(a11y): WCAG 2.1 AA fixes (#2219)
This commit is contained in:
@@ -14,6 +14,7 @@ import { getPageIcon } from "@/lib";
|
||||
import { CustomAvatar } from "@/components/ui/custom-avatar.tsx";
|
||||
import { EmptyState } from "@/components/ui/empty-state.tsx";
|
||||
import classes from "./share.module.css";
|
||||
import rowClasses from "@/components/ui/clickable-table-row.module.css";
|
||||
|
||||
export default function ShareList() {
|
||||
const { t } = useTranslation();
|
||||
@@ -38,7 +39,7 @@ export default function ShareList() {
|
||||
|
||||
<Table.Tbody>
|
||||
{data?.items.map((share: ISharedItem, index: number) => (
|
||||
<Table.Tr key={index}>
|
||||
<Table.Tr key={index} className={rowClasses.row}>
|
||||
<Table.Td>
|
||||
<Anchor
|
||||
size="sm"
|
||||
@@ -47,6 +48,7 @@ export default function ShareList() {
|
||||
cursor: "pointer",
|
||||
color: "var(--mantine-color-text)",
|
||||
}}
|
||||
className={rowClasses.link}
|
||||
component={Link}
|
||||
target="_blank"
|
||||
to={buildSharedPageUrl({
|
||||
|
||||
@@ -42,6 +42,7 @@ import {
|
||||
import { ShareSearchSpotlight } from "@/features/search/components/share-search-spotlight.tsx";
|
||||
import { shareSearchSpotlight } from "@/features/search/constants";
|
||||
import ShareBranding from '@/features/share/components/share-branding.tsx';
|
||||
import { MAIN_CONTENT_ID, SkipToMain } from "@/components/ui/skip-to-main.tsx";
|
||||
|
||||
const MemoizedSharedTree = React.memo(SharedTree);
|
||||
|
||||
@@ -122,7 +123,9 @@ export default function ShareShell({
|
||||
}, [data, treeData, setSharedPageTree, setSharedTreeData]);
|
||||
|
||||
return (
|
||||
<AppShell
|
||||
<>
|
||||
<SkipToMain />
|
||||
<AppShell
|
||||
header={{ height: 50 }}
|
||||
{...(data?.pageTree?.length > 1 && {
|
||||
navbar: {
|
||||
@@ -242,7 +245,7 @@ export default function ShareShell({
|
||||
</AppShell.Navbar>
|
||||
)}
|
||||
|
||||
<AppShell.Main>
|
||||
<AppShell.Main id={MAIN_CONTENT_ID} tabIndex={-1}>
|
||||
{children}
|
||||
|
||||
{data && shareId && !(data.features?.length > 0) && <ShareBranding />}
|
||||
@@ -264,5 +267,6 @@ export default function ShareShell({
|
||||
|
||||
<ShareSearchSpotlight shareId={shareId} />
|
||||
</AppShell>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user