This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git
The following commit(s) were added to refs/heads/master by this push:
new fb73ca9 tweak aria doc
fb73ca9 is described below
commit fb73ca9f1cd26ea0caaac94afb7df748b43eddbb
Author: plainheart <[email protected]>
AuthorDate: Wed Sep 17 19:11:38 2025 +0800
tweak aria doc
---
contents/en/best-practices/aria.md | 3 ---
contents/zh/best-practices/aria.md | 19 ++++++++++++++++++-
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/contents/en/best-practices/aria.md
b/contents/en/best-practices/aria.md
index a532972..8c9da2d 100644
--- a/contents/en/best-practices/aria.md
+++ b/contents/en/best-practices/aria.md
@@ -30,9 +30,6 @@ After importing the AriaComponent and setting
[aria.show](${optionPath}aria.show
Example configuration object:
```js
-import { AriaComponent } from 'echarts/components';
-echarts.use(AriaComponent);
-
option = {
aria: {
show: true
diff --git a/contents/zh/best-practices/aria.md
b/contents/zh/best-practices/aria.md
index 135863c..315be82 100644
--- a/contents/zh/best-practices/aria.md
+++ b/contents/zh/best-practices/aria.md
@@ -6,9 +6,26 @@ Apache ECharts 4 遵从这一规范,支持自动根据图表配置项智能生
无障碍访问功能默认关闭,需要通过将 [aria.show](${optionPath}aria.show) 设置为 `true` 开启。
+## 导入 AriaComponent
+
+从 ECharts 5 开始, `aria` 组件不再默认导入。在使用无障碍访问特性之前,你需要先导入和注册 `AriaComponent` 组件:
+
+```js
+import { AriaComponent } from 'echarts/components';
+echarts.use(AriaComponent);
+```
+
+或者如果你在使用 CommonJS 模块:
+
+```js
+require('echarts/lib/component/aria');
+```
+
+如果未导入 `AriaComponent` 组件,设置 `aria.show: true` 不会生效。
+
## 图表描述
-开启 [aria.show](${optionPath}aria.show)
后,会根据图表、数据、标题等情况,自动智能生成关于图表的描述,用户也可以通过配置项修改描述。
+在导入 `AriaComponent` 组件并开启 [aria.show](${optionPath}aria.show)
后,会根据图表、数据、标题等情况,自动智能生成关于图表的描述,用户也可以通过配置项修改描述。
对于配置项:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]