Skip to:
Content

BuddyPress.org

Ticket #7348: 7348.patch

File 7348.patch, 13.7 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                <fieldset class="multiselectbox">
     77                <legend><?php bp_the_profile_field_name(); ?></legend>
     78
    7679                <label for="<?php bp_the_profile_field_input_name(); ?>[]">
    77                         <?php bp_the_profile_field_name(); ?>
     80                        <span class="bp-screen-reader-text"><?php bp_the_profile_field_name(); ?></span>
    7881                        <?php bp_the_profile_field_required_label(); ?>
    7982                </label>
    8083
     
    8386                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    8487                do_action( bp_get_the_profile_field_errors_action() ); ?>
    8588
    86                 <select <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     89                <select <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    8790                        <?php bp_the_profile_field_options( array(
    8891                                'user_id' => $user_id
    8992                        ) ); ?>
     
    9194
    9295                <?php if ( ! bp_get_the_profile_field_is_required() ) : ?>
    9396
    94                         <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>[]' );">
     97                        <a class="clear-value" href="javascript:clear( '<?php echo esc_js( bp_get_the_profile_field_input_name() ); ?>[]' );" role="button">
    9598                                <?php esc_html_e( 'Clear', 'buddypress' ); ?>
    9699                        </a>
    97100
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-number.php

     
    6565                        'value' =>  bp_get_the_profile_field_edit_value()
    6666                ) ); ?>
    6767
     68                <fieldset class="number-type">
     69                <legend><?php bp_the_profile_field_name(); ?></legend>
     70
    6871                <label for="<?php bp_the_profile_field_input_name(); ?>">
    69                         <?php bp_the_profile_field_name(); ?>
     72                        <span class="bp-screen-reader-text"><?php bp_the_profile_field_name(); ?></span>
    7073                        <?php bp_the_profile_field_required_label(); ?>
    7174                </label>
    7275
     
    7578                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    7679                do_action( bp_get_the_profile_field_errors_action() ); ?>
    7780
    78                 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     81                <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    7982
    8083                <?php
    8184        }
  • 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                <fieldset class="selectbox">
     69                <legend><?php bp_the_profile_field_name(); ?></legend>
     70
    6871                <label for="<?php bp_the_profile_field_input_name(); ?>">
    69                         <?php bp_the_profile_field_name(); ?>
     72                        <span class="bp-screen-reader-text"><?php bp_the_profile_field_name(); ?></span>
    7073                        <?php bp_the_profile_field_required_label(); ?>
    7174                </label>
    7275
     
    7578                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    7679                do_action( bp_get_the_profile_field_errors_action() ); ?>
    7780
    78                 <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?>>
     81                <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    7982                        <?php bp_the_profile_field_options( array( 'user_id' => $user_id ) ); ?>
    8083                </select>
    8184
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php

     
    6363
    6464                $richtext_enabled = bp_xprofile_is_richtext_enabled_for_field(); ?>
    6565
     66                <fieldset class="textarea">
     67                <legend><?php bp_the_profile_field_name(); ?></legend>
     68
    6669                <label for="<?php bp_the_profile_field_input_name(); ?>">
    67                         <?php bp_the_profile_field_name(); ?>
     70                        <span class="bp-screen-reader-text"><?php bp_the_profile_field_name(); ?></span>
    6871                        <?php bp_the_profile_field_required_label(); ?>
    6972                </label>
    7073
     
    8184
    8285                        ?>
    8386
    84                         <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?>><?php bp_the_profile_field_edit_value(); ?></textarea>
     87                        <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3"><?php bp_the_profile_field_edit_value(); ?></textarea>
    8588
    8689                        <?php
    8790
  • src/bp-xprofile/classes/class-bp-xprofile-field-type-textbox.php

     
    6464                        'value' => bp_get_the_profile_field_edit_value(),
    6565                ) ); ?>
    6666
     67                <fieldset class="textbox">
     68                <legend><?php bp_the_profile_field_name(); ?></legend>
     69
    6770                <label for="<?php bp_the_profile_field_input_name(); ?>">
    68                         <?php bp_the_profile_field_name(); ?>
     71                        <span class="bp-screen-reader-text"><?php bp_the_profile_field_name(); ?></span>
    6972                        <?php bp_the_profile_field_required_label(); ?>
    7073                </label>
    7174
     
    7477                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    7578                do_action( bp_get_the_profile_field_errors_action() ); ?>
    7679
    77                 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     80                <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    7881
    7982                <?php
    8083        }
  • 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                <fieldset class="url">
     70                <legend><?php bp_the_profile_field_name(); ?></legend>
     71
    6972                <label for="<?php bp_the_profile_field_input_name(); ?>">
    70                         <?php bp_the_profile_field_name(); ?>
     73                        <span class="bp-screen-reader-text"><?php bp_the_profile_field_name(); ?></span>
    7174                        <?php bp_the_profile_field_required_label(); ?>
    7275                </label>
    7376
     
    7679                /** This action is documented in bp-xprofile/bp-xprofile-classes */
    7780                do_action( bp_get_the_profile_field_errors_action() ); ?>
    7881
    79                 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     82                <input <?php echo $this->get_edit_field_html_elements( $r ); ?> aria-describedby="<?php bp_the_profile_field_input_name(); ?>-3">
    8083
    8184                <?php
    8285        }