Skip to:
Content

BuddyPress.org

Changeset 10713


Ignore:
Timestamp:
04/20/2016 03:10:50 PM (8 years ago)
Author:
hnla
Message:

BP XProfile user edit screens
Commit updates radio, checkbox, datebox form controls to improve markup Standards & accessibility.

  • Adds new classes to simplify targeting labels/inputs.
  • Updates main css styles for labels to include fieldsets/legends.
  • Updates wrapping 'divs' to fieldsets for better Standards & changes labels used for headings to 'legend' elements.
  • Add new ruleset to buddypress.css to remove fieldset border & padding to ensure new elements do not disrupt existing site layouts.

Fixes #6678 Props dcavins, hnla, mercime

Location:
trunk/src
Files:
4 edited

Legend:

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

    r10656 r10713  
    6176173.5 - Forms
    618618--------------------------------------------------------------*/
     619
     620#buddypress form fieldset {
     621    border: 0;
     622    padding: 0;
     623}
     624
    619625#buddypress .standard-form textarea,
    620626#buddypress .standard-form input[type=text],
     
    673679    margin: 5px 0 0 0;
    674680}
     681#buddypress .standard-form .checkbox label input,
     682#buddypress .standard-form .radio label input {
     683    margin-left: 3px;
     684}
    675685#buddypress .standard-form#sidebar-login-form label {
    676686    margin-top: 5px;
  • trunk/src/bp-templates/bp-legacy/css/buddypress.css

    r10656 r10713  
    6176173.5 - Forms
    618618--------------------------------------------------------------*/
     619
     620#buddypress form fieldset {
     621    border: 0;
     622    padding: 0;
     623}
     624
    619625#buddypress .standard-form textarea,
    620626#buddypress .standard-form input[type=text],
     
    673679    margin: 5px 0 0 0;
    674680}
     681#buddypress .standard-form .checkbox label input,
     682#buddypress .standard-form .radio label input {
     683    margin-right: 3px;
     684}
    675685#buddypress .standard-form#sidebar-login-form label {
    676686    margin-top: 5px;
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-checkbox.php

    r10656 r10713  
    155155            }
    156156
    157             $new_html = sprintf( '<label for="%3$s"><input %1$s type="checkbox" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
     157            $new_html = sprintf( '<label for="%3$s" class="option-label"><input %1$s type="checkbox" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
    158158                $selected,
    159159                esc_attr( "field_{$this->field_obj->id}[]" ),
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php

    r10656 r10713  
    133133            }
    134134
    135             $new_html = sprintf( '<label for="%3$s"><input %1$s type="radio" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
     135            $new_html = sprintf( '<label for="%3$s" class="option-label"><input %1$s type="radio" name="%2$s" id="%3$s" value="%4$s">%5$s</label>',
    136136                $selected,
    137137                esc_attr( "field_{$this->field_obj->id}" ),
Note: See TracChangeset for help on using the changeset viewer.