本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #3048

td-headers-attr

できること

このスキルは、複雑な表のセルにある headers 属性を確認します。複数階層の見出しを持つ表を作る開発者向けです。

使う場面

  • ✓表に複数階層の見出しがあり、scope だけでは十分に説明できないとき。
  • ✓存在しない ID を指す headers 属性がセルにあるとき。
  • ✓複雑な表がスクリーンリーダーで分かりにくいとレビューで指摘されたとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/td-headers-attr/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/td-headers-attr/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私の財務の表には見出しが二段あり、スクリーンリーダーが混乱します。各セルを正しい見出しに関連付けてもらえますか。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、各セルの headers 属性が有効な見出しの ID を指しているかを確認します。誤った参照や欠けている参照を修正します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Link table cells to headers using IDs

In complex tables with multi-level headers, explicit header-to-cell linking ensures screen readers accurately announce the relationship between data and its context.

Quick Reference

  • Use the headers attribute for complex tables where scope isn't enough
  • Ensure the headers attribute references valid id values of <th> elements
  • Separate multiple header IDs with spaces

Check

Verify that td headers attributes reference valid and existing th IDs.

Fix

Correct the headers attribute to reference the appropriate th IDs.

Explain

Explain when to use the headers attribute instead of scope for complex table structures.

Code Review

Review the rendered markup and interactive states that affect Link table cells to headers using IDs. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/accessibility/td-headers-attr

よくある質問

headers と scope はどのように使い分けますか?

scope では不十分な場合、例えば見出しの階層が複数ある表では headers を使うよう、このスキルは説明しています。

ID が存在しない場合はどうなりますか?

参照が壊れるため、そのセルを支援技術に正しく説明できません。

一つのセルが複数の見出しを指すことはできますか?

はい。複数の見出しの ID を、スペースで区切って指定できます。

詳細

作者による元の説明

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Link table cells to headers using IDs. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#3048
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル