简体   繁体   English

联系表格7 Wordpress可访问

[英]Contact Form 7 Wordpress Accessible

I have 2 problems with Contact Form 7 and accessibility. 我在联系表格7和可访问性方面有2个问题。

Without changing the core code of the plugin: 在不更改插件核心代码的情况下:

  1. How can I stop the error message from fading away when I mouseover them? 将鼠标悬停在错误消息上时,如何阻止该错误消息消失?
  2. 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. 否则,屏幕阅读器将永远不会阅读它。

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> . 我建议看一下<span>是否具有自己的id ,如果可以的话,您可以编写一些JS函数来查找该id并将aria-describedby="spanIDhere"到关联的<input> Or if the <span> don't have one, generate one, then insert it like mentioned. 或者,如果<span>没有一个,则生成一个,然后如前所述将其插入。

Most AT will read it as <label> text, text in the span denoted by the ID, form element type. 大多数AT会将其读取为<label>文本,即以ID表示的span文本,表单元素类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM