}
/**
- * Returns the attributes required for the tooltip and accesskey.
+ * Returns the attributes required for the tooltip and accesskey, for Html::element() etc.
*
* @return array Attributes
*/
return Linker::tooltipAndAccesskeyAttribs( $this->mParams['tooltip'] );
}
+ /**
+ * Returns the attributes required for the tooltip and accesskey, for OOUI widgets' config.
+ *
+ * @return array Attributes
+ */
+ public function getTooltipAndAccessKeyOOUI() {
+ if ( empty( $this->mParams['tooltip'] ) ) {
+ return [];
+ }
+
+ return [
+ 'title' => Linker::titleAttrib( $this->mParams['tooltip'] ),
+ 'accessKey' => Linker::accesskey( $this->mParams['tooltip'] ),
+ ];
+ }
+
/**
* Returns the given attributes from the parameters
*