Skip to:
Content

BuddyPress.org

Changeset 10312


Ignore:
Timestamp:
10/27/2015 12:31:33 AM (4 years ago)
Author:
mercime
Message:

xProfile: Add labels for fields generated when adding options.

A11y fix for each text and checkbox field created for the
multiselect box and checkbox field types which support multiple
default options.

See #6655.

File:
1 edited

Legend:

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

    r10305 r10312  
    361361                        <div id="<?php echo esc_attr( "{$type}_div{$j}" ); ?>" class="bp-option sortable">
    362362                            <span class="bp-option-icon grabber"></span>
     363                            <label for="<?php echo esc_attr( "{$type}_option{$j}" ); ?>" class="screen-reader-text"><?php esc_html_e( 'Add an option', 'buddypress' ); ?></label>
    363364                            <input type="text" name="<?php echo esc_attr( "{$type}_option[{$j}]" ); ?>" id="<?php echo esc_attr( "{$type}_option{$j}" ); ?>" value="<?php echo esc_attr( stripslashes( $options[$i]->name ) ); ?>" />
    364                             <label>
    365                                 <input type="<?php echo esc_attr( $control_type ); ?>" name="<?php echo esc_attr( "isDefault_{$type}_option{$default_name}" ); ?>" <?php checked( $options[$i]->is_default_option, true ); ?> value="<?php echo esc_attr( $j ); ?>" />
     365                            <label for="<?php echo esc_attr( "{$type}_option{$default_name}" ); ?>">
     366                                <input type="<?php echo esc_attr( $control_type ); ?>" id="<?php echo esc_attr( "{$type}_option{$default_name}" ); ?>" name="<?php echo esc_attr( "isDefault_{$type}_option{$default_name}" ); ?>" <?php checked( $options[$i]->is_default_option, true ); ?> value="<?php echo esc_attr( $j ); ?>" />
    366367                                <?php _e( 'Default Value', 'buddypress' ); ?>
    367368                            </label>
Note: See TracChangeset for help on using the changeset viewer.