Skip to:
Content

BuddyPress.org

Changeset 11719


Ignore:
Timestamp:
11/01/2017 09:01:03 PM (9 years ago)
Author:
mercime
Message:

Accessibility: Replace <a href="#"> with Semantic Elements.

Using semantic markup like the button which is specifically meant for controlling a user interface instead of a fragment identifier separator # value with the href attribute, helps assistive technologies identify the real purpose of the UI element across all browsers and all devices.

Fixes #7612.

Location:
trunk/src/bp-templates/bp-nouveau/buddypress
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/_attachments/avatars/camera.php

    r11686 r11719  
    1919                        <div id="avatar-crop-pane" class="avatar" style="width:{{data.w}}px; height:{{data.h}}px"></div>
    2020                        <div id="avatar-crop-actions">
    21                                 <a class="button avatar-webcam-capture" href="#"><?php esc_html_e( 'Capture', 'buddypress' );?></a>
    22                                 <a class="button avatar-webcam-save" href="#"><?php esc_html_e( 'Save', 'buddypress' );?></a>
     21                                <button type="button" class="button avatar-webcam-capture"><?php esc_html_e( 'Capture', 'buddypress' );?></button>
     22                                <button type="button" class="button avatar-webcam-save"><?php esc_html_e( 'Save', 'buddypress' );?></button>
    2323                        </div>
    2424                </div>
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/_attachments/avatars/crop.php

    r11686 r11719  
    1818                </div>
    1919                <div id="avatar-crop-actions">
    20                         <a class="button avatar-crop-submit" href="#"><?php esc_html_e( 'Crop Image', 'buddypress' ); ?></a>
     20                        <button type="button" class="button avatar-crop-submit"><?php esc_html_e( 'Crop Image', 'buddypress' ); ?></button>
    2121                </div>
    2222        </div>
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/_attachments/avatars/index.php

    r11686 r11719  
    3333        <# if ( 'user' === data.object ) { #>
    3434                <p><?php _e( "If you'd like to delete your current profile photo but not upload a new one, please use the delete profile photo button.", 'buddypress' ); ?></p>
    35                 <p><a class="button edit" id="bp-delete-avatar" href="#"><?php esc_html_e( 'Delete My Profile Photo', 'buddypress' ); ?></a></p>
     35                <button type="button" class="button edit" id="bp-delete-avatar"><?php esc_html_e( 'Delete My Profile Photo', 'buddypress' ); ?></button>
    3636        <# } else if ( 'group' === data.object ) { #>
    3737                <?php bp_nouveau_user_feedback( 'group-avatar-delete-info' ); ?>
    38                 <p><a class="button edit" id="bp-delete-avatar" href="#"><?php esc_html_e( 'Delete Group Profile Photo', 'buddypress' ); ?></a></p>
     38                <button type="button" class="button edit" id="bp-delete-avatar"><?php esc_html_e( 'Delete Group Profile Photo', 'buddypress' ); ?></button>
    3939        <# } else { #>
    4040                <?php do_action( 'bp_attachments_avatar_delete_template' ); ?>
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/_attachments/cover-images/index.php

    r11686 r11719  
    2222        <# if ( 'user' === data.object ) { #>
    2323                <p><?php _e( "If you'd like to delete your current cover image but not upload a new one, please use the delete Cover Image button.", 'buddypress' ); ?></p>
    24                 <p><a class="button edit" id="bp-delete-cover-image" href="#"><?php esc_html_e( 'Delete My Cover Image', 'buddypress' ); ?></a></p>
     24                <button type="button" class="button edit" id="bp-delete-cover-image"><?php esc_html_e( 'Delete My Cover Image', 'buddypress' ); ?></button>
    2525        <# } else if ( 'group' === data.object ) { #>
    2626                <p><?php _e( "If you'd like to remove the existing group cover image but not upload a new one, please use the delete group cover image button.", 'buddypress' ); ?></p>
    27                 <p><a class="button edit" id="bp-delete-cover-image" href="#"><?php esc_html_e( 'Delete Group Cover Image', 'buddypress' ); ?></a></p>
     27                <button type="button" class="button edit" id="bp-delete-cover-image"><?php esc_html_e( 'Delete Group Cover Image', 'buddypress' ); ?></button>
    2828        <# } else { #>
    2929                <?php do_action( 'bp_attachments_cover_image_delete_template' ); ?>
  • trunk/src/bp-templates/bp-nouveau/buddypress/common/js-templates/activity/form.php

    r11686 r11719  
    2323
    2424<script type="text/html" id="tmpl-activity-post-form-buttons">
    25         <a href="#" class="button dashicons {{data.icon}}" data-button="{{data.id}}"><span class="bp-screen-reader-text">{{data.caption}}</span></a>
     25        <button type="button" class="button dashicons {{data.icon}}" data-button="{{data.id}}"><span class="bp-screen-reader-text">{{data.caption}}</span></button>
    2626</script>
    2727
     
    3838
    3939        <# if ( data.selected ) { #>
    40                 <a href="#" class="bp-remove-item dashicons dashicons-no" data-item_id="{{data.id}}">
     40                <button type="button" class="bp-remove-item dashicons dashicons-no" data-item_id="{{data.id}}">
    4141                        <span class="bp-screen-reader-text"><?php esc_html_e( 'Remove item', 'buddypress' ); ?></span>
    42                 </a>
     42                </button>
    4343        <# } #>
    4444</script>
  • trunk/src/bp-templates/bp-nouveau/buddypress/common/js-templates/invites/index.php

    r11686 r11719  
    110110<script type="text/html" id="tmpl-bp-invites-paginate">
    111111        <# if ( 1 !== data.page ) { #>
    112                 <a href="#" id="bp-invites-prev-page" class="button invite-button">
     112                <button type="button" id="bp-invites-prev-page" class="button invite-button">
    113113                        <span class="bp-screen-reader-text"><?php esc_html_e( 'Previous', 'buddypress' );?></span>
    114                 </a>
     114                </button>
    115115        <# } #>
    116116
    117117        <# if ( data.total_page !== data.page ) { #>
    118                 <a href="#" id="bp-invites-next-page" class="button invite-button">
     118                <button type="button" id="bp-invites-next-page" class="button invite-button">
    119119                        <span class="bp-screen-reader-text"><?php esc_html_e( 'Next', 'buddypress' );?></span>
    120                 </a>
     120                </button>
    121121        <# } #>
    122122</script>
Note: See TracChangeset for help on using the changeset viewer.