Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/31/2020 04:40:15 PM (6 years 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.

File:
1 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; ?>
Note: See TracChangeset for help on using the changeset viewer.