Bug Report: Raindrops1.124 search form has bug

*Raindrops 1.124 has bug.

The following errors have occurred with the validation check of html by Markup Validation ServiceRaindrops1.124.

Bad value text for attribute type on element input.

Attribute pattern not allowed on element input at this point.

Attribute placeholder not allowed on element input at this point.

It turned out that this error had occurred owing to structure of html form of Raindrops1.124.

*Quick Fix

Please open searchform.php

find below html codes

		if( $raindrops_document_type == 'html5' ) {
?>
<form method="get" name="searchform" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" >
  <div class="searchform">
    <label class="screen-reader-text" for="s">Search for:</label>
    <input type="text" value="<?php the_search_query( ); ?>" pattern="^[^(<|>)]+$" title="<?php esc_attr_e( 'must not contain html tags' , 'Raindrops' ); ?>" placeholder="<?php esc_attr_e( 'Search', 'Raindrops' ); ?>" name="s" id="s" <?php raindrops_doctype_elements( '','role="search"' );?> />
    <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'Raindrops' );?>" />
  </div>
</form>

above html form change below

		if( $raindrops_document_type == 'html5' ) {
?>
<form method="get" name="searchform" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" <?php raindrops_doctype_elements( '','role="search"' );?>>
  <div class="searchform">
    <label class="screen-reader-text" for="s">Search for:</label>
    <input type="text" value="<?php the_search_query( ); ?>" pattern="^[^(<|>)]+$" title="<?php esc_attr_e( 'must not contain html tags' , 'Raindrops' ); ?>" placeholder="<?php esc_attr_e( 'Search', 'Raindrops' ); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'Raindrops' );?>" />
  </div>
</form>

This bug will be fixed next version of Raindrops.

*Raindrops1.124 htmlフォームのバグについて

Raindrops1.124で、Markup Validation Serviceによるhtmlのバリデーションチェックで、以下のエラーが発生しています。

Bad value text for attribute type on element input.

Attribute pattern not allowed on element input at this point.

Attribute placeholder not allowed on element input at this point.

このバグは、Raindrops1.124の検索フォームのhtmlの不備によって引き起こされている事が判明しました。

*修正方法

searchform.phpから、以下のコードを見つけていただき、

		if( $raindrops_document_type == 'html5' ) {
?>
<form method="get" name="searchform" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" >
  <div class="searchform">
    <label class="screen-reader-text" for="s">Search for:</label>
    <input type="text" value="<?php the_search_query( ); ?>" pattern="^[^(<|>)]+$" title="<?php esc_attr_e( 'must not contain html tags' , 'Raindrops' ); ?>" placeholder="<?php esc_attr_e( 'Search', 'Raindrops' ); ?>" name="s" id="s" <?php raindrops_doctype_elements( '','role="search"' );?> />
    <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'Raindrops' );?>" />
  </div>
</form>

下記コードに変更していただくことで、問題を解決できます。

		if( $raindrops_document_type == 'html5' ) {
?>
<form method="get" name="searchform" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" <?php raindrops_doctype_elements( '','role="search"' );?>>
  <div class="searchform">
    <label class="screen-reader-text" for="s">Search for:</label>
    <input type="text" value="<?php the_search_query( ); ?>" pattern="^[^(<|>)]+$" title="<?php esc_attr_e( 'must not contain html tags' , 'Raindrops' ); ?>" placeholder="<?php esc_attr_e( 'Search', 'Raindrops' ); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'Raindrops' );?>" />
  </div>
</form>

このバグは、次回のRaindropsのアップデートで修正予定です。


コメントは受け付けていません。