HTML辅助功能错误 - 标签文本为空? [英] HTML Accessibility Error - Label text is empty?

查看:181
本文介绍了HTML辅助功能错误 - 标签文本为空?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  

我继续收到这个错误,即使包含错误的行没有标签元素? > 3.3输入帮助:帮助用户避免和纠正错误。

成功标准3.3.2标签或说明(A)

检查188:标签文本为空。
修复:向标签元素添加文本。
错误第75行,第6列:
< input class =subsubmittype =resetvalue =Resetid =Reset>

代码为:

 < section id =subscribeEmail> 
<! - 本部分允许用户选择订阅我的博客(如果他们没有RRS订阅源)。它只需要一个名字和电子邮件地址,然后将其发送到我的电子邮件地址
,然后我可以将他们的电子邮件存储并将它们添加到我每次发送新博文后的CC中。 - >
< h3>从不错过帖子:< / h3>
< form class =subscribeaction =mailto:tm_mitchell@hotmail.co.ukmethod =post>
< label for =sub-name>输入名称:< / label>
< input id =sub-nametitle =nameclass =subtype =textsize =35maxlength =40placeholder =Full Namerequired>
< label for =sub-email>输入电子邮件地址:< / label>
< input class =subsubmittype =resetvalue =Resetid =Reset>
< input class =subsubmittype =submitvalue =Sendid =Submit>
< / form>
< / section>

发生了什么问题?

谢谢

解决方案

使用的辅助功能测试工具存在问题。它说你应该有一个复位按钮的标签,但是H44:使用标签元素关联文本标签使用WCAG 2.0的表单控件明确表示标签不是用于重置按钮。

另一方面,重置按钮对于可访问性和正常使用来说几乎总是不好的。正如可用性专家Jakob Nielsen所写,写道:如果网络能够成为一个更快乐的地方几乎所有的重置按钮都被删除。这个按钮几乎从不帮助用户,但经常伤害他们。


I keep on getting this error even though the line stated to be containing the error doesn't have a label element?

3.3 Input Assistance: Help users avoid and correct mistakes.

Success Criteria 3.3.2 Labels or Instructions (A)

Check 188: Label text is empty.
Repair: Add text to the label element.
Error Line 75, Column 6:
<input class="subsubmit" type="reset" value="Reset" id="Reset">

The code is:

<section id="subscribeEmail">
            <!--This section allows the user the option to subscribe to my blogs if they don't have an RRS feed. It only asks for a name and email address before sending it to my email address 
            where I can then store their email and add them to my CC every time I sent out a new bog post.-->
                <h3>Never Miss a Post:</h3>
                <form class="subscribe" action="mailto:tm_mitchell@hotmail.co.uk" method="post">
                    <label for="sub-name">Enter Name: </label>
                        <input id="sub-name" title="name" class="sub" type="text" size="35" maxlength="40" placeholder="Full Name" required>        
                    <label for="sub-email">Enter Email: </label>    
                        <input id="sub-email" title="email" class="sub" type="text" size="35" maxlength="40" placeholder="Enter email to subscribe" required>   
                    <input class="subsubmit" type="reset" value="Reset" id="Reset">
                    <input class="subsubmit" type="submit" value="Send" id="Submit">
                </form>
            </section>

What is going wrong?

Thanks

解决方案

The accessibility testing tool used is faulty. It says that you should have a label for the reset button, but clause H44: Using label elements to associate text labels with form controls of WCAG 2.0 explicitly says that a label is not used for a reset button.

On the other hand, a reset button is almost always bad for accessibility and for normal use. As Jakob Nielsen, the usability specialist, writes: "The Web would be a happier place if virtually all Reset buttons were removed. This button almost never helps users, but often hurts them."

这篇关于HTML辅助功能错误 - 标签文本为空?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆