Index: includes/HTMLForm.php
===================================================================
--- includes/HTMLForm.php (revision 65338)
+++ includes/HTMLForm.php (working copy)
@@ -914,6 +914,10 @@
$attribs['disabled'] = 'disabled';
}
+ if ( isset( $this->mParams['tabindex'] ) ) {
+ $attribs['tabindex'] = $this->mParams['tabindex'];
+ }
+
# TODO: Enforce pattern, step, required, readonly on the server side as
# well
foreach ( array( 'min', 'max', 'pattern', 'title', 'step',
@@ -987,6 +991,9 @@
) + $this->getTooltipAndAccessKey();
+ if ( isset( $this->mParams['tabindex'] ) ) {
+ $attribs['tabindex'] = $this->mParams['tabindex'];
+ }
if ( !empty( $this->mParams['disabled'] ) ) {
$attribs['disabled'] = 'disabled';
}
@@ -1086,6 +1093,9 @@
if( !empty( $this->mParams['disabled'] ) ) {
$attr['disabled'] = 'disabled';
}
+ if ( isset( $this->mParams['tabindex'] ) ) {
+ $attr['tabindex'] = $this->mParams['tabindex'];
+ }
return Xml::check( $this->mName, $value, $attr ) . ' ' .
Html::rawElement( 'label', array( 'for' => $this->mID ), $this->mLabel );
@@ -1147,6 +1157,9 @@
if( !empty( $this->mParams['disabled'] ) ) {
$select->setAttribute( 'disabled', 'disabled' );
}
+ if ( isset( $this->mParams['tabindex'] ) ) {
+ $select->setAttribute( 'tabindex', $this->mParams['tabindex'] );
+ }
$select->addOptions( $options );
Index: includes/specials/SpecialUpload.php
===================================================================
--- includes/specials/SpecialUpload.php (revision 65338)
+++ includes/specials/SpecialUpload.php (working copy)
@@ -702,6 +702,7 @@
protected $mSessionKey;
protected $mHideIgnoreWarning;
protected $mDestWarningAck;
+ protected $mTabIndex;
protected $mTextTop;
protected $mTextAfterSummary;
@@ -715,6 +716,7 @@
? $options['sessionkey'] : '';
$this->mHideIgnoreWarning = !empty( $options['hideignorewarning'] );
$this->mDestWarningAck = !empty( $options['destwarningack'] );
+ $this->mTabIndex = 1;
$this->mTextTop = $options['texttop'];
$this->mTextAfterSummary = $options['textaftersummary'];
@@ -799,6 +801,7 @@
)
) . ' ' . wfMsgHtml( 'upload_source_file' ),
'checked' => $selectedSourceType == 'file',
+ 'tabindex' => $this->mTabIndex++,
);
if ( $canUploadByUrl ) {
$descriptor['UploadFileURL'] = array(
@@ -813,6 +816,7 @@
$wgLang->formatSize( $wgMaxUploadSize )
) . ' ' . wfMsgHtml( 'upload_source_url' ),
'checked' => $selectedSourceType == 'url',
+ 'tabindex' => $this->mTabIndex++,
);
}
wfRunHooks( 'UploadFormSourceDescriptors', array( &$descriptor, &$radio, $selectedSourceType ) );
@@ -883,6 +887,7 @@
'id' => 'wpDestFile',
'label-message' => 'destfilename',
'size' => 60,
+ 'tabindex' => $this->mTabIndex++,
),
'UploadDescription' => array(
'type' => 'textarea',
@@ -893,6 +898,7 @@
: 'fileuploadsummary',
'cols' => $cols,
'rows' => 8,
+ 'tabindex' => $this->mTabIndex++,
)
);
if ( $this->mTextAfterSummary ) {
@@ -908,17 +914,20 @@
'EditTools' => array(
'type' => 'edittools',
'section' => 'description',
- ),
- 'License' => array(
+ )
+ );
+
+ if ( $this->mForReUpload ) {
+ $descriptor['DestFile']['readonly'] = true;
+ } else {
+ $descriptor['License'] = array(
'type' => 'select',
'class' => 'Licenses',
'section' => 'description',
'id' => 'wpLicense',
'label-message' => 'license',
- ),
- );
- if ( $this->mForReUpload ) {
- $descriptor['DestFile']['readonly'] = true;
+ 'tabindex' => $this->mTabIndex++,
+ );
}
global $wgUseCopyrightUpload;
@@ -957,6 +966,7 @@
'label-message' => 'watchthisupload',
'section' => 'options',
'default' => $wgUser->getOption( 'watchcreations' ),
+ 'tabindex' => $this->mTabIndex++,
)
);
}
@@ -966,6 +976,7 @@
'id' => 'wpIgnoreWarning',
'label-message' => 'ignorewarnings',
'section' => 'options',
+ 'tabindex' => $this->mTabIndex++,
);
}