Conversation
- 記事一覧を囲んでいるdivをsectionにし、sr-onlyで「記事一覧」見出しを追加 - 検索結果の件数表示を追加 - 1記事をdivではなくarticleで囲い aria-labelledby で見出しと紐付け - 投稿日、カテゴリーに sr-only でラベルを追加 - タグリストにrole="list" と aria-label="タグ" を追加 - 画像のリサイズを縦横から横幅基準に変更 - noimage画像の alt 属性を空文字に変更
## レイアウト - 記事一覧の日付レイアウトの余白をmarginからgapに変更し、折り返し考慮 - ページ全体レイアウトが1カラムになった時に画像が大きくなりすぎる問題対応 ## マークアップ - 新着記事がない時のコメントを追加 - 記事一覧をul化しサイドコンテンツとして扱う - 投稿日に sr-only でラベルを追加 - noimage画像の alt 属性を空文字に変更
- キーワード検索時にh1がなかったため追加 - 記事が1件もない時に空要素が出ないよう対策
- カテゴリーとタグに読み上げ用ラベルを追加
- `tag-relational-card.twig` を `article` から `ul/li` に変更 - `tag-relational-tiny.twig` を `div` から `ul/li` に変更 - `_entry.twig` のマークアップ構造を調整
There was a problem hiding this comment.
Pull request overview
This PR improves the semantic HTML markup for article listings by distinguishing between primary content and navigational/auxiliary lists. The main changes restructure templates to use <ul>/<li> for supplementary article lists (related articles, sidebars) and <article> elements for main content listings (search results, category pages), enhancing screen reader accessibility.
- Changed auxiliary article lists from
<article>to<ul>/<li>structure for better navigation - Enhanced accessibility with sr-only labels for dates, categories, and aria attributes
- Updated image handling with improved conditional checks and dimension adjustments
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| themes/develop/include/entry/tag-relational-tiny.twig | Converted from article elements to ul/li structure, added sr-only label for publish date, improved image condition checking |
| themes/develop/include/entry/tag-relational-card.twig | Converted to ul/li structure, changed h2 to h3, added sr-only label for category, removed admin module include and tags display |
| themes/develop/include/entry/summary-tiny.twig | Converted to ul/li structure, added empty state message, improved image conditionals and dimensions, added sr-only label for publish date |
| themes/develop/include/entry/summary-card.twig | Kept article elements for main listings, restructured heading hierarchy, added aria-labelledby, sr-only labels, and improved image handling with dynamic height calculation |
| themes/develop/_entry.twig | Changed section to aside for related articles, removed string parameter, added conditional check for offset items, reorganized module setting includes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
atsu666
approved these changes
Dec 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
コミットメッセージだけでは伝わりずらいところについて補足します。
記事一覧での article と の使い分けについて
article を採用するケース
ページの主役となる一覧(検索結果、カテゴリ一覧など)
ユーザーが「記事を読む/探す」ことが主目的となるため、各アイテムを独立したコンテンツとして扱います。
ul / li を採用するケース
補助的な記事リスト(関連記事、サイドバーの新着記事など)
「次に読む記事を選ぶ」ためのナビゲーションとしての役割が強いため、リスト構造を採用しました。
これにより、スクリーンリーダー等で「リスト」として認識され、スキップ操作などが容易になります。