Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Command palette listbox and combobox ARIA is invalid when open

未关闭
#15,399 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript

调研方向

Start with resources/js/components/command-palette/CommandPalette.vue, referenced at v6.31.0, and inspect the combobox, ComboboxContent, dialog, and results viewport. Open the palette and run axe-core to confirm the reported violations. Done means the listbox has valid children and an accessible name, the dialog is modal, the viewport is keyboard-focusable, and the empty aria-controls issue is resolved.

由索引模型根据 Issue 内容生成。

描述

accessibility command palette
Bug description

The command palette (Cmd/Ctrl+K) gets the hard parts right — role="dialog", focus moved inside, the rest of the page inert, Escape closes — but the combobox and listbox inside it are not valid ARIA. Four Level A violations fire the moment it opens.

axe-core on the open palette:

Rule Impact Detail
aria-required-children critical role="listbox" contains a <footer>
aria-required-attr critical role="combobox" has no usable aria-controls
aria-input-field-name serious the listbox has no accessible name
scrollable-region-focusable serious the results viewport scrolls but cannot take focus

Offending elements:

<input role="combobox" aria-expanded="true" aria-controls="" aria-autocomplete="list"
       placeholder="Search or jump to...">

<div role="listbox" aria-orientation="vertical" aria-multiselectable="false"
     id="reka-combobox-content-…" tabindex="-1">

<div class="max-h-[360px] min-h-[360px] overflow-y-auto" data-reka-combobox-viewport role="presentation">

The dialog also has no aria-modal="true":

https://github.com/statamic/cms/blob/v6.31.0/resources/js/components/command-palette/CommandPalette.vue#L302

Because the palette is the primary keyboard navigation affordance in the CP, this is the one place where broken ARIA hurts keyboard-first users most.

WCAG 2.1 SC 4.1.2 Name, Role, Value (Level A). The scrollable region is SC 2.1.1 Keyboard.

How to reproduce
  1. composer create-project statamic/statamic, log in
  2. Press Cmd+K (or Ctrl+K)
  3. Run axe-core against the page with the palette open, or inspect the elements above
Suggested fix
  • Move the <footer> outside ComboboxContent so the role="listbox" element only contains option/group children, and give the listbox an accessible name.
  • The aria-required-attr failure is the empty aria-controls reported in #15400, not a separate defect. Fixing that fixes this too.
  • Add aria-modal="true" to the dialog.
  • Put tabindex="0" on the scrollable results viewport so keyboard users can scroll it.

Related: the empty aria-controls here is the same defect reported separately for comboboxes and popovers.

Environment

Environment
Laravel Version: 13.30.1
PHP Version: 8.4.23
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.31.0 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

Found during a WCAG 2.1 AA audit of a vanilla composer create-project statamic/statamic install with no addons and no custom code. Tested with axe-core 4.x on Chromium 153 at 1440x1000, plus manual keyboard traversal. Source references point at v6.31.0.


Correction (see comment below): I originally described the aria-required-children failure as an empty listbox and aria-required-attr as an unnamed missing attribute. Both were imprecise; the table and suggested fixes above have been updated with axe's actual output.

主要语言
PHP
星标
4.9k
派生
647
平均合并
1 天 8 小时
30 天内合并 PR
100

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

statamic/cms 的其他 Issue

查看 statamic/cms 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。