Skip to:
Content

BuddyPress.org

Changeset 10798


Ignore:
Timestamp:
05/23/2016 09:15:22 PM (8 years ago)
Author:
mercime
Message:

xProfiles A11y: Use correct value for screen reader class.

Generate "bp-screen-reader-text" for the front-end xProfile screens
and "screen-reader-text" in and wp-admin xProfile screens.

See #7080.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

    r10656 r10798  
    100100            do_action( bp_get_the_profile_field_errors_action() ); ?>
    101101
    102             <label for="<?php bp_the_profile_field_input_name(); ?>_day" class="bp-screen-reader-text"><?php esc_html_e( 'Select day', 'buddypress' ); ?></label>
     102            <label for="<?php bp_the_profile_field_input_name(); ?>_day" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php esc_html_e( 'Select day', 'buddypress' ); ?></label>
    103103            <select <?php echo $this->get_edit_field_html_elements( $day_r ); ?>>
    104104                <?php bp_the_profile_field_options( array(
     
    108108            </select>
    109109
    110             <label for="<?php bp_the_profile_field_input_name(); ?>_month" class="bp-screen-reader-text"><?php esc_html_e( 'Select month', 'buddypress' ); ?></label>
     110            <label for="<?php bp_the_profile_field_input_name(); ?>_month" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php esc_html_e( 'Select month', 'buddypress' ); ?></label>
    111111            <select <?php echo $this->get_edit_field_html_elements( $month_r ); ?>>
    112112                <?php bp_the_profile_field_options( array(
     
    116116            </select>
    117117
    118             <label for="<?php bp_the_profile_field_input_name(); ?>_year" class="bp-screen-reader-text"><?php esc_html_e( 'Select year', 'buddypress' ); ?></label>
     118            <label for="<?php bp_the_profile_field_input_name(); ?>_year" class="<?php echo is_admin() ? 'screen-reader-text' : 'bp-screen-reader-text' ;?>"><?php esc_html_e( 'Select year', 'buddypress' ); ?></label>
    119119            <select <?php echo $this->get_edit_field_html_elements( $year_r ); ?>>
    120120                <?php bp_the_profile_field_options( array(
Note: See TracChangeset for help on using the changeset viewer.