优化: 无障碍第二批(icon-only aria-label + 容器键盘化 20 处)

- TopBar 10 处 icon-only 按钮补 aria-label(复用同 :title 表达式,含三态 title)
- ConversationSidebar: 4 icon-only aria-label + 2 分组标题键盘化(role/tabindex/aria-expanded/keydown)
- MessageList 2 icon-only; KnowledgeDetail 3 章节折叠键盘化; dashboard 两列表项键盘化
- FileExplorer 面包屑/模块下拉项键盘化; ConflictResolver 冲突文件折叠键盘化
- 约定: 遮罩/点外关闭类(@click.self)非键盘缺口,跳过;零新增 i18n 键
- 验收: bunx vue-tsc --noEmit EXIT 0;看板 P3-2 更新(两批共 23 处)
This commit is contained in:
lxy
2026-10-10 01:04:09 +08:00
parent 9d83a06300
commit 2a3a6cd25b
9 changed files with 98 additions and 26 deletions
+29 -3
View File
@@ -20,13 +20,24 @@
:key="m.id"
class="module-dropdown-item"
:class="{ active: m.id === currentModuleId }"
role="button"
tabindex="0"
@click="onModuleSelect(m.id)"
@keydown.enter.prevent="onModuleSelect(m.id)"
@keydown.space.prevent="onModuleSelect(m.id)"
>
<span class="module-dropdown-name">{{ m.name }}</span>
<span v-if="m.path" class="module-dropdown-path" :title="m.path">{{ m.path }}</span>
</div>
<div class="module-dropdown-divider"></div>
<div class="module-dropdown-item module-dropdown-action" @click="onScanSubmodules">
<div
class="module-dropdown-item module-dropdown-action"
role="button"
tabindex="0"
@click="onScanSubmodules"
@keydown.enter.prevent="onScanSubmodules"
@keydown.space.prevent="onScanSubmodules"
>
<span class="module-dropdown-name">🔍 {{ $t('fileExplorer.scanSubmodules') }}</span>
</div>
</div>
@@ -34,12 +45,27 @@
<!-- 路径面包屑 -->
<nav class="breadcrumb">
<span class="crumb crumb-root" :title="currentModule?.path ?? ''" @click="goRoot">
<span
class="crumb crumb-root"
:title="currentModule?.path ?? ''"
role="button"
tabindex="0"
@click="goRoot"
@keydown.enter.prevent="goRoot"
@keydown.space.prevent="goRoot"
>
{{ currentModule?.name ?? '...' }}
</span>
<template v-for="(seg, idx) in breadcrumbSegments" :key="idx">
<span class="crumb-sep">/</span>
<span class="crumb" @click="goBreadcrumb(seg.path)">{{ seg.name }}</span>
<span
class="crumb"
role="button"
tabindex="0"
@click="goBreadcrumb(seg.path)"
@keydown.enter.prevent="goBreadcrumb(seg.path)"
@keydown.space.prevent="goBreadcrumb(seg.path)"
>{{ seg.name }}</span>
</template>
</nav>
</div>