Quiz input type not accessible
-
Hi, Takayuki!
The topic pretty much says it all; but the [quiz] input type, as it’s currently written, can’t be made accessible. Since the question for a quiz input type is part of the user input, it should be easy to automatically have this field labeled appropriately; but as it is, any use of the ‘quiz’ feature will make a form very difficult to submit for a user with a screen reader, since there’s no
label
element associated with the input field.The following seems like it should work:
On lines 62-66 of quiz.php:
$html = sprintf( '<span class="wpcf7-form-control-wrap %1$s"><label for='wpcf7-quiz-%5$s' class="wpcf7-quiz-label">%2$s</label> <input %3$s id='wpcf7-quiz-%5$s' /><input type="hidden" name="_wpcf7_quiz_answer_%4$s" value="%5$s" />%6$s</span>', sanitize_html_class( $tag->name ), esc_html( $question ), $atts, $tag->name, wp_hash( $answer, 'wpcf7_quiz' ), $validation_error );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Quiz input type not accessible’ is closed to new replies.