'value' => $value,
'dir' => $this->mDir,
'spellcheck' => $this->getSpellCheck(),
- ] + $this->getTooltipAndAccessKey();
+ ] + $this->getTooltipAndAccessKey() + $this->getDataAttribs();
if ( $this->mClass !== '' ) {
$attribs['class'] = $this->mClass;
protected function getInputWidget( $params ) {
return new OOUI\TextInputWidget( $params );
}
+
+ /**
+ * Returns an array of data-* attributes to add to the field.
+ *
+ * @return array
+ */
+ protected function getDataAttribs() {
+ return [];
+ }
}