Skip to:
Content

BuddyPress.org

Changeset 8013


Ignore:
Timestamp:
03/01/2014 02:57:12 AM (10 years ago)
Author:
boonebgorges
Message:

Reconfigure markup for radio buttons on group admin meta boxes

<label> elements should be applied to the individual radio buttons rather
than the entire set, for better accessibility and standards compliance.

The old top-level label is replaced by a fieldset and legend.

Fixes #5437

Props tw2113

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-admin.php

    r7965 r8013  
    685685
    686686    <div class="bp-groups-settings-section" id="bp-groups-settings-section-status">
    687         <label for="group-status"><?php _e( 'Privacy', 'buddypress' ); ?></label>
    688 
    689         <ul>
    690             <li><input type="radio" name="group-status" id="bp-group-status-public" value="public" <?php checked( $item->status, 'public' ) ?> /> <?php _e( 'Public', 'buddypress' ) ?></li>
    691             <li><input type="radio" name="group-status" id="bp-group-status-private" value="private" <?php checked( $item->status, 'private' ) ?> /> <?php _e( 'Private', 'buddypress' ) ?></li>
    692             <li><input type="radio" name="group-status" id="bp-group-status-hidden" value="hidden" <?php checked( $item->status, 'hidden' ) ?> /> <?php _e( 'Hidden', 'buddypress' ) ?></li>
     687        <fieldset>
     688            <legend><?php _e( 'Privacy', 'buddypress' ); ?></legend>
     689
     690            <ul>
     691                <li><input type="radio" name="group-status" id="bp-group-status-public" value="public" <?php checked( $item->status, 'public' ) ?> /><label for="bp-group-status-public"><?php _e( 'Public', 'buddypress' ) ?></label></li>
     692                <li><input type="radio" name="group-status" id="bp-group-status-private" value="private" <?php checked( $item->status, 'private' ) ?> /><label for="bp-group-status-private"><?php _e( 'Private', 'buddypress' ) ?></label></li>
     693                <li><input type="radio" name="group-status" id="bp-group-status-hidden" value="hidden" <?php checked( $item->status, 'hidden' ) ?> /><label for="bp-group-status-hidden"><?php _e( 'Hidden', 'buddypress' ) ?></label></li>
     694            </ul>
     695        </fieldset>
    693696    </div>
    694697
    695698    <div class="bp-groups-settings-section" id="bp-groups-settings-section-invite-status">
    696         <label for="group-invite-status"><?php _e( 'Who can invite others to this group?', 'buddypress' ); ?></label>
    697 
    698         <ul>
    699             <li><input type="radio" name="group-invite-status" id="bp-group-invite-status-members" value="members" <?php checked( $invite_status, 'members' ) ?> /> <?php _e( 'All group members', 'buddypress' ) ?></li>
    700             <li><input type="radio" name="group-invite-status" id="bp-group-invite-status-mods" value="mods" <?php checked( $invite_status, 'mods' ) ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ) ?></li>
    701             <li><input type="radio" name="group-invite-status" id="bp-group-invite-status-admins" value="admins" <?php checked( $invite_status, 'admins' ) ?> /> <?php _e( 'Group admins only', 'buddypress' ) ?></li>
    702         </ul>
     699        <fieldset>
     700            <legend><?php _e( 'Who can invite others to this group?', 'buddypress' ); ?></legend>
     701
     702            <ul>
     703                <li><input type="radio" name="group-invite-status" id="bp-group-invite-status-members" value="members" <?php checked( $invite_status, 'members' ) ?> /><label for="bp-group-invite-status-members"><?php _e( 'All group members', 'buddypress' ) ?></label></li>
     704                <li><input type="radio" name="group-invite-status" id="bp-group-invite-status-mods" value="mods" <?php checked( $invite_status, 'mods' ) ?> /><label for="bp-group-invite-status-mods"><?php _e( 'Group admins and mods only', 'buddypress' ) ?></label></li>
     705                <li><input type="radio" name="group-invite-status" id="bp-group-invite-status-admins" value="admins" <?php checked( $invite_status, 'admins' ) ?> /><label for="bp-group-invite-status-admins"><?php _e( 'Group admins only', 'buddypress' ) ?></label></li>
     706            </ul>
     707        </fieldset>
    703708    </div>
    704709
Note: See TracChangeset for help on using the changeset viewer.