Skip to:
Content

BuddyPress.org

Changeset 10656


Ignore:
Timestamp:
03/16/2016 08:19:02 PM (9 years ago)
Author:
dcavins
Message:

Profile: Use fieldsets/legends for some fields.

Use a fieldset with a legend for radio, checkbox and datebox field
types. This improves the semantics of the markup by using legends to
describe a group of form fields and labels to describe the options in
that group.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/css/buddypress-rtl.css

    r10533 r10656  
    654654}
    655655#buddypress .standard-form label,
    656 #buddypress .standard-form span.label {
     656#buddypress .standard-form span.label,
     657#buddypress .standard-form legend {
    657658    display: block;
    658659    font-weight: bold;
     
    665666    margin: auto;
    666667}
    667 #buddypress .standard-form div.checkbox label:nth-child(n+2),
    668 #buddypress .standard-form div.radio div label {
     668#buddypress .standard-form .checkbox label,
     669#buddypress .standard-form .radio label {
    669670    color: #767676;
    670671    font-size: 100%;
  • trunk/src/bp-templates/bp-legacy/css/buddypress.css

    r10533 r10656  
    654654}
    655655#buddypress .standard-form label,
    656 #buddypress .standard-form span.label {
     656#buddypress .standard-form span.label,
     657#buddypress .standard-form legend {
    657658    display: block;
    658659    font-weight: bold;
     
    665666    margin: auto;
    666667}
    667 #buddypress .standard-form div.checkbox label:nth-child(n+2),
    668 #buddypress .standard-form div.radio div label {
     668#buddypress .standard-form .checkbox label,
     669#buddypress .standard-form .radio label {
    669670    color: #767676;
    670671    font-size: 100%;
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

    r10561 r10656  
    6868        } ?>
    6969
    70         <div class="checkbox">
    71             <label for="<?php bp_the_profile_field_input_name(); ?>">
     70        <fieldset class="checkbox">
     71            <legend>
    7272                <?php bp_the_profile_field_name(); ?>
    7373                <?php bp_the_profile_field_required_label(); ?>
    74             </label>
     74            </legend>
    7575
    7676            <?php
     
    8383            ) ); ?>
    8484
    85         </div>
     85        </fieldset>
    8686
    8787        <?php
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

    r10573 r10656  
    7979        ) ); ?>
    8080
    81         <div class="datebox">
    82 
    83             <label for="<?php bp_the_profile_field_input_name(); ?>_day">
     81        <fieldset class="datebox">
     82
     83            <legend>
    8484                <?php bp_the_profile_field_name(); ?>
    8585                <?php bp_the_profile_field_required_label(); ?>
    86             </label>
     86            </legend>
    8787
    8888            <?php
     
    124124            </select>
    125125
    126         </div>
     126        </fieldset>
    127127    <?php
    128128    }
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php

    r10417 r10656  
    6666        } ?>
    6767
    68         <div class="radio">
     68        <fieldset class="radio">
    6969
    70             <label for="<?php bp_the_profile_field_input_name(); ?>">
     70            <legend>
    7171                <?php bp_the_profile_field_name(); ?>
    7272                <?php bp_the_profile_field_required_label(); ?>
    73             </label>
     73            </legend>
    7474
    7575            <?php
     
    8888            <?php endif; ?>
    8989
    90         </div>
     90        </fieldset>
    9191
    9292        <?php
Note: See TracChangeset for help on using the changeset viewer.