Skip to:
Content

BuddyPress.org

Changeset 12056


Ignore:
Timestamp:
05/05/2018 04:20:04 AM (6 years ago)
Author:
mercime
Message:

Administration: Fix accessibility of Template Pack selection.

Props ankit-k-gupta, boonebgorges.
Fixes #7810.

Location:
trunk/src/bp-core
Files:
2 edited

Legend:

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

    r11764 r12056  
    7171
    7272    if ( $options ) : ?>
    73         <select name="_bp_theme_package_id" id="_bp_theme_package_id"><?php echo $options; ?></select>
    74         <p class="description"><label for="_bp_theme_package_id"><?php esc_html_e( 'The selected Template Pack will serve all BuddyPress templates.', 'buddypress' ); ?></label></p>
     73        <select name="_bp_theme_package_id" id="_bp_theme_package_id" aria-describedby="_bp_theme_package_description"><?php echo $options; ?></select>
     74        <p id="_bp_theme_package_description" class="description"><?php esc_html_e( 'The selected Template Pack will serve all BuddyPress templates.', 'buddypress' ); ?></p>
    7575
    7676    <?php else : ?>
     
    217217?>
    218218
    219     <input id="bp_restrict_group_creation" name="bp_restrict_group_creation" type="checkbox"value="1" <?php checked( !bp_restrict_group_creation( false ) ); ?> />
     219    <input id="bp_restrict_group_creation" name="bp_restrict_group_creation" type="checkbox" aria-describedby="bp_group_creation_description" value="1" <?php checked( !bp_restrict_group_creation( false ) ); ?> />
    220220    <label for="bp_restrict_group_creation"><?php _e( 'Enable group creation for all users', 'buddypress' ); ?></label>
    221     <p class="description"><?php _e( 'Administrators can always create groups, regardless of this setting.', 'buddypress' ); ?></p>
     221    <p class="description" id="bp_group_creation_description"><?php _e( 'Administrators can always create groups, regardless of this setting.', 'buddypress' ); ?></p>
    222222
    223223<?php
  • trunk/src/bp-core/classes/class-bp-admin.php

    r12031 r12056  
    389389
    390390        // Template pack picker.
    391         add_settings_field( '_bp_theme_package_id', __( 'Template Pack', 'buddypress' ), 'bp_admin_setting_callback_theme_package_id', 'buddypress', 'bp_main' );
     391        add_settings_field( '_bp_theme_package_id', __( 'Template Pack', 'buddypress' ), 'bp_admin_setting_callback_theme_package_id', 'buddypress', 'bp_main', array( 'label_for' => '_bp_theme_package_id' ) );
    392392        register_setting( 'buddypress', '_bp_theme_package_id', 'sanitize_text_field' );
    393393
Note: See TracChangeset for help on using the changeset viewer.