在WAVE工具中缺少表单标签

时间:2018-04-05 13:46:10

标签: wave

我想修复我网站上的WAVE工具中的错误:http://human2.com.pl/,错误是:

[URL = https://gifyu.com/image/sUbw][img]https://s1.gifyu.com/images/Przechwytywanie58ca1183ef15bd0c.jpg[/img][/url]

包含错误的代码:

<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="search-form searchform clearfix" method="get">
   <div class="search-wrap">
      <input type="text" placeholder="<?php esc_attr_e( 'Szukaj', 'colormag' ); ?>" class="s field" name="s">
      <button class="search-icon" type="submit"> Klik</button>
   </div>
</form><!-- .searchform -->

有人可以帮我解决吗?感谢

1 个答案:

答案 0 :(得分:1)

正如WAVE消息所述,“表单控件(您的input)没有相应的标签(<label>标签)”。

因此,要纠正该错误,您需要创建一个<label>标记,然后在其中添加一个for属性,该属性的值应为{{1 }}。因此,基本上,您的HTML应该如下所示:

id