feat(docs): align documentation shell with HeroUI baseline

This commit is contained in:
maoyingjie
2026-10-24 07:18:36 +08:00
parent 406497a20f
commit b2246f0058
33 changed files with 2499 additions and 1540 deletions
+21
View File
@@ -538,3 +538,24 @@ describe("Surface form demo integration", () => {
);
});
});
it("preserves explicit role and tabindex on a native Link used as a search option", () => {
const w = mount(Link, {
props: { href: "/components/button" },
attrs: { role: "option", tabindex: -1, "aria-selected": "true" },
});
expect(w.attributes("role")).toBe("option");
expect(w.attributes("tabindex")).toBe("-1");
expect(w.attributes("aria-selected")).toBe("true");
w.unmount();
});
it("omits the implicit same-window target so host routers can intercept navigation", () => {
const w = mount(Link, { props: { href: "/components/button" } });
expect(w.attributes("target")).toBeUndefined();
w.unmount();
const explicit = mount(Link, {
props: { href: "/components/button", target: "_self" },
});
expect(explicit.attributes("target")).toBe("_self");
explicit.unmount();
});