feat(web): NavDrawer 补 aria-controls + ForeshadowCard 语义化 dl/dt/dd(a11y)
NavDrawer 汉堡按钮补 aria-controls 指向抽屉面板(Drawer 新增可选 id prop,默认 nav-drawer);ForeshadowCard 的 <dl> 裸 <div> 行改真 <dt>/<dd> 结构,可视文案不变,importance 用 sr-only 标签。行为不变。
This commit is contained in:
@@ -58,10 +58,23 @@ export function ForeshadowCard({
|
||||
|
||||
<dl className="mt-2 space-y-0.5 text-xs text-ink-soft">
|
||||
{typeof item.planted_at === "number" ? (
|
||||
<div>埋于 {item.planted_at} 章</div>
|
||||
<div className="flex gap-1">
|
||||
<dt>埋于</dt>
|
||||
<dd>{item.planted_at} 章</dd>
|
||||
</div>
|
||||
) : null}
|
||||
{windowText ? (
|
||||
<div className="flex gap-1">
|
||||
<dt>窗口</dt>
|
||||
<dd>{windowText}</dd>
|
||||
</div>
|
||||
) : null}
|
||||
{item.importance ? (
|
||||
<div className="flex gap-1">
|
||||
<dt className="sr-only">重要度</dt>
|
||||
<dd>{item.importance}</dd>
|
||||
</div>
|
||||
) : null}
|
||||
{windowText ? <div>窗口 {windowText}</div> : null}
|
||||
{item.importance ? <div>{item.importance}</div> : null}
|
||||
</dl>
|
||||
|
||||
{item.progress && item.progress.length > 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user