Skip to:
Content

BuddyPress.org

Ticket #7348: 7348-alt.patch

File 7348-alt.patch, 13.8 KB (added by mercime, 8 years ago)
  • src/bp-templates/bp-legacy/buddypress/members/register.php

     
    174174                                                        $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    175175                                                        $field_type->edit_field_html();
    176176
     177                                                        if ( bp_get_the_profile_field_description() ) : ?>
     178                                                                <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p>
     179                                                        <?php endif;
     180
    177181                                                        /**
    178182                                                         * Fires before the display of the visibility options for xprofile fields.
    179183                                                         *
     
    182186                                                        do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
    183187
    184188                                                        if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
    185                                                                 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
     189                                                                <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"><span id="<?php bp_the_profile_field_input_name(); ?>-2">
    186190                                                                        <?php
    187191                                                                        printf(
    188192                                                                                __( 'This field can be seen by: %s', 'buddypress' ),
     
    189193                                                                                '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>'
    190194                                                                        );
    191195                                                                        ?>
    192                                                                         <button type="button" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button>
     196                                                                        </span>
     197                                                                        <button type="button" class="visibility-toggle-link" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-2"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button>
    193198                                                                </p>
    194199
     200
    195201                                                                <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
    196202                                                                        <fieldset>
    197203                                                                                <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
     
    222228                                                         */
    223229                                                        do_action( 'bp_custom_profile_edit_fields' ); ?>
    224230
    225                                                         <p class="description"><?php bp_the_profile_field_description(); ?></p>
    226 
    227231                                                </div>
    228232
    229233                                        <?php endwhile; ?>
  • src/bp-templates/bp-legacy/buddypress/members/single/profile/edit.php

     
    4343                                $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    4444                                $field_type->edit_field_html();
    4545
     46                                if ( bp_get_the_profile_field_description() ) : ?>
     47                                        <p class="description" id="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_description(); ?></p>
     48                                <?php endif;
     49
    4650                                /**
    4751                                 * Fires before the display of visibility options for the field.
    4852                                 *
     
    5256                                ?>
    5357
    5458                                <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
    55                                         <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
     59                                        <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"><span id="<?php bp_the_profile_field_input_name(); ?>-2">
    5660                                                <?php
    5761                                                printf(
    5862                                                        __( 'This field can be seen by: %s', 'buddypress' ),
     
    5963                                                        '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>'
    6064                                                );
    6165                                                ?>
    62                                                 <button type="button" class="visibility-toggle-link"><?php _e( 'Change', 'buddypress' ); ?></button>
     66                                                </span>
     67                                                <button type="button" class="visibility-toggle-link" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-2"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button>
    6368                                        </p>
    6469
    6570                                        <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
     
    9196                                 */
    9297                                do_action( 'bp_custom_profile_edit_fields' ); ?>
    9398
    94                                 <p class="description"><?php bp_the_profile_field_description(); ?></p>
    9599                        </div>
    96100
    97101                <?php endwhile; ?>
  • src/bp-xprofile/bp-xprofile-template.php

     
    12821282                // Parse optional arguments.
    12831283                $r = bp_parse_args( $args, array(
    12841284                        'field_id'     => bp_get_the_profile_field_id(),
    1285                         'before'       => '<ul class="radio">',
    1286                         'after'        => '</ul>',
    1287                         'before_radio' => '<li class="%s">',
    1288                         'after_radio'  => '</li>',
     1285                        'before'       => '<div class="radio">',
     1286                        'after'        => '</div>',
     1287                        'before_radio' => '',
     1288                        'after_radio'  => '',
    12891289                        'class'        => 'bp-xprofile-visibility'
    12901290                ), 'xprofile_visibility_radio_buttons' );
    12911291
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

     
    8282                                'user_id' => $user_id
    8383                        ) ); ?>
    8484
    85                 </fieldset>
    86 
    8785                <?php
    8886        }
    8987
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

     
    138138
    139139                        </div>
    140140
    141                 </fieldset>
    142141        <?php
    143142        }
    144143
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php

     
    7373                        'name'     => bp_get_the_profile_field_input_name() . '[]',
    7474                ) ); ?>
    7575
    76                 <label for="<?php bp_the_profile_field_input_name(); ?>[]">
     76                <fieldset class="multiselectbox">
     77                <legend id="<?php bp_the_profile_field_input_name(); ?>-1">
    7778                        <?php bp_the_profile_field_name(); ?>
    7879                        <?php bp_the_profile_field_required_label(); ?>
    79                 </label>
     80                </legend>
    8081
    8182                <?php
    8283
     
    8384                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    8485                do_action( bp_get_the_profile_field_errors_action() ); ?>
    8586
    86                 <select <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     87                <select <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-labelledby="<?php bp_the_profile_field_input_name(); ?>-1" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    8788                        <?php bp_the_profile_field_options( array(
    8889                                'user_id' => $user_id
    8990                        ) ); ?>
     
    9192
    9293                <?php if ( ! bp_get_the_profile_field_is_required() ) : ?>
    9394
    94                         <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>[]' );">
     95                        <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>[]' );" role="button">
    9596                                <?php esc_html_e( 'Clear', 'buddypress' ); ?>
    9697                        </a>
    9798
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-number.php

     
    6565                        'value' =>  bp_get_the_profile_field_edit_value()
    6666                ) ); ?>
    6767
    68                 <label for="<?php bp_the_profile_field_input_name(); ?>">
     68                <fieldset class="number-type">
     69                <legend id="<?php bp_the_profile_field_input_name(); ?>-1">
    6970                        <?php bp_the_profile_field_name(); ?>
    7071                        <?php bp_the_profile_field_required_label(); ?>
    71                 </label>
     72                </legend>
    7273
    7374                <?php
    7475
     
    7576                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    7677                do_action( bp_get_the_profile_field_errors_action() ); ?>
    7778
    78                 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     79                <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-labelledby="<?php bp_the_profile_field_input_name(); ?>-1" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    7980
    8081                <?php
    8182        }
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php

     
    8787
    8888                        <?php endif; ?>
    8989
    90                 </fieldset>
    91 
    9290                <?php
    9391        }
    9492
     
    176174                        return;
    177175                } ?>
    178176
    179                 <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>' );">
     177                <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>' );" role="button">
    180178                        <?php esc_html_e( 'Clear', 'buddypress' ); ?>
    181179                </a>
    182180
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-selectbox.php

     
    6565                        $user_id = bp_displayed_user_id();
    6666                } ?>
    6767
    68                 <label for="<?php bp_the_profile_field_input_name(); ?>">
     68                <fieldset class="selectbox">
     69                <legend id="<?php bp_the_profile_field_input_name(); ?>-1">
    6970                        <?php bp_the_profile_field_name(); ?>
    7071                        <?php bp_the_profile_field_required_label(); ?>
    71                 </label>
     72                </legend>
    7273
    7374                <?php
    7475
     
    7576                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    7677                do_action( bp_get_the_profile_field_errors_action() ); ?>
    7778
    78                 <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?>>
     79                <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?> aria-labelledby="<?php bp_the_profile_field_input_name(); ?>-1" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    7980                        <?php bp_the_profile_field_options( array( 'user_id' => $user_id ) ); ?>
    8081                </select>
    8182
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php

     
    6363
    6464                $richtext_enabled = bp_xprofile_is_richtext_enabled_for_field(); ?>
    6565
    66                 <label for="<?php bp_the_profile_field_input_name(); ?>">
     66                <fieldset class="textarea">
     67                <legend id="<?php bp_the_profile_field_input_name(); ?>-1">
    6768                        <?php bp_the_profile_field_name(); ?>
    6869                        <?php bp_the_profile_field_required_label(); ?>
    69                 </label>
     70                </legend>
    7071
    7172                <?php
    7273
     
    8182
    8283                        ?>
    8384
    84                         <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?>><?php bp_the_profile_field_edit_value(); ?></textarea>
     85                        <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-labelledby="<?php bp_the_profile_field_input_name(); ?>-1" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_edit_value(); ?></textarea>
    8586
    8687                        <?php
    8788
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-textbox.php

     
    6464                        'value' => bp_get_the_profile_field_edit_value(),
    6565                ) ); ?>
    6666
    67                 <label for="<?php bp_the_profile_field_input_name(); ?>">
     67                <fieldset class="textbox">
     68                <legend id="<?php bp_the_profile_field_input_name(); ?>-1">
    6869                        <?php bp_the_profile_field_name(); ?>
    6970                        <?php bp_the_profile_field_required_label(); ?>
    70                 </label>
     71                </legend>
    7172
    7273                <?php
    7374
     
    7475                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    7576                do_action( bp_get_the_profile_field_errors_action() ); ?>
    7677
    77                 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     78                <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-labelledby="<?php bp_the_profile_field_input_name(); ?>-1" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    7879
    7980                <?php
    8081        }
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php

     
    6666                        'value'     => esc_url( bp_get_the_profile_field_edit_value() ),
    6767                ) ); ?>
    6868
    69                 <label for="<?php bp_the_profile_field_input_name(); ?>">
     69                <fieldset class="url">
     70                <legend id="<?php bp_the_profile_field_input_name(); ?>-1">
    7071                        <?php bp_the_profile_field_name(); ?>
    7172                        <?php bp_the_profile_field_required_label(); ?>
    72                 </label>
     73                </legend>
    7374
    7475                <?php
    7576
     
    7677                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    7778                do_action( bp_get_the_profile_field_errors_action() ); ?>
    7879
    79                 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     80                <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-labelledby="<?php bp_the_profile_field_input_name(); ?>-1" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    8081
    8182                <?php
    8283        }