feat(docs): align documentation shell with HeroUI baseline
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user