【发布时间】:2021-09-29 00:49:43
【问题描述】:
在花了几个小时寻找解决方案并阅读了类似问题后,我发布了一个新问题。
使用 NVDA,当文本框获得焦点时,会读取标签 (Organization),然后读取 aria- describeby 内容 (200 West Street, New York, NY),然后读取值 (Goldman Sachs):
<label for="organization">Organization</label>
<input type="text" id="organization" value="Goldman Sachs" aria-describedby="organizationLocation" />
<span id="organizationLocation">200 West Street, New York, NY</span>
出于显而易见的原因,在这种情况下,最好先读取标签(组织),然后读取值(Goldman Sachs),然后读取 aria- describeby 内容(200 West Street, New York, NY)。
我也尝试从 aria- describeby 属性中引用文本框,尽管文本框 (Goldman Sachs) 的值是重复的,在标签 (组织) 和组织位置之后宣布一次:
<label for="organization">Organization</label>
<input type="text" id="organization" value="Goldman Sachs" aria-describedby="organization organizationLocation" />
<span id="organizationLocation">200 West Street, New York, NY</span>
实现所需功能有多难?
【问题讨论】:
标签: html label wai-aria screen-readers nvda