feat: add tooltip support to SidebarMenuSubButton and update NavMain and NavSecondary components for improved accessibility

This commit is contained in:
mlogclub
2026-05-30 20:50:14 +08:00
parent 7e6fcc45ac
commit 57995e352b
4 changed files with 39 additions and 21 deletions
+11
View File
@@ -0,0 +1,11 @@
import assert from "node:assert/strict"
import { readFile } from "node:fs/promises"
import test from "node:test"
const source = await readFile(new URL("./nav-main.tsx", import.meta.url), "utf8")
test("dashboard nav items expose full labels when visual text is truncated", () => {
assert.match(source, /<span\s+title=\{title\}>\{title\}<\/span>/)
assert.match(source, /tooltip=\{item\.title\}/)
assert.match(source, /<span\s+title=\{item\.title\}>\{item\.title\}<\/span>/)
})