}
if ( isset( $this->mSubmitTooltip ) ) {
- $attribs += Linker::tooltipAndAccesskeyAttribs( $this->mSubmitTooltip );
+ $attribs += [
+ 'title' => Linker::titleAttrib( $this->mSubmitTooltip ),
+ 'accessKey' => Linker::accesskey( $this->mSubmitTooltip ),
+ ];
}
$attribs['classes'] = [ 'mw-htmlform-submit' ];
'items' => $fieldsHtml,
];
if ( $sectionName ) {
- $config['id'] = Sanitizer::escapeId( $sectionName );
+ $config['id'] = Sanitizer::escapeIdForAttribute( $sectionName );
}
if ( is_string( $this->mWrapperLegend ) ) {
$config['label'] = $this->mWrapperLegend;
* @return string
*/
public function getErrorsOrWarnings( $elements, $elementsType ) {
+ if ( $elements === '' ) {
+ return '';
+ }
+
if ( !in_array( $elementsType, [ 'error', 'warning' ], true ) ) {
throw new DomainException( $elementsType . ' is not a valid type.' );
}