# 成员

工作区里有谁、各是什么身份：可更改的角色、要发出的邀请，以及尚未答复的邀请。

成员区块让工作区所有者查看谁可以进入、各以什么身份进入，更改角色，并邀请新人加入。成员是[面板](https://ui.master.co/cn/components/surface#sheet)上的一个[列表](https://ui.master.co/cn/components/list.md)，每个角色是一个原生[下拉选择框](https://ui.master.co/cn/components/select.md)，邀请则是[对话框](https://ui.master.co/cn/components/dialog.md)中的一个表单。尚无人答复的邀请列在成员下方，与成员分开，因为收到邀请的邮箱地址还不是成员。

**成员**

```html
<section class="container-inline flex flex-col gap-lg max-w(720) mx-auto" aria-labelledby="members-title">
  <header class="flex flex-wrap items-end justify-between gap-md">
    <div class="flex flex-col gap-2xs min-w(0)">
      <h2 class="heading heading-lg" id="members-title">Members</h2>
      <p class="m(0) fg-text-muted">Five people work in Atlas Labs. Each takes one seat on Pro.</p>
    </div>
    <button type="button" class="btn btn-primary" commandfor="members-invite" command="show-modal"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L13 8"/><path d="M8 3L8 13"/></svg>Invite a member</button>
  </header>
  <div class="sheet px-md py-xs px-lg@container(--md)">
    <ul class="list">
      <li class="list-row">
        <span class="avatar list-media"><img class="avatar-image" src="/demo/people/yiching-lin.webp" alt="" width="256" height="256"></span>
        <div class="list-body">
          <p class="list-title">Yi-ching Lin <span class="badge badge-sm vertical-middle">You</span></p>
          <p class="list-description">yiching@atlaslabs.dev</p>
        </div>
        <span class="list-end fg-text-muted">Owner</span>
      </li>
      <li class="list-row">
        <span class="avatar list-media"><img class="avatar-image" src="/demo/people/pohan-chen.webp" alt="" width="256" height="256"></span>
        <div class="list-body">
          <p class="list-title">Po-han Chen</p>
          <p class="list-description">pohan@atlaslabs.dev</p>
        </div>
        <div class="list-end flex items-center gap-2xs">
          <select class="select select-sm w(104)@container(--md)" aria-label="Role of Po-han Chen">
            <option class="select-option" selected>Admin</option>
            <option class="select-option">Member</option>
            <option class="select-option">Viewer</option>
          </select>
          <button type="button" class="btn btn-quiet btn-square btn-sm" popovertarget="members-menu-pohan" aria-label="More for Po-han Chen"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="3.5" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="8" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="12.5" cy="8" r="1.05" fill="currentColor" stroke="none"/></svg></button>
          <div id="members-menu-pohan" popover class="menu menu-end">
            <button type="button" class="menu-item" popovertarget="members-menu-pohan" popovertargetaction="hide">Make owner</button>
            <hr class="menu-separator">
            <button type="button" class="menu-item menu-item-danger" popovertarget="members-menu-pohan" popovertargetaction="hide">Remove from Atlas Labs</button>
          </div>
        </div>
      </li>
      <li class="list-row">
        <span class="avatar list-media"><img class="avatar-image" src="/demo/people/misaki-sato.webp" alt="" width="256" height="256"></span>
        <div class="list-body">
          <p class="list-title">Misaki Sato</p>
          <p class="list-description">misaki@atlaslabs.dev</p>
        </div>
        <div class="list-end flex items-center gap-2xs">
          <select class="select select-sm w(104)@container(--md)" aria-label="Role of Misaki Sato">
            <option class="select-option" selected>Admin</option>
            <option class="select-option">Member</option>
            <option class="select-option">Viewer</option>
          </select>
          <button type="button" class="btn btn-quiet btn-square btn-sm" popovertarget="members-menu-misaki" aria-label="More for Misaki Sato"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="3.5" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="8" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="12.5" cy="8" r="1.05" fill="currentColor" stroke="none"/></svg></button>
          <div id="members-menu-misaki" popover class="menu menu-end">
            <button type="button" class="menu-item" popovertarget="members-menu-misaki" popovertargetaction="hide">Make owner</button>
            <hr class="menu-separator">
            <button type="button" class="menu-item menu-item-danger" popovertarget="members-menu-misaki" popovertargetaction="hide">Remove from Atlas Labs</button>
          </div>
        </div>
      </li>
      <li class="list-row">
        <span class="avatar list-media"><img class="avatar-image" src="/demo/people/seoyeon-kim.webp" alt="" width="256" height="256"></span>
        <div class="list-body">
          <p class="list-title">Seo-yeon Kim</p>
          <p class="list-description">seoyeon@atlaslabs.dev</p>
        </div>
        <div class="list-end flex items-center gap-2xs">
          <select class="select select-sm w(104)@container(--md)" aria-label="Role of Seo-yeon Kim">
            <option class="select-option">Admin</option>
            <option class="select-option" selected>Member</option>
            <option class="select-option">Viewer</option>
          </select>
          <button type="button" class="btn btn-quiet btn-square btn-sm" popovertarget="members-menu-seoyeon" aria-label="More for Seo-yeon Kim"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="3.5" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="8" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="12.5" cy="8" r="1.05" fill="currentColor" stroke="none"/></svg></button>
          <div id="members-menu-seoyeon" popover class="menu menu-end">
            <button type="button" class="menu-item" popovertarget="members-menu-seoyeon" popovertargetaction="hide">Make owner</button>
            <hr class="menu-separator">
            <button type="button" class="menu-item menu-item-danger" popovertarget="members-menu-seoyeon" popovertargetaction="hide">Remove from Atlas Labs</button>
          </div>
        </div>
      </li>
      <li class="list-row">
        <span class="avatar list-media"><img class="avatar-image" src="/demo/people/kenta-nakamura.webp" alt="" width="256" height="256"></span>
        <div class="list-body">
          <p class="list-title">Kenta Nakamura</p>
          <p class="list-description">kenta@atlaslabs.dev</p>
        </div>
        <div class="list-end flex items-center gap-2xs">
          <select class="select select-sm w(104)@container(--md)" aria-label="Role of Kenta Nakamura">
            <option class="select-option">Admin</option>
            <option class="select-option" selected>Member</option>
            <option class="select-option">Viewer</option>
          </select>
          <button type="button" class="btn btn-quiet btn-square btn-sm" popovertarget="members-menu-kenta" aria-label="More for Kenta Nakamura"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="3.5" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="8" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="12.5" cy="8" r="1.05" fill="currentColor" stroke="none"/></svg></button>
          <div id="members-menu-kenta" popover class="menu menu-end">
            <button type="button" class="menu-item" popovertarget="members-menu-kenta" popovertargetaction="hide">Make owner</button>
            <hr class="menu-separator">
            <button type="button" class="menu-item menu-item-danger" popovertarget="members-menu-kenta" popovertargetaction="hide">Remove from Atlas Labs</button>
          </div>
        </div>
      </li>
    </ul>
  </div>
  <section class="flex flex-col gap-sm" aria-labelledby="members-pending-title">
    <h3 class="heading heading-sm" id="members-pending-title">Pending invitations</h3>
    <div class="sheet px-md py-xs px-lg@container(--md)">
      <ul class="list">
        <li class="list-row">
          <div class="list-body">
            <p class="list-title">chiahao@atlaslabs.dev</p>
            <p class="list-description">Member, expires <time datetime="2026-11-28">28 Nov</time></p>
          </div>
          <div class="list-end flex items-center gap-2xs">
            <button type="button" class="btn btn-quiet btn-sm hidden inline-flex@container(--md)" aria-label="Resend the invitation to chiahao@atlaslabs.dev">Resend</button>
            <button type="button" class="btn btn-quiet btn-sm hidden inline-flex@container(--md)" aria-label="Revoke the invitation to chiahao@atlaslabs.dev">Revoke</button>
            <button type="button" class="btn btn-quiet btn-square btn-sm hidden@container(--md)" popovertarget="members-menu-chiahao" aria-label="More for the invitation to chiahao@atlaslabs.dev"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="3.5" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="8" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="12.5" cy="8" r="1.05" fill="currentColor" stroke="none"/></svg></button>
            <div id="members-menu-chiahao" popover class="menu menu-end">
              <button type="button" class="menu-item" popovertarget="members-menu-chiahao" popovertargetaction="hide">Resend invitation</button>
              <button type="button" class="menu-item menu-item-danger" popovertarget="members-menu-chiahao" popovertargetaction="hide">Revoke invitation</button>
            </div>
          </div>
          <p class="list-meta"><span>Invited by Po-han Chen on <time datetime="2026-11-21">21 Nov</time></span></p>
        </li>
        <li class="list-row">
          <div class="list-body">
            <p class="list-title">yuna@atlaslabs.dev</p>
            <p class="list-description">Viewer, expires <time datetime="2026-11-30">30 Nov</time></p>
          </div>
          <div class="list-end flex items-center gap-2xs">
            <button type="button" class="btn btn-quiet btn-sm hidden inline-flex@container(--md)" aria-label="Resend the invitation to yuna@atlaslabs.dev">Resend</button>
            <button type="button" class="btn btn-quiet btn-sm hidden inline-flex@container(--md)" aria-label="Revoke the invitation to yuna@atlaslabs.dev">Revoke</button>
            <button type="button" class="btn btn-quiet btn-square btn-sm hidden@container(--md)" popovertarget="members-menu-yuna" aria-label="More for the invitation to yuna@atlaslabs.dev"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="3.5" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="8" cy="8" r="1.05" fill="currentColor" stroke="none"/><circle cx="12.5" cy="8" r="1.05" fill="currentColor" stroke="none"/></svg></button>
            <div id="members-menu-yuna" popover class="menu menu-end">
              <button type="button" class="menu-item" popovertarget="members-menu-yuna" popovertargetaction="hide">Resend invitation</button>
              <button type="button" class="menu-item menu-item-danger" popovertarget="members-menu-yuna" popovertargetaction="hide">Revoke invitation</button>
            </div>
          </div>
          <p class="list-meta"><span>Invited by you on <time datetime="2026-11-23">23 Nov</time></span></p>
        </li>
      </ul>
    </div>
  </section>
  <dialog id="members-invite" class="dialog" aria-labelledby="members-invite-title" aria-describedby="members-invite-description">
    <header class="dialog-header">
      <h2 class="dialog-title" id="members-invite-title">Invite a member</h2>
      <p class="dialog-description" id="members-invite-description">They get an email with a link that works for seven days.</p>
    </header>
    <form class="dialog-body flex flex-col gap-md" method="dialog" id="members-invite-form">
      <label class="field">
        Email
        <input class="input" type="email" name="email" autocomplete="off" required autofocus>
      </label>
      <div class="field">
        <label for="members-invite-role">Role</label>
        <select class="select" id="members-invite-role" name="role" aria-describedby="members-invite-role-hint">
          <option class="select-option">Admin</option>
          <option class="select-option" selected>Member</option>
          <option class="select-option">Viewer</option>
        </select>
        <p class="field-hint" id="members-invite-role-hint">A member deploys and reads logs. An admin also manages people and environment variables. A viewer only reads.</p>
      </div>
      <p class="m(0) fg-text-muted">All five seats are taken. A sixth adds $20 a month from the day the invitation is accepted.</p>
    </form>
    <footer class="dialog-footer">
      <button type="button" class="btn" commandfor="members-invite" command="close">Cancel</button>
      <button type="submit" class="btn btn-primary" form="members-invite-form">Send invitation</button>
    </footer>
    <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="members-invite" command="close" aria-label="Close"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 4L12 12"/><path d="M4 12L12 4"/></svg></button>
  </dialog>
</section>
```

区块提供可直接复制的标记，沿用页面的文字颜色和字号。预览在 body 上设置 `fg-text-body text-sm`。每个区块都是尺寸容器，会根据自身宽度重排，无论放在宽页面、侧边栏大小的空间还是对话框中。

<a id="anatomy"></a>

## 区块组成

- **人数及其费用。** 标题下的一行说明共有多少人，以及每人占用一个席位。在这里添加成员就是在花钱，应该在对话框打开之前就让操作者知道。
- **页面只有一个主要操作。** “Invite a member”（邀请成员）是唯一的主[按钮](https://ui.master.co/cn/components/button.md)，位于头部末尾。它通过 `commandfor` 和 `command="show-modal"` 打开对话框，因此打开和关闭都不需要脚本。
- **成员是 `list` 中的行。** [头像](https://ui.master.co/cn/components/avatar.md)是 `list-media`，姓名和邮箱地址是 `list-body`，角色和该行的菜单是 `list-end`。媒体和末端内容相对于两行文字垂直居中。
- **角色是原生 `<select>`。** `select-sm` 让它与旁边的小号按钮等高。行内没有放标签的余地，因此每个选择框都以对应的成员命名：“Role of Po-han Chen”（Po-han Chen 的角色）。
- **所有者所在的行没有控件。** 已登录的人不能给自己降级，也不能移除自己，因此其角色是弱化墨色的文字，标题中的[徽标](https://ui.master.co/cn/components/badge.md)写着“You”（你）。所有权通过另一行[菜单](https://ui.master.co/cn/components/menu.md)中的“Make owner”（设为所有者）转移。
- **无法撤销的操作收在菜单里**，使用危险墨色，并写明把此人从哪里移除。它不作为按钮直接放在行内：一排五个红色按钮会让整个页面变成在讲离开。
- **邀请是第二个列表。** 邀请只有邮箱地址，还没有对应的人，因此它的行没有头像。行内的说明写明角色、由谁发出以及何时失效，每个日期都放在 `<time>` 中。
- **对话框说明这次选择的费用。** 角色下方的提示用一句话说明每个角色可以做什么，最后一行说明席位已满，以及再加一个席位会增加多少费用。这些数字与[计费摘要](https://ui.master.co/cn/blocks/billing-summary.md)一致：五个席位，每个 $20。

区块显示的是服务器保存的状态。更改角色、重新发送和撤销都是由你的应用发出的请求；每次请求之后，把结果写入 `role="status"` 区域以便播报，某一行离开时把焦点移到下一行。

<a id="roles"></a>

## 各角色的权限

选择角色之前，读者想先比较各个角色。这正是[表格](https://ui.master.co/cn/components/table.md)的用途：角色是列，可执行的操作是行，每个单元格回答是或否。它放在成员下方，或者放在单独的页面上，由对话框中的提示链接过去。

**各角色的权限**

```html
<section class="container-inline flex flex-col gap-md max-w(720) mx-auto" aria-labelledby="members-roles-title">
  <header class="flex flex-col gap-2xs">
    <h2 class="heading heading-lg" id="members-roles-title">Roles</h2>
    <p class="m(0) fg-text-muted">A workspace has one owner. Every other person is an admin, a member or a viewer.</p>
  </header>
  <div class="sheet overflow-hidden">
    <div class="scroll-area scroll-area-inline" tabindex="0" role="region" aria-labelledby="members-roles-title">
      <table class="table">
        <thead>
          <tr class="table-row">
            <th class="table-heading" scope="col"><span class="sr-only">What can be done</span></th>
            <th class="table-heading" scope="col">Owner</th>
            <th class="table-heading" scope="col">Admin</th>
            <th class="table-heading" scope="col">Member</th>
            <th class="table-heading" scope="col">Viewer</th>
          </tr>
        </thead>
        <tbody>
          <tr class="table-row">
            <th class="table-cell table-primary whitespace-nowrap" scope="row">Read deployments and logs</th>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
          </tr>
          <tr class="table-row">
            <th class="table-cell table-primary whitespace-nowrap" scope="row">Deploy a preview</th>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
          </tr>
          <tr class="table-row">
            <th class="table-cell table-primary whitespace-nowrap" scope="row">Promote to production</th>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
          </tr>
          <tr class="table-row">
            <th class="table-cell table-primary whitespace-nowrap" scope="row">Edit environment variables</th>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
          </tr>
          <tr class="table-row">
            <th class="table-cell table-primary whitespace-nowrap" scope="row">Invite and remove people</th>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
          </tr>
          <tr class="table-row">
            <th class="table-cell table-primary whitespace-nowrap" scope="row">Change the plan and pay</th>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
          </tr>
          <tr class="table-row">
            <th class="table-cell table-primary whitespace-nowrap" scope="row">Delete the workspace</th>
            <td class="table-cell"><svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5"/></svg><span class="sr-only">Yes</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
            <td class="table-cell fg-text-muted"><span aria-hidden="true">–</span><span class="sr-only">No</span></td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</section>
```

- **对勾和短横线，各配一个词。** 对勾是对辅助技术隐藏的[图标](https://ui.master.co/cn/components/icon.md)，短横线是一个字符；两者旁边各有一个 `sr-only` 的“Yes”（是）或“No”（否），因此单元格读出来是一个答案，而不是“图像”，也不是什么都不读。
- **各行从人人都能做的事排到只有一个人能做的事。** 顺着一列往下读，对勾在哪里结束，这个角色的权限就到哪里为止；顺着一行读，权限在哪里停止，短横线就从哪里开始。
- **它横向滚动，不重排。** 矩阵排成卡片来读，就不再是对比。空间较窄时，`scroll-area` 沿行内轴滚动，并在仍有列延伸的一侧渐隐；它设置了 `tabindex="0"`、角色和名称，因为它内部没有可获得焦点的元素。

<a id="accessibility"></a>

## 无障碍

- 区块是一个以其 `<h2>` 命名的 `<section>`。待答复的邀请是 `<h3>` 下的独立区段，因此按标题浏览的读者能找到两个列表。
- 行内控件的名称带上所在的行：“Role of Seo-yeon Kim”（Seo-yeon Kim 的角色）、“More for Seo-yeon Kim”（Seo-yeon Kim 的更多操作）、“Revoke the invitation to yuna@atlaslabs.dev”（撤销发给 yuna@atlaslabs.dev 的邀请）。在表单字段列表中，五个都叫“Role”的控件无法区分。
- 人像与旁边的姓名重复，因此 `alt` 留空。
- 对话框以其标题命名，由标题下方的句子描述，打开时焦点移到邮箱字段。关闭时，浏览器会把焦点交还给打开它的按钮。
- 对话框的提交按钮位于页脚，在表单之外，通过 `form` 与表单关联。在邮箱字段中按 Enter 即可提交；遇到无法发送的地址时，浏览器自带的验证会让对话框保持打开。

<a id="related"></a>

## 相关内容

- [列表](https://ui.master.co/cn/components/list.md)
- [头像](https://ui.master.co/cn/components/avatar.md)
- [下拉选择框](https://ui.master.co/cn/components/select.md)
- [菜单](https://ui.master.co/cn/components/menu.md)
- [对话框](https://ui.master.co/cn/components/dialog.md)
- [表格](https://ui.master.co/cn/components/table.md)
- [滚动区域](https://ui.master.co/cn/components/scroll-area.md)
- [徽标](https://ui.master.co/cn/components/badge.md)

- [计费摘要](https://ui.master.co/cn/blocks/billing-summary.md)
- [表格视图](https://ui.master.co/cn/blocks/table-view.md)
- [团队](https://ui.master.co/cn/blocks/team.md)
- [登录](https://ui.master.co/cn/blocks/sign-in.md)
