我正在创建一个在相关输入下方显示验证错误的 from。为了使表单更易于访问,我在 div 中添加了 aria-lives 来保存错误消息。拥有多个 aria-live 会不会让用户变得更糟?
<div
id="awesome-id">
<label for="awesome-id--input">
This is a label
</label>
<input
type="tel"
id="awesome-id--input"
required>
<div
role="region"
aria-live="polite"
id="awesome-id--error-message">
</div>
</div>
<div
id="another-id">
<label for="another-id--input">
This is another label
</label>
<input
type="tel"
id="another-id--input"
required>
<div
role="region"
aria-live="polite"
id="another-id--error-message">
</div>
</div>