Skip to:
Content

BuddyPress.org

Changeset 12550


Ignore:
Timestamp:
01/31/2020 04:40:15 PM (9 months ago)
Author:
mercime
Message:

Admin: Make external links in BP Settings > Page accessible.

The View link beside each new activated component opens up in a new tab to
ensure that a user may view the new BP page generated in the frontend without
losing the selection/s in the settings page before the user has saved such.

This fix provides hidden text for users of screen readers and an icon for
sighted users to indicate that the link will open in a new tab.

Props audrasjb, imath.
Fixes #8235.

Location:
trunk/src/bp-core/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-slugs.php

    r12549 r12550  
    146146                            <?php if ( !empty( $existing_pages[$name] ) ) : ?>
    147147
    148                                 <a href="<?php echo esc_url( get_permalink( $existing_pages[$name] ) ); ?>" class="button-secondary" target="_bp"><?php _e( 'View', 'buddypress' ); ?></a>
     148                                <a href="<?php echo esc_url( get_permalink( $existing_pages[$name] ) ); ?>" class="button-secondary" target="_bp">
     149                                    <?php _e( 'View', 'buddypress' ); ?> <span class="dashicons dashicons-external" aria-hidden="true"></span>
     150                                    <span class="screen-reader-text"><?php esc_html_e( '(opens in a new tab)', 'buddypress' ); ?></span>
     151                                </a>
    149152
    150153                            <?php endif; ?>
  • trunk/src/bp-core/admin/css/common-rtl.css

    r12136 r12550  
    273273.settings_page_bp-components tr.members td.plugin-title span:before {
    274274    content: "\f307";
     275}
     276
     277.settings_page_bp-page-settings .button-secondary .dashicons {
     278    position: relative;
     279    top: 3px;
    275280}
    276281
  • trunk/src/bp-core/admin/css/common.css

    r12136 r12550  
    273273.settings_page_bp-components tr.members td.plugin-title span:before {
    274274    content: "\f307";
     275}
     276
     277.settings_page_bp-page-settings .button-secondary .dashicons {
     278    position: relative;
     279    top: 3px;
    275280}
    276281
Note: See TracChangeset for help on using the changeset viewer.