Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/04/2017 05:56:39 PM (9 years ago)
Author:
mercime
Message:

Accessibility: Update H1 Headings for BP Admin Screens.

WP 4.8 changelog included the removal of action links and adjustments in the
markup of the heading section for users of assistive technologies.

Fixes #7611.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/classes/class-bp-members-admin.php

    r11723 r11741  
    947947
    948948        <div class="wrap" id="community-profile-page">
    949             <h1><?php echo esc_html( $title ); ?>
     949            <?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?>
     950
     951                <h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
    950952
    951953                <?php if ( empty( $this->is_self_profile ) ) : ?>
     
    953955                    <?php if ( current_user_can( 'create_users' ) ) : ?>
    954956
    955                         <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
     957                        <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
    956958
    957959                    <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
    958960
    959                         <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
     961                        <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
    960962
    961963                    <?php endif; ?>
    962964
    963965                <?php endif; ?>
    964             </h1>
     966
     967                <hr class="wp-header-end">
     968
     969            <?php else : ?>
     970
     971                <h1><?php echo esc_html( $title ); ?>
     972
     973                    <?php if ( empty( $this->is_self_profile ) ) : ?>
     974
     975                        <?php if ( current_user_can( 'create_users' ) ) : ?>
     976
     977                            <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
     978
     979                        <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
     980
     981                            <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
     982
     983                        <?php endif; ?>
     984
     985                    <?php endif; ?>
     986                </h1>
     987
     988            <?php endif; ?>
    965989
    966990            <?php if ( ! empty( $user ) ) :
     
    19251949
    19261950        <div class="wrap">
    1927             <h1><?php _e( 'Users', 'buddypress' ); ?>
     1951            <?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?>
     1952
     1953                <h1 class="wp-heading-inline"><?php _e( 'Users', 'buddypress' ); ?></h1>
    19281954
    19291955                <?php if ( current_user_can( 'create_users' ) ) : ?>
    19301956
    1931                     <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
     1957                    <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
    19321958
    19331959                <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
    19341960
    1935                     <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
     1961                    <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
    19361962
    19371963                <?php endif;
     
    19401966                    printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;', 'buddypress' ) . '</span>', esc_html( $usersearch ) );
    19411967                }
    1942 
    19431968                ?>
    1944             </h1>
     1969
     1970                <hr class="wp-header-end">
     1971
     1972            <?php else : ?>
     1973
     1974                <h1><?php _e( 'Users', 'buddypress' ); ?>
     1975
     1976                    <?php if ( current_user_can( 'create_users' ) ) : ?>
     1977
     1978                        <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
     1979
     1980                    <?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
     1981
     1982                        <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
     1983
     1984                    <?php endif;
     1985
     1986                    if ( $usersearch ) {
     1987                        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;', 'buddypress' ) . '</span>', esc_html( $usersearch ) );
     1988                    }
     1989
     1990                    ?>
     1991                </h1>
     1992
     1993            <?php endif; ?>
    19451994
    19461995            <?php // Display each signups on its own row. ?>
Note: See TracChangeset for help on using the changeset viewer.