Skip to:
Content

bbPress.org

Changeset 1503


Ignore:
Timestamp:
04/28/2008 12:14:06 PM (18 years ago)
Author:
sambauers
Message:

Form accessibility fixes - See #871 - branches/0.9 - props MarcoZ

Location:
branches/0.9
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9/bb-admin/admin-functions.php

    r1405 r1503  
    332332        if ( $show_search ) {
    333333            $r .= "<form action='' method='get' id='search'>\n\t<p>";
     334            $r .= "<label class='hidden' for='usersearch'>" . _e('Search:') . "</label>";
    334335            $r .= "\t\t<input type='text' name='usersearch' id='usersearch' value='" . wp_specialchars( $this->search_term, 1) . "' />\n";
    335336            $r .= "\t\t<input type='submit' value='" . __('Search for users &raquo;') . "' />\n\t</p>\n";
     
    564565    <fieldset>
    565566    <table><col /><col style="width: 80%" />
    566         <tr><th scope="row"><?php _e('Forum Name:'); ?></th>
     567        <tr><th scope="row"><label for="forum-name"><?php _e('Forum Name:'); ?></label></th>
    567568            <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>
    568569        </tr>
    569         <tr><th scope="row"><?php _e('Forum Description:'); ?></th>
     570        <tr><th scope="row"><label for="forum-desc"><?php _e('Forum Description:'); ?></label></th>
    570571            <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>
    571572        </tr>
    572         <tr id="forum-parent-row"><th scope="row"><?php _e('Forum Parent:'); ?></th>
     573        <tr id="forum-parent-row"><th scope="row"><label for="forum_parent"><?php _e('Forum Parent:'); ?></label></th>
    573574            <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>
    574575        </tr>
    575         <tr id="forum-position-row"><th scope="row"><?php _e('Position:'); ?></th>
     576        <tr id="forum-position-row"><th scope="row"><label for="forum-order"><?php _e('Position:'); ?></label></th>
    576577            <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>
    577578        </tr>
  • branches/0.9/bb-admin/style.css

    r1379 r1503  
    636636    border-top-color: #999;
    637637}
     638
     639.hidden {
     640    display: none;
     641}
  • branches/0.9/bb-includes/template-functions.php

    r1481 r1503  
    15531553
    15541554<tr class="<?php echo $class; ?>">
    1555     <th scope="row"><?php echo $title; ?></th>
     1555    <th scope="row"><label for="<?php echo $name; ?>"><?php echo $title; ?></label></th>
    15561556    <td>
    15571557        <input name="<?php echo $name; ?>" type="<?php echo $type; ?>" id="<?php echo $name; ?>" value="<?php echo $value; ?>" />
     
    17201720<table>
    17211721<tr class="<?php echo $class; ?>">
    1722     <th scope="row" rowspan="2"><?php _e('New password'); ?></th>
     1722    <th scope="row" rowspan="2"><label for="pass1"><?php _e('New password'); ?></label></th>
    17231723    <td><input name="pass1" type="password" id="pass1" autocomplete="off" /></td>
    17241724</tr>
  • branches/0.9/bb-templates/kakumei/login.php

    r1166 r1503  
    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>
  • branches/0.9/bb-templates/kakumei/register.php

    r1290 r1503  
    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>
     
    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>
     
    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 ) :
  • branches/0.9/bb-templates/kakumei/search-form.php

    r706 r1503  
    11<form action="<?php bb_option('uri'); ?>search.php" method="get">
    2     <p><?php _e('Search:'); ?>
     2    <p>
     3        <label for="q"><?php _e('Search:'); ?></label>
    34        <input type="text" size="38" maxlength="100" name="q" value="<?php echo attribute_escape( $q ); ?>" />
    45    </p>
  • branches/0.9/bb-templates/kakumei/style.css

    r1488 r1503  
    576576    border-color: #c6d9e9;
    577577}
     578
     579.hidden {
     580    display: none;
     581}
Note: See TracChangeset for help on using the changeset viewer.