mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-14 05:40:30 +00:00
Accessibility: Comments: Improve links and buttons semantics and interaction.
With the exception of the "Edit" link, the "row actions" controls in the Comments table behave differently depending if JavaScript support is on or off. When JavaScript support is off, they behave like links. When JavaScript support is on, they behave like buttons and they need to be buttons or have an ARIA `role="button"` added via JavaScript. Lastly, the buttons in the Reply/Quick Edit form and the "Add Comment" in the edit post page meta box need to be buttons. Fixes #43412. git-svn-id: https://develop.svn.wordpress.org/trunk@44759 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -804,7 +804,7 @@ function post_comment_meta_box_thead( $result ) {
|
||||
function post_comment_meta_box( $post ) {
|
||||
wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
|
||||
?>
|
||||
<p class="hide-if-no-js" id="add-new-comment"><a class="button" href="#commentstatusdiv" onclick="window.commentReply && commentReply.addcomment(<?php echo $post->ID; ?>);return false;"><?php _e( 'Add comment' ); ?></a></p>
|
||||
<p class="hide-if-no-js" id="add-new-comment"><button type="button" class="button" onclick="window.commentReply && commentReply.addcomment(<?php echo $post->ID; ?>);"><?php _e( 'Add comment' ); ?></button></p>
|
||||
<?php
|
||||
|
||||
$total = get_comments(
|
||||
|
||||
Reference in New Issue
Block a user