Skip to content

Commit 1fe40c3

Browse files
committed
Improve accessibility for for comment form
- Use a shorter label - Remove now superfluous placeholder - Use the old label as field description #520
1 parent 8e7fd0b commit 1fe40c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

templates/webmention-comment-form.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
do_action( 'webmention_comment_form_template_before' );
66
?>
77
<form id="webmention-form" action="<?php echo get_webmention_endpoint(); ?>" method="post">
8-
<p>
9-
<label for="webmention-source"><?php echo get_webmention_form_text( get_the_ID() ); ?></label>
8+
<p id="webmention-source-description">
9+
<?php echo get_webmention_form_text( get_the_ID() ); ?>
1010
</p>
1111
<p>
12-
<input id="webmention-source" type="url" autocomplete="url" required pattern="^https?:\/\/(.*)" name="source" placeholder="<?php esc_attr_e( 'URL/Permalink of your article', 'webmention' ); ?>" />
12+
<label for="webmention-source"><?php esc_attr_e( 'URL/Permalink of your article', 'webmention' ); ?></label>
13+
<input id="webmention-source" type="url" autocomplete="url" required pattern="^https?:\/\/(.*)" name="source" aria-describedby="webmention-source-description" />
1314
</p>
1415
<p>
1516
<input id="webmention-submit" type="submit" name="submit" value="<?php esc_attr_e( 'Ping me!', 'webmention' ); ?>" />

0 commit comments

Comments
 (0)