Skip to:
Content

BuddyPress.org

Changeset 10129


Ignore:
Timestamp:
09/23/2015 01:03:44 AM (9 years ago)
Author:
mercime
Message:

Accessibility fixes for Group Create - Step 2.

This changeset:

  • add 'id' attributes to radio inputs
  • add 'aria-describedby' attributes to radio inputs
  • add 'id' attributes to uls to bind to 'aria-describedby' in radio inputs
  • add 'for' attributes to labels
  • remove <strong> tags surrounding label text.

See #6618.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/create.php

    r10107 r10129  
    9696
    9797                <div class="radio">
    98                     <label><input type="radio" name="group-status" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> <strong><?php _e( 'This is a public group', 'buddypress' ); ?></strong></label>
    99                     <ul>
     98
     99                    <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php _e( 'This is a public group', 'buddypress' ); ?></label>
     100
     101                    <ul id="public-group-description">
    100102                        <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
    101103                        <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     
    104106
    105107
    106                     <label>
    107                         <input type="radio" name="group-status" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
    108                         <strong><?php _e( 'This is a private group', 'buddypress' ); ?></strong>
    109                     </label>
    110                     <ul>
     108                    <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php _e( 'This is a private group', 'buddypress' ); ?></label>
     109
     110                    <ul id="private-group-description">
    111111                        <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
    112112                        <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     
    115115
    116116
    117                     <label>
    118                         <input type="radio" name="group-status" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
    119                         <strong><?php _e('This is a hidden group', 'buddypress' ); ?></strong>
    120                     </label>
    121                     <ul>
     117                    <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php _e('This is a hidden group', 'buddypress' ); ?></label>
     118
     119                    <ul id="hidden-group-description">
    122120                        <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
    123121                        <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
     
    132130
    133131                <div class="radio">
    134                     <label>
    135                         <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
    136                         <strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
    137                     </label>
    138 
    139                     <label>
    140                         <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
    141                         <strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
    142                     </label>
    143 
    144                     <label>
    145                         <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
    146                         <strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
    147                     </label>
     132
     133                    <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label>
     134
     135                    <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label>
     136
     137                    <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label>
     138
    148139                </div>
    149140
Note: See TracChangeset for help on using the changeset viewer.