Skip to:
Content

BuddyPress.org

Changeset 11126


Ignore:
Timestamp:
09/21/2016 07:52:37 AM (7 years ago)
Author:
mercime
Message:

Accessibility: live regions for front-end template files.

See #7222.

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-widget.php

    r10809 r11126  
    126126            </div>
    127127
    128             <ul id="groups-list" class="item-list">
     128            <ul id="groups-list" class="item-list" aria-live="polite" aria-relevant="all" aria-atomic="true">
    129129                <?php while ( bp_groups() ) : bp_the_group(); ?>
    130130                    <li <?php bp_group_class(); ?>>
  • trunk/src/bp-members/classes/class-bp-core-members-widget.php

    r11033 r11126  
    121121            </div>
    122122
    123             <ul id="members-list" class="item-list">
     123            <ul id="members-list" class="item-list" aria-live="polite" aria-relevant="all" aria-atomic="true">
    124124
    125125                <?php while ( bp_members() ) : bp_the_member(); ?>
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/index.php

    r10904 r11126  
    181181    do_action( 'bp_before_directory_activity_list' ); ?>
    182182
    183     <div class="activity">
     183    <div class="activity" aria-live="polite" aria-atomic="true" aria-relevant="all">
    184184
    185185        <?php bp_get_template_part( 'activity/activity-loop' ); ?>
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/single/activity.php

    r10181 r11126  
    7373do_action( 'bp_before_group_activity_content' ); ?>
    7474
    75 <div class="activity single-group">
     75<div class="activity single-group" aria-live="polite" aria-atomic="true" aria-relevant="all">
    7676
    7777    <?php bp_get_template_part( 'activity/activity-loop' ); ?>
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/single/admin/manage-members.php

    r11050 r11126  
    2020do_action( 'bp_before_group_manage_members_admin' ); ?>
    2121
    22 <div class="bp-widget">
    23     <h3><?php _e( 'Administrators', 'buddypress' ); ?></h3>
     22<div aria-live="polite" aria-relevant="all" aria-atomic="true">
    2423
    25     <?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
     24    <div class="bp-widget">
     25        <h3><?php _e( 'Administrators', 'buddypress' ); ?></h3>
    2626
    27     <ul id="admins-list" class="item-list single-line">
     27        <?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
    2828
    29         <?php while ( bp_members() ) : bp_the_member(); ?>
    30         <li>
    31             <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
    32             <h5>
    33                 <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
    34                 <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
    35                 <span class="small">
    36                     <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
    37                 </span>
    38                 <?php endif; ?>
    39             </h5>
    40         </li>
    41         <?php endwhile; ?>
     29        <ul id="admins-list" class="item-list single-line">
    4230
    43     </ul>
     31            <?php while ( bp_members() ) : bp_the_member(); ?>
     32            <li>
     33                <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
     34                <h5>
     35                    <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
     36                    <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
     37                    <span class="small">
     38                        <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
     39                    </span>
     40                    <?php endif; ?>
     41                </h5>
     42            </li>
     43            <?php endwhile; ?>
    4444
     45        </ul>
     46
     47        <?php endif; ?>
     48
     49    </div>
     50
     51    <?php if ( bp_group_has_moderators() ) : ?>
     52        <div class="bp-widget">
     53            <h3><?php _e( 'Moderators', 'buddypress' ); ?></h3>
     54
     55            <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
     56                <ul id="mods-list" class="item-list single-line">
     57
     58                    <?php while ( bp_members() ) : bp_the_member(); ?>
     59                    <li>
     60                        <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
     61                        <h5>
     62                            <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
     63                            <span class="small">
     64                                <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
     65                                <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
     66                            </span>
     67                        </h5>
     68                    </li>
     69                    <?php endwhile; ?>
     70
     71                </ul>
     72
     73            <?php endif; ?>
     74        </div>
    4575    <?php endif; ?>
    4676
    47 </div>
    4877
    49 <?php if ( bp_group_has_moderators() ) : ?>
    5078    <div class="bp-widget">
    51         <h3><?php _e( 'Moderators', 'buddypress' ); ?></h3>
     79        <h3><?php _e( "Members", 'buddypress' ); ?></h3>
    5280
    53         <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
    54             <ul id="mods-list" class="item-list single-line">
     81        <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=0' ) ) : ?>
    5582
    56                 <?php while ( bp_members() ) : bp_the_member(); ?>
    57                 <li>
    58                     <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
    59                     <h5>
    60                         <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
    61                         <span class="small">
    62                             <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
    63                             <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
    64                         </span>
    65                     </h5>
    66                 </li>
     83            <?php if ( bp_group_member_needs_pagination() ) : ?>
     84
     85                <div class="pagination no-ajax">
     86
     87                    <div id="member-count" class="pag-count">
     88                        <?php bp_group_member_pagination_count(); ?>
     89                    </div>
     90
     91                    <div id="member-admin-pagination" class="pagination-links">
     92                        <?php bp_group_member_admin_pagination(); ?>
     93                    </div>
     94
     95                </div>
     96
     97            <?php endif; ?>
     98
     99            <ul id="members-list" class="item-list single-line">
     100                <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
     101
     102                    <li class="<?php bp_group_member_css_class(); ?>">
     103                        <?php bp_group_member_avatar_mini(); ?>
     104
     105                        <h5>
     106                            <?php bp_group_member_link(); ?>
     107
     108                            <?php if ( bp_get_group_member_is_banned() ) _e( '(banned)', 'buddypress' ); ?>
     109
     110                            <span class="small">
     111
     112                            <?php if ( bp_get_group_member_is_banned() ) : ?>
     113
     114                                <a href="<?php bp_group_member_unban_link(); ?>" class="button confirm member-unban" title="<?php esc_attr_e( 'Unban this member', 'buddypress' ); ?>"><?php _e( 'Remove Ban', 'buddypress' ); ?></a>
     115
     116                            <?php else : ?>
     117
     118                                <a href="<?php bp_group_member_ban_link(); ?>" class="button confirm member-ban"><?php _e( 'Kick &amp; Ban', 'buddypress' ); ?></a>
     119                                <a href="<?php bp_group_member_promote_mod_link(); ?>" class="button confirm member-promote-to-mod"><?php _e( 'Promote to Mod', 'buddypress' ); ?></a>
     120                                <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm member-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
     121
     122                            <?php endif; ?>
     123
     124                                <a href="<?php bp_group_member_remove_link(); ?>" class="button confirm"><?php _e( 'Remove from group', 'buddypress' ); ?></a>
     125
     126                                <?php
     127
     128                                /**
     129                                 * Fires inside the display of a member admin item in group management area.
     130                                 *
     131                                 * @since 1.1.0
     132                                 */
     133                                do_action( 'bp_group_manage_members_admin_item' ); ?>
     134
     135                            </span>
     136                        </h5>
     137                    </li>
     138
    67139                <?php endwhile; ?>
    68 
    69140            </ul>
    70141
    71         <?php endif; ?>
    72     </div>
    73 <?php endif; ?>
     142            <?php if ( bp_group_member_needs_pagination() ) : ?>
    74143
     144                <div class="pagination no-ajax">
    75145
    76 <div class="bp-widget">
    77     <h3><?php _e( "Members", 'buddypress' ); ?></h3>
     146                    <div id="member-count" class="pag-count">
     147                        <?php bp_group_member_pagination_count(); ?>
     148                    </div>
    78149
    79     <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=0' ) ) : ?>
     150                    <div id="member-admin-pagination" class="pagination-links">
     151                        <?php bp_group_member_admin_pagination(); ?>
     152                    </div>
    80153
    81         <?php if ( bp_group_member_needs_pagination() ) : ?>
    82 
    83             <div class="pagination no-ajax">
    84 
    85                 <div id="member-count" class="pag-count">
    86                     <?php bp_group_member_pagination_count(); ?>
    87154                </div>
    88155
    89                 <div id="member-admin-pagination" class="pagination-links">
    90                     <?php bp_group_member_admin_pagination(); ?>
    91                 </div>
     156            <?php endif; ?>
    92157
     158        <?php else: ?>
     159
     160            <div id="message" class="info">
     161                <p><?php _e( 'This group has no members.', 'buddypress' ); ?></p>
    93162            </div>
    94163
    95164        <?php endif; ?>
    96165
    97         <ul id="members-list" class="item-list single-line">
    98             <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
    99 
    100                 <li class="<?php bp_group_member_css_class(); ?>">
    101                     <?php bp_group_member_avatar_mini(); ?>
    102 
    103                     <h5>
    104                         <?php bp_group_member_link(); ?>
    105 
    106                         <?php if ( bp_get_group_member_is_banned() ) _e( '(banned)', 'buddypress' ); ?>
    107 
    108                         <span class="small">
    109 
    110                         <?php if ( bp_get_group_member_is_banned() ) : ?>
    111 
    112                             <a href="<?php bp_group_member_unban_link(); ?>" class="button confirm member-unban" title="<?php esc_attr_e( 'Unban this member', 'buddypress' ); ?>"><?php _e( 'Remove Ban', 'buddypress' ); ?></a>
    113 
    114                         <?php else : ?>
    115 
    116                             <a href="<?php bp_group_member_ban_link(); ?>" class="button confirm member-ban"><?php _e( 'Kick &amp; Ban', 'buddypress' ); ?></a>
    117                             <a href="<?php bp_group_member_promote_mod_link(); ?>" class="button confirm member-promote-to-mod"><?php _e( 'Promote to Mod', 'buddypress' ); ?></a>
    118                             <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm member-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
    119 
    120                         <?php endif; ?>
    121 
    122                             <a href="<?php bp_group_member_remove_link(); ?>" class="button confirm"><?php _e( 'Remove from group', 'buddypress' ); ?></a>
    123 
    124                             <?php
    125 
    126                             /**
    127                              * Fires inside the display of a member admin item in group management area.
    128                              *
    129                              * @since 1.1.0
    130                              */
    131                             do_action( 'bp_group_manage_members_admin_item' ); ?>
    132 
    133                         </span>
    134                     </h5>
    135                 </li>
    136 
    137             <?php endwhile; ?>
    138         </ul>
    139 
    140         <?php if ( bp_group_member_needs_pagination() ) : ?>
    141 
    142             <div class="pagination no-ajax">
    143 
    144                 <div id="member-count" class="pag-count">
    145                     <?php bp_group_member_pagination_count(); ?>
    146                 </div>
    147 
    148                 <div id="member-admin-pagination" class="pagination-links">
    149                     <?php bp_group_member_admin_pagination(); ?>
    150                 </div>
    151 
    152             </div>
    153 
    154         <?php endif; ?>
    155 
    156     <?php else: ?>
    157 
    158         <div id="message" class="info">
    159             <p><?php _e( 'This group has no members.', 'buddypress' ); ?></p>
    160         </div>
    161 
    162     <?php endif; ?>
     166    </div>
    163167
    164168</div>
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/single/send-invites.php

    r11020 r11126  
    2323    <form action="<?php bp_group_send_invite_form_action(); ?>" method="post" id="send-invite-form" class="standard-form">
    2424
    25         <div class="invite">
     25        <div class="invite" aria-live="polite" aria-atomic="false" aria-relevant="all">
    2626            <?php bp_get_template_part( 'groups/single/invites-loop' ); ?>
    2727        </div>
  • trunk/src/bp-templates/bp-legacy/buddypress/members/single/activity.php

    r10150 r11126  
    6262do_action( 'bp_before_member_activity_content' ); ?>
    6363
    64 <div class="activity">
     64<div class="activity" aria-live="polite" aria-atomic="true" aria-relevant="all">
    6565
    6666    <?php bp_get_template_part( 'activity/activity-loop' ) ?>
Note: See TracChangeset for help on using the changeset viewer.