$attr['class'] = $this->mClass;
}
- $chkLabel = Xml::check( $this->mName, $value, $attr )
- . ' '
- . Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel );
+ $attrLabel = array( 'for' => $this->mID );
+ if ( isset( $attr['title'] ) ) {
+ // propagate tooltip to label
+ $attrLabel['title'] = $attr['title'];
+ }
+
+ $chkLabel = Xml::check( $this->mName, $value, $attr ) .
+ ' ' .
+ Html::rawElement( 'label', $attrLabel, $this->mLabel );
if ( $wgUseMediaWikiUIEverywhere || $this->mParent instanceof VFormHTMLForm ) {
$chkLabel = Html::rawElement(
function getLabel() {
if ( $this->mParent instanceof OOUIHTMLForm ) {
return $this->mLabel;
+ } elseif (
+ $this->mParent instanceof HTMLForm &&
+ $this->mParent->getDisplayFormat() === 'div'
+ ) {
+ return '';
} else {
return ' ';
}