Ticket #871: bb-871.diff

File bb-871.diff, 8.6 kB (added by MarcoZ, 7 months ago)

Updated patch, removes inline styling and uses proper CSS styling instead for hidden labels

  • bb-admin/admin-functions.php

    old new  
    395395 
    396396                if ( $show_search ) { 
    397397                        $r .= "<form action='' method='get' id='search'>\n\t<p>"; 
     398                        $r .= "<label class='hidden' for='usersearch'>" . _e('Search:') . "</label>"; 
    398399                        $r .= "\t\t<input type='text' name='usersearch' id='usersearch' value='" . wp_specialchars( $this->search_term, 1) . "' />\n"; 
    399400                        $r .= "\t\t<input type='submit' value='" . __('Search for users &raquo;') . "' />\n\t</p>\n"; 
    400401                        $r .= "</form>\n\n"; 
     
    627628<form method="post" id="<?php echo $action; ?>-forum" action="<?php bb_option('uri'); ?>bb-admin/bb-forum.php"> 
    628629        <fieldset> 
    629630        <table><col /><col style="width: 80%" /> 
    630                 <tr><th scope="row"><?php _e('Forum Name:'); ?></th> 
     631                <tr><th scope="row"><label for="forum-name"><?php _e('Forum Name:'); ?></label></th> 
    631632                        <td><input type="text" name="forum_name" id="forum-name" value="<?php if ( $forum_id ) echo attribute_escape( get_forum_name( $forum_id ) ); ?>" tabindex="10" class="widefat" /></td> 
    632633                </tr> 
    633                 <tr><th scope="row"><?php _e('Forum Description:'); ?></th> 
     634                <tr><th scope="row"><label for="forum-desc"><?php _e('Forum Description:'); ?></label></th> 
    634635                        <td><input type="text" name="forum_desc" id="forum-desc" value="<?php if ( $forum_id ) echo attribute_escape( get_forum_description( $forum_id ) ); ?>" tabindex="11" class="widefat" /></td> 
    635636                </tr> 
    636                 <tr id="forum-parent-row"><th scope="row"><?php _e('Forum Parent:'); ?></th> 
     637                <tr id="forum-parent-row"><th scope="row"><label for="forum_parent"><?php _e('Forum Parent:'); ?></label></th> 
    637638                        <td><?php bb_forum_dropdown( array('cut_branch' => $forum_id, 'id' => 'forum_parent', 'none' => true, 'selected' => $forum_id ? get_forum_parent( $forum_id ) : 0) ); ?></td> 
    638639                </tr> 
    639                 <tr id="forum-position-row"><th scope="row"><?php _e('Position:'); ?></th> 
     640                <tr id="forum-position-row"><th scope="row"><label for="forum-order"><?php _e('Position:'); ?></label></th> 
    640641                        <td><input type="text" name="forum_order" id="forum-order" value="<?php if ( $forum_id ) echo get_forum_position( $forum_id ); ?>" tabindex="12" maxlength="10" class="widefat" /></td> 
    641642                </tr> 
    642643        </table> 
  • bb-admin/style.css

    old new  
    542542.active { 
    543543        background-color: rgb(200, 250, 200) 
    544544} 
     545 
     546.hidden { 
     547        display: none; 
     548        } 
  • bb-includes/template-functions.php

    old new  
    16031603?> 
    16041604 
    16051605<tr class="<?php echo $class; ?>"> 
    1606         <th scope="row"><?php echo $title; ?></th> 
     1606        <th scope="row"><label for="<?php echo $name; ?>"><?php echo $title; ?></label></th> 
    16071607        <td> 
    16081608                <input name="<?php echo $name; ?>" type="<?php echo $type; ?>" id="<?php echo $name; ?>" value="<?php echo $value; ?>" /> 
    16091609                <?php echo $message; ?> 
     
    17701770 
    17711771<table> 
    17721772<tr class="<?php echo $class; ?>"> 
    1773         <th scope="row" rowspan="2"><?php _e('New password'); ?></th> 
     1773        <th scope="row" rowspan="2"><label for="pass1"><?php _e('New password'); ?></label></th> 
    17741774        <td><input name="pass1" type="password" id="pass1" autocomplete="off" /></td> 
    17751775</tr> 
    17761776<tr class="<?php echo $class; ?>"> 
  • bb-templates/kakumei/login.php

    old new  
    99<table> 
    1010<?php if ( $user_exists ) : ?> 
    1111        <tr valign="top"> 
    12                 <th scope="row"><?php _e('Username:'); ?></th> 
    13                 <td><input name="user_login" type="text" value="<?php echo $user_login; ?>" /></td> 
     12                <th scope="row"><label for="user_login"><?php _e('Username:'); ?></label></th> 
     13                <td><input name="user_login" id="user_login" type="text" value="<?php echo $user_login; ?>" /></td> 
    1414        </tr> 
    1515        <tr valign="top" class="error"> 
    16                 <th scope="row"><?php _e('Password:'); ?></th> 
    17                 <td><input name="password" type="password" /><br /> 
     16                <th scope="row"><label for="password"><?php _e('Password:'); ?></label></th> 
     17                <td><input name="password" id="password" type="password" /><br /> 
    1818                <?php _e('Incorrect password'); ?></td> 
    1919        </tr> 
    2020<?php elseif ( isset($_POST['user_login']) ) : ?> 
    2121        <tr valign="top" class="error"> 
    22                 <th scope="row"><?php _e('Username:'); ?></th> 
    23                 <td><input name="user_login" type="text" value="<?php echo $user_login; ?>" /><br /> 
     22                <th scope="row"><label for="user_login"><?php _e('Username:'); ?></label></th> 
     23                <td><input name="user_login" id="user_login" type="text" value="<?php echo $user_login; ?>" /><br /> 
    2424                <?php _e('This username does not exist.'); ?> <a href="<?php bb_option('uri'); ?>register.php?user=<?php echo $user_login; ?>"><?php _e('Register it?'); ?></a></td> 
    2525        </tr> 
    2626        <tr valign="top"> 
    27                 <th scope="row"><?php _e('Password:'); ?></th> 
    28                 <td><input name="password" type="password" /></td> 
     27                <th scope="row"><label for="password"><?php _e('Password:'); ?></label></th> 
     28                <td><input name="password" id="password" type="password" /></td> 
    2929        </tr> 
    3030<?php else : ?> 
    3131        <tr valign="top" class="error"> 
    32                 <th scope="row"><?php _e('Username:'); ?></th> 
    33                 <td><input name="user_login" type="text" /><br /> 
     32                <th scope="row"><label for="user_login"><?php _e('Username:'); ?></label></th> 
     33                <td><input name="user_login" id="user_login" type="text" /><br /> 
    3434        </tr> 
    3535        <tr valign="top"> 
    36                 <th scope="row"><?php _e('Password:'); ?></th> 
    37                 <td><input name="password" type="password" /></td> 
     36                <th scope="row"><label for="password"><?php _e('Password:'); ?></label></th> 
     37                <td><input name="password" id="password" type="password" /></td> 
    3838        </tr> 
    3939<?php endif; ?> 
    4040        <tr valign="top"> 
    41                 <th scope="row"><?php _e('Remember me:'); ?></th> 
     41                <th scope="row"><label for="remember"><?php _e('Remember me:'); ?></label></th> 
    4242                <td><input name="remember" type="checkbox" id="remember" value="1"<?php echo $remember_checked; ?> /></td> 
    4343        </tr> 
    4444        <tr> 
  • bb-templates/kakumei/register.php

    old new  
    1212<table width="100%"> 
    1313<?php if ( $user_safe === false ) : ?> 
    1414<tr class="error"> 
    15 <th scope="row"><?php _e('Username:'); ?></th> 
     15<th scope="row"><label for="user_login"><?php _e('Username:'); ?></label></th> 
    1616<td><input name="user_login" type="text" id="user_login" size="30" maxlength="30" /><br /> 
    1717<?php _e('Your username was not valid, please try again'); ?></td> 
    1818</tr> 
    1919<?php else : ?> 
    2020<tr class="required"> 
    21 <th scope="row"><sup class="required">*</sup> <?php _e('Username:'); ?></th> 
     21<th scope="row"><label for="user_login"><sup class="required">*</sup> <?php _e('Username:'); ?></label></th> 
    2222<td><input name="user_login" type="text" id="user_login" size="30" maxlength="30" value="<?php if (!is_bool($user_login)) echo $user_login; ?>" /></td> 
    2323</tr> 
    2424<?php endif; ?> 
    2525<?php if ( is_array($profile_info_keys) ) : foreach ( $profile_info_keys as $key => $label ) : ?> 
    2626<tr<?php if ( $label[0] ) { echo ' class="required"'; $label[1] = '<sup class="required">*</sup> ' . $label[1]; } ?>> 
    27   <th scope="row"><?php echo $label[1]; ?>:</th> 
     27  <th scope="row"><label for="<?php echo $key; ?>"><?php echo $label[1]; ?>:</label></th> 
    2828  <td><input name="<?php echo $key; ?>" type="text" id="<?php echo $key; ?>" size="30" maxlength="140" value="<?php echo $$key; ?>" /><?php 
    2929if ( $$key === false ) : 
    3030        if ( $key == 'user_email' ) 
  • bb-templates/kakumei/search-form.php

    old new  
    11<form action="<?php bb_option('uri'); ?>search.php" method="get"> 
    2         <input class="text" type="text" size="14" maxlength="100" name="q" /> 
     2        <label class="hidden" for="q"><?php _e('Search:'); ?></label> 
     3        <input class="text" type="text" size="14" maxlength="100" name="q" id="q" /> 
    34        <input class="submit" type="submit" value="<?php echo attribute_escape( __('Search &raquo;') ); ?>" /> 
    45</form> 
  • bb-templates/kakumei/style.css

    old new  
    618618.form-table input, .form-table textarea { 
    619619        border-color: #c6d9e9; 
    620620} 
     621 
     622.hidden { 
     623        display: none; 
     624}