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:
Andrea Fercia
2019-02-20 23:36:26 +00:00
parent 36381ad6cc
commit 218162803e
5 changed files with 22 additions and 26 deletions

View File

@@ -480,12 +480,12 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
<div id="replysubmit" class="submit">
<p class="reply-submit-buttons">
<a href="#comments-form" class="save button button-primary">
<button type="button" class="save button button-primary">
<span id="addbtn" style="display: none;"><?php _e( 'Add Comment' ); ?></span>
<span id="savebtn" style="display: none;"><?php _e( 'Update Comment' ); ?></span>
<span id="replybtn" style="display: none;"><?php _e( 'Submit Reply' ); ?></span>
</a>
<a href="#comments-form" class="cancel button"><?php _e( 'Cancel' ); ?></a>
</button>
<button type="button" class="cancel button"><?php _e( 'Cancel' ); ?></button>
<span class="waiting spinner"></span>
</p>
<div class="notice notice-error notice-alt inline hidden">