为什么图表只有替代文本不够
替代文本应该简短,而一张图表的信息远不是一句话能装下的。WCAG 允许分工:替代文本说明这是什么图,例如“1 月至 6 月网站月访问量折线图”,旁边的长描述再给出趋势和数字。数据表往往是最有用的替代方式,因为读屏用户可以逐格浏览。
要无障碍地描述一张图表(describe a chart),需要三样东西:一句说明这是什么图表的替代文本,一段说明图表内容的长描述,以及数据本身。图表描述输出能从一张图片同时写出这三样:说明图表类型和坐标轴,指出主要趋势和关键数值,并把能读出的数值整理成可编辑的表格,放在图表旁边发布。
最近更新:

alt=
Bar chart showing monthly rainfall in a coastal town, peaking in December at 95 mm and reaching a low in July at 22 mm.
This bar chart titled 'Monthly rainfall in a coastal town (mm)' displays rainfall data for each month of the year. The vertical axis represents rainfall in millimeters, ranging from 0 to 100. The horizontal axis lists the months from January to December. The rainfall values are as follows: January, 78 mm; February, 62 mm; March, 55 mm; April, 48 mm; May, 41 mm; June, 30 mm; July, 22 mm; August, 26 mm; September, 44 mm; October, 69 mm; November, 88 mm; and December, 95 mm. The trend shows a gradual decline in rainfall from January to a low point in July, followed by a steady increase through the remainder of the year, reaching its peak in December.
| Month | Rainfall (mm) |
|---|---|
| Jan | 78 |
| Feb | 62 |
| Mar | 55 |
| Apr | 48 |
| May | 41 |
| Jun | 30 |
| Jul | 22 |
| Aug | 26 |
| Sep | 44 |
| Oct | 69 |
| Nov | 88 |
| Dec | 95 |

alt=
Line chart showing that North branch library visits grew faster than River branch visits over 12 weeks.
This line chart displays weekly library visits for two branches, North and River, over a 12-week period. The vertical axis represents the number of visits, ranging from 0 to 800. The horizontal axis represents the weeks, labeled W1 through W12. The North branch (solid orange line) shows a steady upward trend, starting at approximately 320 visits in W1 and reaching about 760 visits by W12, with a slight dip at W6. The River branch (dashed teal line) shows a more gradual increase, starting at approximately 300 visits in W1 and ending at about 400 visits in W12, with minor fluctuations throughout the period. Overall, the North branch consistently records higher and faster-growing visit numbers compared to the River branch.
| Week | North branch | River branch |
|---|---|---|
| W1 | 320 | 300 |
| W2 | 340 | 290 |
| W3 | 360 | 310 |
| W4 | 410 | 300 |
| W5 | 450 | 330 |
| W6 | 430 | 350 |
| W7 | 520 | 340 |
| W8 | 580 | 360 |
| W9 | 610 | 380 |
| W10 | 640 | 370 |
| W11 | 700 | 390 |
| W12 | 760 | 400 |

alt=
A donut chart showing that heating accounts for 42% of a home's yearly energy use, the largest share.
This donut chart is titled 'Where a home uses its energy (share of yearly use)'. It displays the percentage breakdown of annual household energy consumption across six categories. Heating is the largest segment at 42% (brown). Hot water follows at 18% (blue), then appliances at 16% (green). Cooking and 'Other' each account for 9% (purple and grey, respectively), and lighting represents the smallest share at 6% (gold).
| Category | Share of yearly use |
|---|---|
| Heating | 42% |
| Hot water | 18% |
| Appliances | 16% |
| Cooking | 9% |
| Other | 9% |
| Lighting | 6% |

alt=
A flowchart showing the five-step process of recycling a bottle into a new product, with a feedback loop.
This flowchart, titled 'How a recycled bottle becomes a new product', illustrates a five-step circular recycling process. The steps are arranged horizontally in boxes connected by solid arrows: 1. Sort at home, 2. Kerbside pickup, 3. Sorting centre, 4. Bale and ship, and 5. New products. The fifth box is highlighted in light green. A dashed green arrow curves from the 'New products' box back to the 'Sort at home' box, labeled 'used again and sorted again', indicating a continuous cycle.
| Step | Description |
|---|---|
| 1 | Sort at home |
| 2 | Kerbside pickup |
| 3 | Sorting centre |
| 4 | Bale and ship |
| 5 | New products |
使用清晰的截图或导出图,格式为 JPG、PNG 或 WebP。标签和数字在正常大小下应清晰可读。
图表描述输出会返回替代文本、长描述和数据表。填写页面主题,摘要会更贴近读者需要的信息。
把表格与源数据对照,直接修改有误的数值,然后复制 HTML:带替代文本的图片,以及包含描述和表格的 details 区块。
替代文本应该简短,而一张图表的信息远不是一句话能装下的。WCAG 允许分工:替代文本说明这是什么图,例如“1 月至 6 月网站月访问量折线图”,旁边的长描述再给出趋势和数字。数据表往往是最有用的替代方式,因为读屏用户可以逐格浏览。
长描述先说明图表类型和衡量对象,再说整体规律,然后是重要数值:最高点和最低点、明显的变化,以及各系列之间的对比。表格会抄录模型能读到的数值,首行为表头,最多 30 行 8 列。图上没有标出的数值是根据坐标轴估算的,请务必与源数据核对。
同样的输出适用于各类统计图的替代文本(alt text for graphs),从散点图到堆叠柱状图都可以。对于流程图、地图和没有数字的示意图,长描述输出通常更合适,因为没有表格需要填。
替代文本每张 2 积分,详细描述 4 积分,带数据表的图表描述 5 积分。批次中每张图片价格相同,失败的任务自动退还。图片由 Gemini Flash 读取。 积分包 $2.65 起。 查看套餐和积分包
给它一句说明图表及主题的简短替代文本,再加一段描述趋势和关键数值的长描述,最好附上数据表。图表描述输出会写好这三部分供你审核。
图上标出的数值会照原样抄录;根据柱高或折线位置读出的数值是估算值。发布前请与源数据核对。
放在图表旁边,可以是可见文字,也可以是可展开的 details 区块。HTML 复制会给出已排好描述和表格的 details 区块。
可以。从 30 种语言中任选一种,替代文本、描述和表头都会用该语言写成。