mirror of
https://github.com/block/buzz.git
synced 2026-11-07 18:01:06 +00:00
fix(design-system): avoid hidden preview tab stops
Signed-off-by: Arjun Mahanti <arjun@squareup.com>
This commit is contained in:
@@ -18,7 +18,12 @@ function ChromePill() {
|
||||
<Tabs.Indicator />
|
||||
</Tabs.List>
|
||||
{items.map((label) => (
|
||||
<Tabs.Panel key={label} value={label} className="bui-sr-only">
|
||||
<Tabs.Panel
|
||||
key={label}
|
||||
value={label}
|
||||
tabIndex={-1}
|
||||
className="bui-sr-only"
|
||||
>
|
||||
{label} surface selected in this material preview.
|
||||
</Tabs.Panel>
|
||||
))}
|
||||
|
||||
@@ -70,6 +70,7 @@ test("Glass navigation shares selection motion and keyboard semantics", async ({
|
||||
await page.goto("/design/glass");
|
||||
const tabs = page.getByRole("tablist", { name: "Glass navigation preview" });
|
||||
const indicator = tabs.locator(".bui-tab-indicator");
|
||||
await expect(page.getByRole("tabpanel")).toHaveAttribute("tabindex", "-1");
|
||||
await expect(
|
||||
tabs.getByRole("tab", { name: "Messages", exact: true }),
|
||||
).toHaveAttribute("aria-selected", "true");
|
||||
|
||||
Reference in New Issue
Block a user