【问题标题】:How can I have the ChromeVox extention pronounce all HTML form errors, not just one?我怎样才能让 ChromeVox 扩展读出所有 HTML 表单错误,而不仅仅是一个?
【发布时间】:2016-04-12 11:40:39
【问题描述】:

我很好奇如何阅读在填写 HTML 表单并单击按钮时出现的所有错误。

所有错误 - 例如“请输入您的中间名”、“请输入您的年龄”等都应该发音。

aria-invalid="true"role="alert"aria-atomic="true" 及其组合进行了测试。

它根本不工作或工作正常,但只读取一个错误。我需要发音所有错误。

任何使用 HTML 的标准方法来做到这一点?

此问题适用于 ChromeVox 和 JAWS。

【问题讨论】:

  • 什么是“屏幕阅读器”?你的标题是 ChromeVox,你的标签是 Jaws——关于哪个屏幕阅读器是你的问题?
  • 谢谢。问题已更新。至于没有 ChromeVox 标签,只添加了 JAWS-screen-reader 标签。 JAWS 读取所有错误,ChromeVox 仅读取第一个错误。我希望 ChromeVox 读出所有错误。

标签: html google-chrome accessibility screen-readers jaws-screen-reader


【解决方案1】:

我相信您要查找的内容称为ARIA Live Regions

<form onSubmit="...">
  <input id="username" />
  <span
    aria-live="polite"
    aria-controls="username"
  >Username is required.<span>
  <button type="submit">Submit</button>
</form>

在将错误动态插入元素之前,请确保页面中存在具有aria-live 属性的元素。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-17
    • 1970-01-01
    • 2019-09-07
    • 1970-01-01
    相关资源
    最近更新 更多