Skip to content

Commit 060aff0

Browse files
authored
Merge pull request #275 from ma10/add-faq-icon-alt-20241202
アイコン画像の代替テキストに関するFAQ追加
2 parents 800f817 + 896a4b2 commit 060aff0

File tree

5 files changed

+57
-0
lines changed

5 files changed

+57
-0
lines changed

data/yaml/faq/d0004.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
id: d0004
2+
updated: '2024-12-02'
3+
sortKey: 10050
4+
tags:
5+
- markup
6+
- screen-reader
7+
title:
8+
ja: アイコン画像の代替テキストに「アイコン」や「ボタン」という言葉を含めるべきか
9+
en: Should the Words "Icon" or "Button" Be Included in the Alternative Text of Icon Images?
10+
problem:
11+
ja: |-
12+
アイコン画像の説明として、代替テキストに「アイコン」や「ボタン」という言葉を含める必要はないのか。
13+
en: |-
14+
Isn't it necessary to include the words "icon" and/or "button" in the alternative text of icon images?
15+
solution:
16+
ja: |-
17+
代替テキストに「アイコン」や「ボタン」という言葉を含めるべきではない。
18+
en: |-
19+
The words "icon" and/or "button" should not be included in the alternative text.
20+
explanation:
21+
ja: |-
22+
適切なマークアップがされているアイコン画像を読み上げる際、スクリーン・リーダーはそれが画像であるという情報と共に代替テキストを読み上げますので、ユーザーはそれがアイコンであることを推測できます。
23+
ですから、代替テキストに「アイコン」という言葉を含める必要はありません。
24+
そもそも、それがアイコンであるかどうかを判断できなければ機能の利用や情報の取得に支障があるような状況は避けるべきです。
25+
26+
また、そのアイコンがボタンになっている場合は、それがボタンであるという情報も読み上げます。
27+
そのため、代替テキストに「ボタン」という言葉を含める必要もありません。
28+
もしボタンであることが分からないような読み上げになる場合は、マークアップに問題がある可能性が高いです。
29+
30+
参考:スクリーン・リーダーによる画像やボタンといった情報の追加は、読み上げ対象となっている要素のロール(役割)に基づいています。
31+
すべての要素にはデフォルトのロールがあります。
32+
また ``role`` 属性を用いることで、要素のロールをデフォルトから変更することができます。
33+
適切な要素を用いて、必要に応じて ``role`` 属性を活用することで、スクリーン・リーダーが適切に情報を追加できるようになります。
34+
en: |-
35+
When a properly marked-up icon image is read aloud by a screen reader, it announces that it is an image along with its alternative text, allowing users to infer that it is an icon.
36+
Therefore, there is no need to include the word "icon" in the alternative text.
37+
In the first place, situations where users cannot determine whether something is an icon and are thereby hindered from using a feature or obtaining information should be avoided.
38+
39+
Additionally, if the icon serves as a button, the screen reader will announce that it is a button.
40+
For this reason, there is no need to include the word "button" in the alternative text either.
41+
If the announcement fails to convey that it is a button, there is likely an issue with the markup.
42+
info:
43+
- exp-image-text-alternative
44+
- exp-markup-component
45+
- exp-markup-semantics
46+
guidelines:
47+
- gl-image-description
48+
checks:
49+
- '0421'
50+
- '0431'
51+
- '0441'

en/source/explanations/markup-component.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ WCAG 2.1の解説書では、フォーカスの状態の取得と制御、チェ
4444
上述の通り、まずは開発者ツールで最低限の確認が可能ですが、実際にはスクリーン・リーダーなどの支援技術のユーザーが正しく利用できる状態を確保することが目的ですので、最終的には支援技術で使い勝手を確認するのが望ましいでしょう。
4545

4646
.. include:: /inc/info2gl/exp-markup-component.rst
47+
48+
.. include:: /inc/info2faq/exp-markup-component.rst

en/source/intro/history.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ For the changes to the original Japanese version, please refer to the `Japanese
1212
Changes After the Latest release
1313
================================
1414

15+
* Added FAQ: :ref:`faq-d0004`
1516

1617
`Ver. 202411.0 (Nov 22, 2024) <https://github.com/freee/a11y-guidelines/releases/202411.0>`__
1718
=============================================================================================

ja/source/explanations/markup-component.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ WCAG 2.1の解説書では、フォーカスの状態の取得と制御、チェ
4444
上述の通り、まずは開発者ツールで最低限の確認が可能ですが、実際にはスクリーン・リーダーなどの支援技術のユーザーが正しく利用できる状態を確保することが目的ですので、最終的には支援技術で使い勝手を確認するのが望ましいでしょう。
4545

4646
.. include:: /inc/info2gl/exp-markup-component.rst
47+
48+
.. include:: /inc/info2faq/exp-markup-component.rst

ja/source/intro/history.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Ver. 202205.0以降、チェック内容に関連する更新情報は :ref:`che
1111
最新リリース以降の変更点
1212
========================
1313

14+
* FAQ追加: :ref:`faq-d0004`
1415

1516
.. include:: ChangeLog/2024/202411.0.rst
1617
.. include:: ChangeLog/2024/202409.0.rst

0 commit comments

Comments
 (0)