Merge "Do not require titles on Special:ComparePages"
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLCheckMatrix.php
index fa18a3c..d885c9d 100644 (file)
@@ -106,6 +106,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
                                $tooltipAttribs = [
                                        'class' => "mw-htmlform-tooltip $tooltipClass",
                                        'title' => $this->mParams['tooltips'][$rowLabel],
+                                       'aria-label' => $this->mParams['tooltips'][$rowLabel]
                                ];
                                $rowLabel .= ' ' . Html::element( 'span', $tooltipAttribs, '' );
                        }
@@ -121,9 +122,11 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
                                if ( $this->isTagForcedOff( $thisTag ) ) {
                                        $checked = false;
                                        $thisAttribs['disabled'] = 1;
+                                       $thisAttribs['class'] = 'checkmatrix-forced checkmatrix-forced-off';
                                } elseif ( $this->isTagForcedOn( $thisTag ) ) {
                                        $checked = true;
                                        $thisAttribs['disabled'] = 1;
+                                       $thisAttribs['class'] = 'checkmatrix-forced checkmatrix-forced-on';
                                }
 
                                $checkbox = $this->getOneCheckbox( $checked, $attribs + $thisAttribs );
@@ -236,11 +239,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
        }
 
        public function getDefault() {
-               if ( isset( $this->mDefault ) ) {
-                       return $this->mDefault;
-               } else {
-                       return [];
-               }
+               return $this->mDefault ?? [];
        }
 
        public function filterDataForSubmit( $data ) {