|
| 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' |
0 commit comments