Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/08/2017 06:36:43 PM (9 years ago)
Author:
mercime
Message:

Accessibility: Change empty link in Sitewide Notice to a button element.

Using semantic markup like the button element instead of an empty anchor link
like href=# in this case, helps us improve accessibility for all users.

Props mercime, slaFFik, johnjamesjacoby.
Fixes #7421.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-template.php

    r11578 r11582  
    12781278                    <strong><?php echo stripslashes( wp_filter_kses( $notice->subject ) ) ?></strong><br />
    12791279                    <?php echo stripslashes( wp_filter_kses( $notice->message) ) ?>
    1280                     <a href="#" id="close-notice"><?php _e( 'Close', 'buddypress' ) ?></a>
     1280                    <button type="button" id="close-notice" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'Dismiss this notice', 'buddypress' ) ?>"><span class="bp-screen-reader-text"><?php _e( 'Dismiss this notice', 'buddypress' ) ?>"></span> <span aria-hidden="true">&Chi;</span></button>
    12811281                    <?php wp_nonce_field( 'bp_messages_close_notice', 'close-notice-nonce' ); ?>
    12821282                </p>
Note: See TracChangeset for help on using the changeset viewer.