aria-controls is emitted as an empty string on comboboxes, popovers and date pickers
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, laravel, php
調査の方向性
resources/js/components/ui/Combobox/Combobox.vue の約390行目にある aria-controls のバインディングを起点とし、同じバインディングを resources/js/components/ui 配下の Popover、date field、command palette の各コンポーネントで追跡してください。提案されている条件付きバインディング(popup の id が空の場合に属性を省略する)を適用し、再現手順のコンソールクエリがノードを返さないこと、および日付フィールドと select フィールドを持つエントリに対する axe-core の実行で検証してください。完了の条件は、CP 内のどこにも aria-controls="" をレンダリングする要素が存在しないことです。
索引モデルが issue の本文から書いたものです。
説明
Bug description
Popup triggers across the CP render aria-controls="" — an empty string — when their popup element has not been created yet.
An empty aria-controls is an invalid attribute value, not a neutral one. Assistive technology is told a controlling relationship exists and then cannot resolve the target.
axe-core reports aria-valid-attr-value (critical, needs-review) on 25 nodes across 9 CP screens.
Examples:
<!-- date picker -->
<button aria-label="Open calendar" aria-haspopup="dialog" aria-expanded="false" aria-controls="">
<!-- combobox trigger -->
<div tabindex="0" aria-haspopup="listbox" aria-expanded="false" aria-controls="">
<!-- generic popover -->
<button data-ui-popover-trigger aria-haspopup="dialog" aria-expanded="false" aria-controls="">
<!-- command palette input -->
<input role="combobox" aria-autocomplete="list" aria-controls="">
Affects Combobox, Popover, the date field, and the command palette. There is a closed issue from the 3.x era on the same theme for SVGs (#2605), so this pattern has come up before.
WCAG 2.1 SC 4.1.2 Name, Role, Value (Level A).
How to reproduce
composer create-project statamic/statamic- Add a
datefield and aselectfield to a blueprint, open an entry - In the console:
[...document.querySelectorAll('[aria-controls=""]')].map(e => e.outerHTML.slice(0, 120))
Returns the date-picker trigger and the select trigger, among others.
Suggested fix
Omit the attribute entirely until the popup element exists, rather than binding it to an empty string — i.e. :aria-controls="popupId || undefined" at the points where these are bound.
Since most of these come through reka-ui primitives, the fix may belong in how Statamic configures them (or may be worth an upstream report there).
Related: https://github.com/statamic/cms/blob/v6.31.0/resources/js/components/ui/Combobox/Combobox.vue#L390
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.
- 主要言語
- PHP
- スター
- 4.9k
- フォーク
- 647
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 103
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
statamic/cms のほかの issue
-
preferences
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
There's a default crop when cropping images対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンassets
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
statamic/cms#15567 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
accessibility
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
antlers
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
dependabot/dependabot-core#16547 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
glpi-project/glpi#25922 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/safe-publish#726 ·
メンテナーはふだん 1 日以内に返信
-
[Translation][TwigBridge][TwigBundle] Add `HtmlTranslator` and the `tra…対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンTranslation TwigBridge
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
symfony/symfony-docs#23308 ·
メンテナーはふだん 3 日以内に返信