[Accessibility] tabBarExtraContent is owned by role="tablist"
まだ誰も着手していません。
- #1018 @nrps9909 による — マージされずにクローズ
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 64/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
src/TabNavList/index.tsx から始め、特に tablist wrapper と ExtraContent、operation controls、tab nodes の配置を確認してから、src/TabNavList/ExtraContent.tsx を読みます。aria-required-children を有効にした axe の絞り込んだ再現を実行し、既存のキーボード、測定、overflow、layout、RTL のテストを調べます。extra interactive content が tablist の所有範囲外に配置され、refs、スクロール、overflow、ink-bar の動作、キーボードナビゲーションを壊さないことが完了の条件です。
索引モデルが issue の本文から書いたものです。
説明
Summary
tabBarExtraContent is rendered inside the element with role="tablist". When the extra content is interactive, the tablist therefore owns a non-tab control and axe reports a critical aria-required-children violation.
This is the canonical implementation behind these accepted Ant Design reports:
- https://github.com/ant-design/ant-design/issues/49502
- https://github.com/ant-design/ant-design/issues/53584
Minimal reproduction
<Tabs
items={[{ key: 'one', label: 'One', children: 'Panel one' }]}
tabBarExtraContent={<button type="button">Extra action</button>}
/>
Run axe with the aria-required-children rule enabled.
A focused probe through current Ant Design master, which uses @rc-component/tabs 1.12.0, produced this reduced structure:
<div role="tablist" aria-orientation="horizontal" class="ant-tabs-nav">
<div class="ant-tabs-nav-wrap">
<div class="ant-tabs-nav-list">
<div role="tab">One</div>
</div>
</div>
<div class="ant-tabs-extra-content">
<button type="button">Extra action</button>
</div>
</div>
Observed axe result:
aria-required-children (critical)
Element has children which are not allowed: button
Target: .ant-tabs-nav
Related node: .ant-tabs-extra-content > button
The canonical source has the same structure on current master (bf6dbda):
TabNavList/index.tsxputs bothExtraContentpositions, the tab nodes, the add control, andOperationNodeunder the element withrole="tablist".ExtraContent.tsxrenders the caller-provided content inside that tree.
Expected behavior
The tablist should own the role="tab" elements, while arbitrary interactive extra content remains visually adjacent but outside the tablist's accessibility ownership.
Possible implementation and regression boundaries
One possible direction is to put role="tablist" on an inner element that owns only the tabs, while leaving extra content and other non-tab controls outside it. The exact DOM change needs to preserve the existing tabListRef measurements, scrolling, overflow dropdown, ink bar, and layout behavior.
Regression coverage should include:
- interactive extra content at both
leftandrightpositions; - editable add/remove controls and the overflow/more operation;
- horizontal, vertical, and RTL layouts;
- existing keyboard navigation and tab measurement/overflow tests;
- an axe assertion with
aria-required-childrenenabled.
I searched the canonical repository's open and closed issues and PRs and found no duplicate for extra content under the tablist. #809 is related accessibility work, but it concerns the remove button's own role rather than tabBarExtraContent ownership.
AI assistance disclosure: Codex was used to trace canonical ownership, search existing issues and PRs, and run the focused axe reproduction. The reported DOM and axe output were verified against current source.
- 主要言語
- TypeScript
- スター
- 573
- フォーク
- 243
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/tabs のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
react-component/tabs#865 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
react-component/tabs#809 · コメント 1 件 ·
-
Editable tabs: add and remove buttons owned by role=tablist keep aria-required-children firing再び着手できるかも @A-RYAN-1 が 8 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
react-component/tabs#1025 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
react-component/tabs#777 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
react-component/tabs#726 ·
react-component/tabs の issue をすべて見る
似ている issue
-
Dependencies view: `getParent` loops forever on untitled documents, extension host runs out of memory対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
awslabs/visual-asset-management-system#413 ·
メンテナーはふだん 1 日以内に返信
-
bug confirmed perf
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
videojs/video.js#9400 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug pending triage scope/agent
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
good first issue hacktoberfest
難易度 2/5 半日 初心者へのやさしさ 70/100
HelpCode-ai/anythingmcp#996 ·
メンテナーはふだん 1 日以内に返信