Making WordPress.org

Changeset 12821


Ignore:
Timestamp:
08/09/2023 07:25:03 PM (16 months ago)
Author:
coffee2code
Message:

Jobs theme: Add missing 'id' attribute to input fields to associate them with their labels.

Props viralsampat, dd32, coffee2code.
See #6695.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/content-post-job.php

    r11387 r12821  
    4848        <label for="howtoapply"><?php _e( 'How to Apply', 'jobswp' ); ?>* <span><?php _e( '(also specify)', 'jobswp' ); ?></span></label>
    4949        <div class="howtoapply-inputs">
    50             <select name="howtoapply_method" class="<?php echo jobswp_required_field_classes( 'howtoapply_method' ); ?>" required>
     50            <select name="howtoapply_method" id="howtoapply_method" class="<?php echo esc_attr( jobswp_required_field_classes( 'howtoapply_method' ) ); ?>" required>
    5151                <option value="" selected="selected" disabled="disabled"></option>
    5252                <option value="email" <?php echo jobswp_field_value( 'howtoapply_method', 'email' ); ?>><?php _e( 'Email Address', 'jobswp' ); ?></option>
     
    5454                <option value="web" <?php echo jobswp_field_value( 'howtoapply_method', 'web' ); ?>><?php _e( 'Online Form', 'jobswp' ); ?></option>
    5555            </select> :
    56             <input type="text" name="howtoapply" class="<?php echo jobswp_required_field_classes( 'howtoapply' ); ?>" <?php echo jobswp_field_value( 'howtoapply' ); ?> />
     56            <input type="text" name="howtoapply" id="howtoapply" class="<?php echo esc_attr( jobswp_required_field_classes( 'howtoapply' ) ); ?>" <?php echo jobswp_field_value( 'howtoapply' ); ?> />
    5757        </div>
    5858
     
    8181        <div class="post-job-input">
    8282            <label for="category"><?php _e( 'Category', 'jobswp' ); ?>*</label>
    83             <select name="category" class="<?php echo jobswp_required_field_classes( 'category' ); ?>" required>
     83            <select name="category" id="category" class="<?php echo jobswp_required_field_classes( 'category' ); ?>" required>
    8484                <option value="" selected="selected" disabled="disabled"></option>
    8585                <?php foreach ( Jobs_Dot_WP::get_job_categories() as $cat ) : ?>
     
    9191        <div class="post-job-input">
    9292            <label for="jobtype"><?php _e( 'Job Type', 'jobswp' ); ?>*</label>
    93             <select name="jobtype" class="<?php echo jobswp_required_field_classes( 'jobtype' ); ?>" required>
     93            <select name="jobtype" id="jobtype" class="<?php echo esc_attr( jobswp_required_field_classes( 'jobtype' ) ); ?>" required>
    9494                <option value="" selected="selected" disabled="disabled"></option>
    9595                <option value="ft" <?php echo jobswp_field_value( 'jobtype', 'ft' ); ?>><?php _e( 'Full Time', 'jobswp' ); ?></option>
     
    105105
    106106        <div class="post-job-input">
    107             <label for="job_title"><?php _e( 'Job Description', 'jobswp' ); ?>*</label>
    108             <textarea name="job_description" rows="10" class="<?php echo jobswp_required_field_classes( 'job_description' ); ?>"><?php echo jobswp_field_value( 'job_description' ); ?></textarea>
     107            <label for="job_description"><?php _e( 'Job Description', 'jobswp' ); ?>*</label>
     108            <textarea name="job_description" id="job_description" rows="10" class="<?php echo jobswp_required_field_classes( 'job_description' ); ?>"><?php echo jobswp_field_value( 'job_description' ); ?></textarea>
    109109            <p><?php echo sprintf( __( 'Line and paragraph breaks are automatic. <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code>%s</code>', 'jobswp' ), jobswp_allowed_tags() ); ?></p>
    110110            <p><?php _e( 'All job postings are moderated prior to appearing on the site.', 'jobswp' ); ?></p>
     
    136136            </ul>
    137137            <p>
    138                 <input type="checkbox" name="accept" value="1" required /><label for="accept"><?php _e( 'I agree to the terms stated above.', 'jobswp' ); ?>*</label>
     138                <input type="checkbox" name="accept" id="accept" value="1" required /><label for="accept"><?php _e( 'I agree to the terms stated above.', 'jobswp' ); ?>*</label>
    139139            </p>
    140140        </div>
     
    142142        $button_label = __( 'Submit Job', 'jobswp' );
    143143    } ?>
    144     <input class="submit-job" type="submit" name="submitjob" value="<?php echo esc_attr( $button_label ); ?>" />
     144    <input class="submit-job" id="submit-job" type="submit" name="submitjob" value="<?php echo esc_attr( $button_label ); ?>" />
    145145</div>
    146146
Note: See TracChangeset for help on using the changeset viewer.