示例工程 41-accessibility-audit

41-accessibility-audit/demo-01-checklist/index.html

html · 2.2 KB

运行:人工审计清单

点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。

<!doctype html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>人工审计清单</title>
    <style>
      body { margin: 0; padding: 32px; background: #f8fafc; color: #0f172a; font-family: system-ui, sans-serif; line-height: 1.7; }
      .box { max-width: 760px; margin-bottom: 16px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
      h1 { margin: 0 0 16px; font-size: 28px; }
      h2 { margin: 0 0 8px; font-size: 17px; }
      p { margin: 0 0 10px; color: #334155; }
      ul { margin: 8px 0 0; padding-left: 22px; color: #334155; }
      li + li { margin-top: 4px; }
      details { margin-top: 10px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
      summary { cursor: pointer; font-weight: 600; }
      code { padding: 1px 5px; border-radius: 4px; background: #f1f5f9; font-family: ui-monospace, monospace; }
    </style>
  </head>
  <body>
    <h1>人工审计清单</h1>
    <p>自动化工具跑完后,按下表逐项人工确认。</p>

    <div class="box">
      <h2>键盘</h2>
      <details open>
        <summary>Tab 顺序与焦点</summary>
        <ul>
          <li>Tab 能走完所有可操作元素</li>
          <li>Shift+Tab 能原路返回</li>
          <li>焦点环可见且对比度足够</li>
          <li>没有正数 tabindex</li>
        </ul>
      </details>
      <details>
        <summary>对话框与动态内容</summary>
        <ul>
          <li>打开后焦点进入对话框</li>
          <li>Esc 能关闭</li>
          <li>关闭后焦点回到触发按钮</li>
          <li>背景不可聚焦</li>
        </ul>
      </details>
    </div>

    <div class="box">
      <h2>读屏</h2>
      <details open>
        <summary>结构与名称</summary>
        <ul>
          <li>标题列表层级连续</li>
          <li>地标列表可跳转且命名</li>
          <li>链接列表文字可独立理解</li>
          <li>表单控件有名称与错误</li>
          <li>表格有 caption 与表头</li>
        </ul>
      </details>
    </div>
  </body>
</html>