fix(a11y): every side-panel pin names its panel; the tab under an open card leaves the tree
The card's own pin and the drawer's still said 'Unpin panel' / 'Pin panel open' after the edge tab learned the title (F6). Naming them too made two buttons share a name, because the invisible tab under an open card was still in the accessibility tree: it is now aria-hidden as well as out of the Tab order. The generic sidebar.pin / unpin keys are gone.
This commit is contained in:
@@ -160,7 +160,10 @@ export default function SidePanel({
|
||||
);
|
||||
}
|
||||
}
|
||||
// Under an open card the tab is transparent and inert: out of the Tab order AND of the
|
||||
// accessibility tree, where it would repeat the card's own pin button by name.
|
||||
tabIndex={expanded ? -1 : undefined}
|
||||
aria-hidden={expanded || undefined}
|
||||
aria-label={
|
||||
drawerMode
|
||||
? t("sidebar.openPanel", { title })
|
||||
@@ -197,7 +200,7 @@ export default function SidePanel({
|
||||
Module actions live on their own row below so the title always has room. */}
|
||||
<div className="flex items-center gap-1.5 px-3 py-2.5 border-b border-border/60 flex-none">
|
||||
<IconButton
|
||||
label={pinned ? t("sidebar.unpin") : t("sidebar.pin")}
|
||||
label={pinned ? t("sidebar.unpinNamed", { title }) : t("sidebar.pinNamed", { title })}
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
onClick={onToggleCollapse}
|
||||
@@ -245,7 +248,7 @@ export default function SidePanel({
|
||||
<>
|
||||
{pinRoom && (
|
||||
<IconButton
|
||||
label={t("sidebar.pin")}
|
||||
label={t("sidebar.pinNamed", { title })}
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user