Skip to content

Commit

Permalink
Add <label> to form inputs
Browse files Browse the repository at this point in the history
To comply with WCAG standard, inputs should be associated with a label.

This requires a CSS tweak CSS to ensure consistent display of labels in
bold font.

Fixes #27258
  • Loading branch information
dregad committed Sep 18, 2020
1 parent acbabd1 commit d98fe42
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions account_prof_edit_page.php
Expand Up @@ -115,47 +115,55 @@
<table class="table table-striped table-bordered table-condensed">
<tr>
<th class="category">
<span class="required">*</span>
<?php echo lang_get( 'platform' ) ?>
<label for="platform">
<span class="required">*</span>
<?php echo lang_get( 'platform' ) ?>
</label>
</th>
<td>
<input name="platform" type="text" required
<input id="platform" name="platform" type="text" required
class="input-sm" size="32" maxlength="32"
value="<?php echo string_attribute( $v_platform ) ?>"
/>
</td>
</tr>
<tr>
<th class="category">
<span class="required">*</span>
<?php echo lang_get( 'os' ) ?>
<label for="os">
<span class="required">*</span>
<?php echo lang_get( 'os' ) ?>
</label>
</th>
<td>
<input name="os" type="text" required
<input id="os" name="os" type="text" required
class="input-sm" size="32" maxlength="32"
value="<?php echo string_attribute( $v_os ) ?>"
/>
</td>
</tr>
<tr>
<th class="category">
<span class="required">*</span>
<?php echo lang_get( 'os_build' ) ?>
<label for="os_build">
<span class="required">*</span>
<?php echo lang_get( 'os_build' ) ?>
</label>
</th>
<td>
<input name="os_build" type="text" required
<input id="os_build" name="os_build" type="text" required
class="input-sm" size="16" maxlength="16"
value="<?php echo string_attribute( $v_os_build ) ?>"
/>
</td>
</tr>
<tr>
<th class="category">
<?php echo lang_get( 'additional_description' ) ?>
<label for="description">
<?php echo lang_get( 'additional_description' ) ?>
</label>
</th>
<td>
<?php # Newline after opening textarea tag is intentional, see #25839 ?>
<textarea name="description"
<textarea id="description" name="description"
class="form-control"
cols="60" rows="8">
<?php echo string_textarea( $v_description ) ?>
Expand Down

0 comments on commit d98fe42

Please sign in to comment.