Skip to:
Content

bbPress.org

Changeset 5563


Ignore:
Timestamp:
11/11/2014 05:25:09 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Convert template notices from paragraph tags to unordered lists.

Improves accessibility by hinting there may be several notices on the page.

Props Karl Groves, netweb. FIxes #2637.

Location:
trunk/src
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/template.php

    r5561 r5563  
    14691469                'orderby'     => $r['orderby'],
    14701470                'order'       => $r['order'],
    1471             ) );           
     1471            ) );
    14721472        }
    14731473
     
    25082508    if ( !empty( $errors ) ) : ?>
    25092509
    2510         <div class="bbp-template-notice error">
    2511             <p>
    2512                 <?php echo implode( "</p>\n<p>", $errors ); ?>
    2513             </p>
     2510        <div class="bbp-template-notice error" role="alert" tabindex="-1">
     2511            <ul>
     2512                <li><?php echo implode( "</li>\n<li>", $errors ); ?></li>
     2513            </ul>
    25142514        </div>
    25152515
     
    25202520
    25212521        <div class="bbp-template-notice">
    2522             <p>
    2523                 <?php echo implode( "</p>\n<p>", $messages ); ?>
    2524             </p>
     2522            <ul>
     2523                <li><?php echo implode( "</li>\n<li>", $messages ); ?></li>
     2524            </ul>
    25252525        </div>
    25262526
  • trunk/src/includes/forums/template.php

    r5562 r5563  
    20662066        $r = bbp_parse_args( $args, array(
    20672067            'forum_id'  => 0,
    2068             'before'    => '<div class="bbp-template-notice info"><p class="bbp-forum-description">',
    2069             'after'     => '</p></div>',
     2068            'before'    => '<div class="bbp-template-notice info"><ul><li class="bbp-forum-description">',
     2069            'after'     => '</li></ul></div>',
    20702070            'size'      => 14,
    20712071            'feed'      => true
  • trunk/src/includes/topics/template.php

    r5561 r5563  
    34353435        $r = bbp_parse_args( $args, array(
    34363436            'topic_id'  => 0,
    3437             'before'    => '<div class="bbp-template-notice info"><p class="bbp-topic-description">',
    3438             'after'     => '</p></div>',
     3437            'before'    => '<div class="bbp-template-notice info"><ul><li class="bbp-topic-description">',
     3438            'after'     => '</li></ul></div>',
    34393439            'size'      => 14
    34403440        ), 'get_single_topic_description' );
  • trunk/src/includes/users/template.php

    r5475 r5563  
    11741174
    11751175    <div class="bbp-template-notice updated">
    1176         <p><?php esc_html_e( 'User updated.', 'bbpress' ); ?></p>
     1176        <ul>
     1177            <li><?php esc_html_e( 'User updated.', 'bbpress' ); ?></li>
     1178        </ul>
    11771179    </div>
    11781180
     
    11991201
    12001202    <div class="bbp-template-notice important">
    1201         <p><?php bbp_is_user_home() || bbp_is_user_home_edit() ? esc_html_e( 'You have super admin privileges.', 'bbpress' ) : esc_html_e( 'This user has super admin privileges.', 'bbpress' ); ?></p>
     1203        <ul>
     1204            <li><?php bbp_is_user_home() || bbp_is_user_home_edit() ? esc_html_e( 'You have super admin privileges.', 'bbpress' ) : esc_html_e( 'This user has super admin privileges.', 'bbpress' ); ?></li>
     1205        </ul>
    12021206    </div>
    12031207
  • trunk/src/templates/default/bbpress/content-archive-topic.php

    r5310 r5563  
    2828    <?php if ( bbp_is_topic_tag() ) : ?>
    2929
    30         <?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><p>', 'after' => '</p></div>' ) ); ?>
     30        <?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><ul><li>', 'after' => '</li></ul></div>' ) ); ?>
    3131
    3232    <?php endif; ?>
  • trunk/src/templates/default/bbpress/content-topic-tag-edit.php

    r5310 r5563  
    1616    <?php do_action( 'bbp_template_before_topic_tag_description' ); ?>
    1717
    18     <?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><p>', 'after' => '</p></div>' ) ); ?>
     18    <?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info"><ul><li>', 'after' => '</li></ul></div>' ) ); ?>
    1919
    2020    <?php do_action( 'bbp_template_after_topic_tag_description' ); ?>
  • trunk/src/templates/default/bbpress/feedback-logged-in.php

    r4836 r5563  
    1111
    1212<div class="bbp-template-notice info">
    13     <p><?php _e( 'You are already logged in.', 'bbpress' ); ?></p>
     13    <ul>
     14        <li><?php _e( 'You are already logged in.', 'bbpress' ); ?></li>
     15    </ul>
    1416</div>
  • trunk/src/templates/default/bbpress/feedback-no-access.php

    r4836 r5563  
    1414    <div class="entry-content">
    1515        <div class="bbp-template-notice info">
    16             <p><?php _e( 'You do not have permission to view this forum.', 'bbpress' ); ?></p>
     16            <ul>
     17                <li><?php _e( 'You do not have permission to view this forum.', 'bbpress' ); ?></li>
     18            </ul>
    1719        </div>
    1820    </div>
  • trunk/src/templates/default/bbpress/feedback-no-forums.php

    r4836 r5563  
    1111
    1212<div class="bbp-template-notice">
    13     <p><?php _e( 'Oh bother! No forums were found here!', 'bbpress' ); ?></p>
     13    <ul>
     14        <li><?php _e( 'Oh bother! No forums were found here!', 'bbpress' ); ?></li>
     15    </ul>
    1416</div>
  • trunk/src/templates/default/bbpress/feedback-no-replies.php

    r4836 r5563  
    1111
    1212<div class="bbp-template-notice">
    13     <p><?php _e( 'Oh bother! No replies were found here!', 'bbpress' ); ?></p>
     13    <ul>
     14        <li><?php _e( 'Oh bother! No replies were found here!', 'bbpress' ); ?></li>
     15    </ul>
    1416</div>
  • trunk/src/templates/default/bbpress/feedback-no-search.php

    r4836 r5563  
    1111
    1212<div class="bbp-template-notice">
    13     <p><?php _e( 'Oh bother! No search results were found here!', 'bbpress' ); ?></p>
     13    <ul>
     14        <li><?php _e( 'Oh bother! No search results were found here!', 'bbpress' ); ?></li>
     15    </ul>
    1416</div>
  • trunk/src/templates/default/bbpress/feedback-no-topics.php

    r4836 r5563  
    1111
    1212<div class="bbp-template-notice">
    13     <p><?php _e( 'Oh bother! No topics were found here!', 'bbpress' ); ?></p>
     13    <ul>
     14        <li><?php _e( 'Oh bother! No topics were found here!', 'bbpress' ); ?></li>
     15    </ul>
    1416</div>
  • trunk/src/templates/default/bbpress/form-forum.php

    r5561 r5563  
    4545
    4646                    <div class="bbp-template-notice">
    47                         <p><?php _e( 'This forum is closed to new content, however your account still allows you to do so.', 'bbpress' ); ?></p>
     47                        <ul>
     48                            <li><?php _e( 'This forum is closed to new content, however your account still allows you to do so.', 'bbpress' ); ?></li>
     49                        </ul>
    4850                    </div>
    4951
     
    5355
    5456                    <div class="bbp-template-notice">
    55                         <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
     57                        <ul>
     58                            <li><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
     59                        </ul>
    5660                    </div>
    5761
     
    159163    <div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum">
    160164        <div class="bbp-template-notice">
    161             <p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new content.', 'bbpress' ), bbp_get_forum_title() ); ?></p>
     165            <ul>
     166                <li><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new content.', 'bbpress' ), bbp_get_forum_title() ); ?></li>
     167            </ul>
    162168        </div>
    163169    </div>
     
    167173    <div id="no-forum-<?php bbp_forum_id(); ?>" class="bbp-no-forum">
    168174        <div class="bbp-template-notice">
    169             <p><?php is_user_logged_in() ? _e( 'You cannot create new forums.', 'bbpress' ) : _e( 'You must be logged in to create new forums.', 'bbpress' ); ?></p>
     175            <ul>
     176                <li><?php is_user_logged_in() ? _e( 'You cannot create new forums.', 'bbpress' ) : _e( 'You must be logged in to create new forums.', 'bbpress' ); ?></li>
     177            </ul>
    170178        </div>
    171179    </div>
     
    177185</div>
    178186
    179 <?php endif; ?>
     187<?php endif;
  • trunk/src/templates/default/bbpress/form-reply-move.php

    r5561 r5563  
    2727
    2828                        <div class="bbp-template-notice info">
    29                             <p><?php _e( 'You can either make this reply a new topic with a new title, or merge it into an existing topic.', 'bbpress' ); ?></p>
     29                            <ul>
     30                                <li><?php _e( 'You can either make this reply a new topic with a new title, or merge it into an existing topic.', 'bbpress' ); ?></li>
     31                            </ul>
    3032                        </div>
    3133
    3234                        <div class="bbp-template-notice">
    33                             <p><?php _e( 'If you choose an existing topic, replies will be ordered by the time and date they were created.', 'bbpress' ); ?></p>
     35                            <ul>
     36                                <li><?php _e( 'If you choose an existing topic, replies will be ordered by the time and date they were created.', 'bbpress' ); ?></li>
     37                            </ul>
    3438                        </div>
    3539
     
    6569                        </fieldset>
    6670
    67                         <div class="bbp-template-notice error">
    68                             <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></p>
     71                        <div class="bbp-template-notice error" role="alert" tabindex="-1">
     72                            <ul>
     73                                <li><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></li>
     74                            </ul>
    6975                        </div>
    7076
  • trunk/src/templates/default/bbpress/form-reply.php

    r5561 r5563  
    3434
    3535                    <div class="bbp-template-notice">
    36                         <p><?php _e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p>
     36                        <ul>
     37                            <li><?php _e( 'This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></li>
     38                        </ul>
    3739                    </div>
    3840
     
    4244
    4345                    <div class="bbp-template-notice">
    44                         <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
     46                        <ul>
     47                            <li><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
     48                        </ul>
    4549                    </div>
    4650
     
    182186    <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
    183187        <div class="bbp-template-notice">
    184             <p><?php printf( __( 'The topic &#8216;%s&#8217; is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></p>
     188            <ul>
     189                <li><?php printf( __( 'The topic &#8216;%s&#8217; is closed to new replies.', 'bbpress' ), bbp_get_topic_title() ); ?></li>
     190            </ul>
    185191        </div>
    186192    </div>
     
    190196    <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
    191197        <div class="bbp-template-notice">
    192             <p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></p>
     198            <ul>
     199                <li><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></li>
     200            </ul>
    193201        </div>
    194202    </div>
     
    198206    <div id="no-reply-<?php bbp_topic_id(); ?>" class="bbp-no-reply">
    199207        <div class="bbp-template-notice">
    200             <p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></p>
     208            <ul>
     209                <li><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></li>
     210            </ul>
    201211        </div>
    202212    </div>
     
    208218</div>
    209219
    210 <?php endif; ?>
     220<?php endif;
  • trunk/src/templates/default/bbpress/form-topic-merge.php

    r5561 r5563  
    2727
    2828                        <div class="bbp-template-notice info">
    29                             <p><?php _e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></p>
    30                             <p><?php _e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'bbpress' ); ?></p>
     29                            <ul>
     30                                <li><?php _e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></li>
     31                                <li><?php _e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.',                                  'bbpress' ); ?></li>
     32                            </ul>
    3133                        </div>
    3234
    3335                        <div class="bbp-template-notice">
    34                             <p><?php _e( 'Replies to both topics are merged chronologically, ordered by the time and date they were published. Topics may be updated to a 1 second difference to maintain chronological order based on the merge direction.', 'bbpress' ); ?></p>
     36                            <ul>
     37                                <li><?php _e( 'Replies to both topics are merged chronologically, ordered by the time and date they were published. Topics may be updated to a 1 second difference to maintain chronological order based on the merge direction.', 'bbpress' ); ?></li>
     38                            </ul>
    3539                        </div>
    3640
     
    8892
    8993                        <div class="bbp-template-notice error">
    90                             <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></p>
     94                            <ul>
     95                                <li><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></li>
     96                            </ul>
    9197                        </div>
    9298
  • trunk/src/templates/default/bbpress/form-topic-split.php

    r5561 r5563  
    2727
    2828                        <div class="bbp-template-notice info">
    29                             <p><?php _e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'bbpress' ); ?></p>
     29                            <ul>
     30                                <li><?php _e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'bbpress' ); ?></li>
     31                            </ul>
    3032                        </div>
    3133
    3234                        <div class="bbp-template-notice">
    33                             <p><?php _e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'bbpress' ); ?></p>
     35                            <ul>
     36                                <li><?php _e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'bbpress' ); ?></li>
     37                            </ul>
    3438                        </div>
    3539
     
    9195                        </fieldset>
    9296
    93                         <div class="bbp-template-notice error">
    94                             <p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></p>
     97                        <div class="bbp-template-notice error" role="alert" tabindex="-1">
     98                            <ul>
     99                                <li><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></li>
     100                            </ul>
    95101                        </div>
    96102
  • trunk/src/templates/default/bbpress/form-topic-tag.php

    r5561 r5563  
    2323
    2424                <div class="bbp-template-notice info">
    25                     <p><?php _e( 'Leave the slug empty to have one automatically generated.', 'bbpress' ); ?></p>
     25                    <ul>
     26                        <li><?php _e( 'Leave the slug empty to have one automatically generated.', 'bbpress' ); ?></li>
     27                    </ul>
    2628                </div>
    2729
    2830                <div class="bbp-template-notice">
    29                     <p><?php _e( 'Changing the slug affects its permalink. Any links to the old slug will stop working.', 'bbpress' ); ?></p>
     31                    <ul>
     32                        <li><?php _e( 'Changing the slug affects its permalink. Any links to the old slug will stop working.', 'bbpress' ); ?></li>
     33                    </ul>
    3034                </div>
    3135
     
    6569
    6670                <div class="bbp-template-notice">
    67                     <p><?php _e( 'Merging tags together cannot be undone.', 'bbpress' ); ?></p>
     71                    <ul>
     72                        <li><?php _e( 'Merging tags together cannot be undone.', 'bbpress' ); ?></li>
     73                    </ul>
    6874                </div>
    6975
     
    94100
    95101                    <div class="bbp-template-notice info">
    96                         <p><?php _e( 'This does not delete your topics. Only the tag itself is deleted.', 'bbpress' ); ?></p>
     102                        <ul>
     103                            <li><?php _e( 'This does not delete your topics. Only the tag itself is deleted.', 'bbpress' ); ?></li>
     104                        </ul>
    97105                    </div>
    98106                    <div class="bbp-template-notice">
    99                         <p><?php _e( 'Deleting a tag cannot be undone.', 'bbpress' ); ?></p>
    100                         <p><?php _e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></p>
     107                        <ul>
     108                            <li><?php _e( 'Deleting a tag cannot be undone.', 'bbpress' ); ?></li>
     109                            <li><?php _e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></li>
     110                        </ul>
    101111                    </div>
    102112
     
    120130    </div>
    121131
    122 <?php endif; ?>
     132<?php endif;
  • trunk/src/templates/default/bbpress/form-topic.php

    r5561 r5563  
    5454
    5555                    <div class="bbp-template-notice">
    56                         <p><?php _e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></p>
     56                        <ul>
     57                            <li><?php _e( 'This forum is marked as closed to new topics, however your posting capabilities still allow you to do so.', 'bbpress' ); ?></li>
     58                        </ul>
    5759                    </div>
    5860
     
    6264
    6365                    <div class="bbp-template-notice">
    64                         <p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p>
     66                        <ul>
     67                            <li><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></li>
     68                        </ul>
    6569                    </div>
    6670
     
    227231    <div id="forum-closed-<?php bbp_forum_id(); ?>" class="bbp-forum-closed">
    228232        <div class="bbp-template-notice">
    229             <p><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title() ); ?></p>
     233            <ul>
     234                <li><?php printf( __( 'The forum &#8216;%s&#8217; is closed to new topics and replies.', 'bbpress' ), bbp_get_forum_title() ); ?></li>
     235            </ul>
    230236        </div>
    231237    </div>
     
    235241    <div id="no-topic-<?php bbp_forum_id(); ?>" class="bbp-no-topic">
    236242        <div class="bbp-template-notice">
    237             <p><?php is_user_logged_in() ? _e( 'You cannot create new topics.', 'bbpress' ) : _e( 'You must be logged in to create new topics.', 'bbpress' ); ?></p>
     243            <ul>
     244                <li><?php is_user_logged_in() ? _e( 'You cannot create new topics.', 'bbpress' ) : _e( 'You must be logged in to create new topics.', 'bbpress' ); ?></li>
     245            </ul>
    238246        </div>
    239247    </div>
     
    245253</div>
    246254
    247 <?php endif; ?>
     255<?php endif;
  • trunk/src/templates/default/bbpress/form-user-register.php

    r5561 r5563  
    1717
    1818        <div class="bbp-template-notice">
    19             <p><?php _e( 'Your username must be unique, and cannot be changed later.', 'bbpress' ) ?></p>
    20             <p><?php _e( 'We use your email address to email you a secure password and verify your account.', 'bbpress' ) ?></p>
     19            <ul>
     20                <li><?php _e( 'Your username must be unique, and cannot be changed later.',                        'bbpress' ); ?></li>
     21                <li><?php _e( 'We use your email address to email you a secure password and verify your account.', 'bbpress' ); ?></li>
     22            </ul>
    2123        </div>
    2224
  • trunk/src/templates/default/css/bbpress.css

    r5508 r5563  
    890890        color: #c00;
    891891    }
    892     div.bbp-template-notice p {
     892    div.bbp-template-notice p,
     893    div.bbp-template-notice li {
    893894        margin: 0.5em 0 6px 0 !important;
    894895        padding: 2px;
Note: See TracChangeset for help on using the changeset viewer.