Command palette listbox and combobox ARIA is invalid when open
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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":
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
composer create-project statamic/statamic, log in- Press Cmd+K (or Ctrl+K)
- Run axe-core against the page with the palette open, or inspect the elements above
Suggested fix
- Move the
<footer>outsideComboboxContentso therole="listbox"element only contains option/group children, and give the listbox an accessible name. - The
aria-required-attrfailure is the emptyaria-controlsreported 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.
- Ngôn ngữ chính
- PHP
- Star
- 4.9k
- Fork
- 647
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 100
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của statamic/cms
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
There's a default crop when cropping imagesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởassets
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Make native filesystem directory permissions configurable to support shared POSIX ACL accessĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
antlers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
WordPress/hosting-handbook#506 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Installing a plugin with composer_packages installs dev dependencies and breaks the autoloader (Error 500)Có thể đã có người làm @Boy132 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
nginx: static-file locations drop the security headers, and the dotfile deny is matched after themĐang mởbug Low Security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
backdrop-contrib/commerce#60 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100