Skip to:
Content

BuddyPress.org

Changeset 11619


Ignore:
Timestamp:
06/23/2017 09:37:14 PM (3 years ago)
Author:
mercime
Message:

xProfile: Add and toggle aria-expanded attr for change-profile-visibility button.

Fixes #7348.

Location:
trunk/src/bp-templates/bp-legacy
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/members/register.php

    r11618 r11619  
    184184
    185185                            if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
    186                                 <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
     186                                <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">
    187187                                    <?php
    188188                                    printf(
     
    191191                                    );
    192192                                    ?>
    193                                     <button type="button" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button>
     193                                    </span>
     194                                    <button type="button" class="visibility-toggle-link" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-2" aria-expanded="false"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button>
    194195                                </p>
    195196
  • trunk/src/bp-templates/bp-legacy/buddypress/members/single/profile/edit.php

    r11618 r11619  
    5454
    5555                <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
    56                     <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
     56                    <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">
    5757                        <?php
    5858                        printf(
     
    6161                        );
    6262                        ?>
    63                         <button type="button" class="visibility-toggle-link"><?php _e( 'Change', 'buddypress' ); ?></button>
     63                        </span>
     64                        <button type="button" class="visibility-toggle-link" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-2" aria-expanded="false"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button>
    6465                    </p>
    6566
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r11613 r11619  
    11881188        event.preventDefault();
    11891189
    1190         jq( this ).parent().hide().addClass( 'field-visibility-settings-hide' )
     1190        jq( this ).attr( 'aria-expanded', 'true' ).parent().hide().addClass( 'field-visibility-settings-hide' )
    11911191            .siblings( '.field-visibility-settings' ).show().addClass( 'field-visibility-settings-open' );
    11921192    } );
     
    11941194    jq( '.field-visibility-settings-close' ).on( 'click', function( event ) {
    11951195        event.preventDefault();
     1196
     1197        jq( '.visibility-toggle-link' ).attr( 'aria-expanded', 'false' );
    11961198
    11971199        var settings_div = jq( this ).parent(),
Note: See TracChangeset for help on using the changeset viewer.