Make WordPress Core


Ignore:
Timestamp:
02/20/2019 11:36:26 PM (5 years ago)
Author:
afercia
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/template.php

    r44757 r44759  
    481481    <div id="replysubmit" class="submit">
    482482        <p class="reply-submit-buttons">
    483             <a href="#comments-form" class="save button button-primary">
     483            <button type="button" class="save button button-primary">
    484484                <span id="addbtn" style="display: none;"><?php _e( 'Add Comment' ); ?></span>
    485485                <span id="savebtn" style="display: none;"><?php _e( 'Update Comment' ); ?></span>
    486486                <span id="replybtn" style="display: none;"><?php _e( 'Submit Reply' ); ?></span>
    487             </a>
    488             <a href="#comments-form" class="cancel button"><?php _e( 'Cancel' ); ?></a>
     487            </button>
     488            <button type="button" class="cancel button"><?php _e( 'Cancel' ); ?></button>
    489489            <span class="waiting spinner"></span>
    490490        </p>
Note: See TracChangeset for help on using the changeset viewer.