1

我在联系表格 7 和可访问性方面有 2 个问题。

在不改变插件核心代码的情况下:

  1. 当我将鼠标悬停在它们上时,如何阻止错误消息消失?
  2. 错误消息当前正在输入旁边的跨度中生成,有什么方法可以让它出现在标签中?否则屏幕阅读器将永远不会阅读它。
4

1 回答 1

0

Both of these might require core code editing from the sounds of it.

The error message is currently being generated in a span right next to the input, any way to make it appear IN the label? Otherwise a screen reader won't ever read it.

I don't recommend doing this. What I recommend is seeing if the <span>s have their own id, if so you can probably write some JS function that looks for either the id and add the aria-describedby="spanIDhere" to the associated <input>. Or if the <span> don't have one, generate one, then insert it like mentioned.

Most AT will read it as <label> text, text in the span denoted by the ID, form element type.

于 2012-10-31T17:49:08.723 回答