Skip to content

Commit 8fb42ef

Browse files
committed
nuke tabindex
1 parent 0029430 commit 8fb42ef

9 files changed

+59
-76
lines changed

Themes/default/Calendar.template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,12 +825,12 @@ function template_calendar_top($calendar_data)
825825

826826
echo '
827827
<form action="', Config::$scripturl, '?action=calendar;', Utils::$context['calendar_view'], '" id="', !empty($calendar_data['end_date']) ? 'calendar_range' : 'calendar_navigation', '" method="post" accept-charset="UTF-8">
828-
<input type="date" name="start_date" id="start_date" value="', $calendar_data['iso_start_date'], '" tabindex="', Utils::$context['tabindex']++, '" class="date_input start" data-type="date">';
828+
<input type="date" name="start_date" id="start_date" value="', $calendar_data['iso_start_date'], '" class="date_input start" data-type="date">';
829829

830830
if (!empty($calendar_data['end_date']))
831831
echo '
832832
<span>', Utils::strtolower(Lang::getTxt('to', file: 'General')), '</span>
833-
<input type="date" name="end_date" id="end_date" value="', $calendar_data['iso_end_date'], '" tabindex="', Utils::$context['tabindex']++, '" class="date_input end" data-type="date">';
833+
<input type="date" name="end_date" id="end_date" value="', $calendar_data['iso_end_date'], '" class="date_input end" data-type="date">';
834834

835835
echo '
836836
<input type="submit" class="button" style="float:none" id="view_button" value="', Lang::getTxt('view', file: 'General'), '">

Themes/default/Display.template.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -335,19 +335,19 @@ function template_main()
335335
sTemplateBodyEdit: ', Utils::escapeJavaScript('
336336
<div id="quick_edit_body_container">
337337
<div id="error_box" class="error"></div>
338-
<textarea class="editor" name="message" rows="12" tabindex="' . Utils::$context['tabindex']++ . '">%body%</textarea><br>
338+
<textarea class="editor" name="message" rows="12">%body%</textarea><br>
339339
<input type="hidden" name="' . Utils::$context['session_var'] . '" value="' . Utils::$context['session_id'] . '">
340340
<input type="hidden" name="topic" value="' . Utils::$context['current_topic'] . '">
341341
<input type="hidden" name="msg" value="%msg_id%">
342342
<div class="righttext quickModifyMargin">
343-
<input type="submit" name="post" value="' . Lang::getTxt('save', file: 'General') . '" tabindex="' . Utils::$context['tabindex']++ . '" onclick="return oQuickModify.modifySave(\'' . Utils::$context['session_id'] . '\', \'' . Utils::$context['session_var'] . '\');" accesskey="s" class="button">' . (Utils::$context['show_spellchecking'] ? ' <input type="button" value="' . Lang::getTxt('spell_check', file: 'General') . '" tabindex="' . Utils::$context['tabindex']++ . '" onclick="spellCheck(\'quickModForm\', \'message\');" class="button">' : '') . ' <input type="submit" name="cancel" value="' . Lang::getTxt('modify_cancel', file: 'General') . '" tabindex="' . Utils::$context['tabindex']++ . '" onclick="return oQuickModify.modifyCancel();" class="button">
343+
<input type="submit" name="post" value="' . Lang::$txt['save'] . '" onclick="return oQuickModify.modifySave(\'' . Utils::$context['session_id'] . '\', \'' . Utils::$context['session_var'] . '\');" class="button">' . (Utils::$context['show_spellchecking'] ? ' <input type="button" value="' . Lang::$txt['spell_check'] . '" onclick="spellCheck(\'quickModForm\', \'message\');" class="button">' : '') . ' <input type="submit" name="cancel" value="' . Lang::$txt['modify_cancel'] . '" onclick="return oQuickModify.modifyCancel();" class="button">
344344
</div>
345345
</div>'), ',
346-
sTemplateSubjectEdit: ', Utils::escapeJavaScript('<input type="text" name="subject" value="%subject%" size="80" maxlength="80" tabindex="' . Utils::$context['tabindex']++ . '">'), ',
346+
sTemplateSubjectEdit: ', Utils::escapeJavaScript('<input type="text" name="subject" value="%subject%" size="80" maxlength="80">'), ',
347347
sTemplateBodyNormal: ', Utils::escapeJavaScript('%body%'), ',
348348
sTemplateSubjectNormal: ', Utils::escapeJavaScript('<a href="' . Config::$scripturl . '?topic=' . Utils::$context['current_topic'] . '.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%</a>'), ',
349349
sTemplateTopSubject: ', Utils::escapeJavaScript('%subject%'), ',
350-
sTemplateReasonEdit: ', Utils::escapeJavaScript(Lang::getTxt('reason_for_edit', file: 'General') . ': <input type="text" name="modify_reason" value="%modify_reason%" size="80" maxlength="80" tabindex="' . Utils::$context['tabindex']++ . '" class="quickModifyMargin">'), ',
350+
sTemplateReasonEdit: ', Utils::escapeJavaScript(Lang::$txt['reason_for_edit'] . ': <input type="text" name="modify_reason" value="%modify_reason%" size="80" maxlength="80" class="quickModifyMargin">'), ',
351351
sTemplateReasonNormal: ', Utils::escapeJavaScript('%modify_text'), ',
352352
sErrorBorderStyle: ', Utils::escapeJavaScript('1px solid red'), (Utils::$context['can_reply']) ? ',
353353
sFormRemoveAccessKeys: \'postmodify\'' : '', '
@@ -938,7 +938,7 @@ function template_quickreply()
938938
', Lang::getTxt('name', file: 'General'), '
939939
</dt>
940940
<dd>
941-
<input type="text" name="guestname" size="25" value="', Utils::$context['name'], '" tabindex="', Utils::$context['tabindex']++, '" required>
941+
<input type="text" name="guestname" size="25" value="', Utils::$context['name'], '" required>
942942
</dd>';
943943

944944
if (empty(Config::$modSettings['guest_post_no_email']))
@@ -948,7 +948,7 @@ function template_quickreply()
948948
', Lang::getTxt('email', file: 'General'), '
949949
</dt>
950950
<dd>
951-
<input type="email" name="email" size="25" value="', Utils::$context['email'], '" tabindex="', Utils::$context['tabindex']++, '" required>
951+
<input type="email" name="email" size="25" value="', Utils::$context['email'], '" required>
952952
</dd>';
953953
}
954954

Themes/default/GenericControls.template.php

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function template_control_richedit($editor_id, $smileyContainer = null, $bbcCont
3535
$editor_context['sce_options']['toolbar'] = '';
3636

3737
echo '
38-
<textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" cols="600" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', Utils::$context['tabindex']++, '" style="width: ', $editor_context['width'], '; height: ', $editor_context['height'], ';', isset(Utils::$context['post_error']['no_message']) || isset(Utils::$context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '"', !empty(Utils::$context['editor']['required']) ? ' required' : '', '>', $editor_context['value'], '</textarea>
38+
<textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" cols="600" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" style="width: ', $editor_context['width'], '; height: ', $editor_context['height'], ';', isset(Utils::$context['post_error']['no_message']) || isset(Utils::$context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '"', !empty(Utils::$context['editor']['required']) ? ' required' : '', '>', $editor_context['value'], '</textarea>
3939
<div id="', $editor_id, '_resizer" class="richedit_resize"></div>
4040
<input type="hidden" name="', $editor_id, '_mode" id="', $editor_id, '_mode" value="0">
4141
<script>
@@ -90,23 +90,7 @@ function template_control_richedit_buttons($editor_id)
9090
</span>
9191
<span class="post_button_container">';
9292

93-
$tempTab = Utils::$context['tabindex'];
94-
95-
if (!empty(Utils::$context['drafts_save']))
96-
$tempTab++;
97-
elseif ($editor_context['preview_type'])
98-
$tempTab++;
99-
elseif (Utils::$context['show_spellchecking'])
100-
$tempTab++;
101-
102-
$tempTab++;
103-
Utils::$context['tabindex'] = $tempTab;
104-
10593
foreach (Utils::$context['richedit_buttons'] as $name => $button) {
106-
if ($name == 'spell_check') {
107-
$button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();';
108-
}
109-
11094
if ($name == 'preview') {
11195
$button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value'];
11296
$button['onclick'] = $editor_context['preview_type'] == Editor::PREVIEW_XML ? '' : 'return submitThisOnce(this);';
@@ -115,12 +99,12 @@ function template_control_richedit_buttons($editor_id)
11599

116100
if ($button['show']) {
117101
echo '
118-
<input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', $button['type'] != 'hidden' ? ' tabindex="' . --$tempTab . '"' : '', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>';
102+
<input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>';
119103
}
120104
}
121105

122106
echo '
123-
<input type="submit" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : Lang::getTxt('post', file: 'General'), '" name="post" tabindex="', --$tempTab, '" onclick="return submitThisOnce(this);" accesskey="s" class="button">
107+
<input type="submit" value="', isset($editor_context['labels']['post_button']) ? $editor_context['labels']['post_button'] : Lang::getTxt('post', file: 'General'), '" name="post" onclick="return submitThisOnce(this);" accesskey="s" class="button">
124108
</span>';
125109

126110
// Start an instance of the auto saver if it's enabled
@@ -206,7 +190,7 @@ function template_control_verification($verify_id, $display_type = 'all', $reset
206190
<div class="smalltext" style="margin: 4px 0 8px 0;">
207191
<a href="', $verify_context->image_href, ';sound" id="visual_verification_', $verify_id, '_sound" rel="nofollow">', Lang::getTxt('visual_verification_sound', file: 'General'), '</a> / <a href="#visual_verification_', $verify_id, '_refresh" id="visual_verification_', $verify_id, '_refresh">', Lang::getTxt('visual_verification_request_new', file: 'General'), '</a>', $display_type != 'quick_reply' ? '<br>' : '', '<br>
208192
', Lang::getTxt('visual_verification_description', file: 'General'), $display_type != 'quick_reply' ? '<br>' : '', '
209-
<input type="text" name="', $verify_id, '_vv[code]" value="" size="30" tabindex="', Utils::$context['tabindex']++, '" autocomplete="off" required>
193+
<input type="text" name="', $verify_id, '_vv[code]" value="" size="30" autocomplete="off" required>
210194
</div>';
211195
}
212196

@@ -228,7 +212,7 @@ function template_control_verification($verify_id, $display_type = 'all', $reset
228212
echo '
229213
<div class="smalltext">
230214
', $verify_context->questions[$qIndex]['q'], ':<br>
231-
<input type="text" name="', $verify_id, '_vv[q][', $verify_context->questions[$qIndex]['id'], ']" size="30" value="', $verify_context->questions[$qIndex]['a'], '" ', $verify_context->questions[$qIndex]['is_error'] ? 'style="border: 1px red solid;"' : '', ' tabindex="', Utils::$context['tabindex']++, '" required>
215+
<input type="text" name="', $verify_id, '_vv[q][', $verify_context->questions[$qIndex]['id'], ']" size="30" value="', $verify_context->questions[$qIndex]['a'], '" ', $verify_context->questions[$qIndex]['is_error'] ? 'style="border: 1px red solid;"' : '', ' required>
232216
</div>';
233217
}
234218

Themes/default/ManageBoards.template.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function template_modify_category()
146146
<span class="smalltext">', Lang::getTxt('name_on_display', file: 'ManageBoards'), '</span>
147147
</dt>
148148
<dd>
149-
<input type="text" name="cat_name" value="', Utils::$context['category']['editable_name'], '" size="30" tabindex="', Utils::$context['tabindex']++, '">
149+
<input type="text" name="cat_name" value="', Utils::$context['category']['editable_name'], '" size="30">
150150
</dd>
151151
<dt>
152152
<strong>', Lang::getTxt('mboards_description', file: 'ManageBoards'), '</strong><br>
@@ -160,7 +160,7 @@ function template_modify_category()
160160
<span class="smalltext">', Lang::getTxt('collapse_desc', file: 'ManageBoards'), '</span>
161161
</dt>
162162
<dd>
163-
<input type="checkbox" name="collapse"', Utils::$context['category']['can_collapse'] ? ' checked' : '', ' tabindex="', Utils::$context['tabindex']++, '">
163+
<input type="checkbox" name="collapse"', Utils::$context['category']['can_collapse'] ? ' checked' : '', '>
164164
</dd>';
165165

166166
// Show any category settings added by mods using the 'integrate_edit_category' hook.
@@ -185,10 +185,10 @@ function template_modify_category()
185185

186186
if (isset(Utils::$context['category']['is_new']))
187187
echo '
188-
<input type="submit" name="add" value="', Lang::getTxt('mboards_add_cat_button', file: 'ManageBoards'), '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', Utils::$context['tabindex']++, '" class="button">';
188+
<input type="submit" name="add" value="', Lang::getTxt('mboards_add_cat_button', file: 'ManageBoards'), '" onclick="return !isEmptyText(this.form.cat_name);" class="button">';
189189
else
190190
echo '
191-
<input type="submit" name="edit" value="', Lang::getTxt('modify', file: 'General'), '" onclick="return !isEmptyText(this.form.cat_name);" tabindex="', Utils::$context['tabindex']++, '" class="button">
191+
<input type="submit" name="edit" value="', Lang::getTxt('modify', file: 'General'), '" onclick="return !isEmptyText(this.form.cat_name);" class="button">
192192
<input type="submit" name="delete" value="', Lang::getTxt('mboards_delete_cat', file: 'ManageBoards'), '" data-confirm="', Lang::getTxt('cat_delete_confirm', file: 'ManageBoards'), '" class="button you_sure">';
193193
echo '
194194
<input type="hidden" name="', Utils::$context['session_var'], '" value="', Utils::$context['session_id'], '">

Themes/default/ManageMail.template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ function template_mailtest()
6767
<div class="windowbg">
6868
<dl id="post_header">
6969
<dt><span id="caption_subject">', Lang::getTxt('subject', file: 'General'), '</span></dt>
70-
<dd><input type="text" name="subject" tabindex="1" size="80" maxlength="80"></dd>
70+
<dd><input type="text" name="subject" size="80" maxlength="80"></dd>
7171
</dl>
72-
<textarea class="editor" name="message" rows="5" cols="200" tabindex="2"></textarea>
72+
<textarea class="editor" name="message" rows="5" cols="200"></textarea>
7373
<dl id="post_footer">
7474
<dd><input type="submit" value="', Lang::getTxt('send_message', file: 'General'), '" class="button"></dd>
7575
</dl>

Themes/default/ManageNews.template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function template_email_members_compose()
216216
<label', (isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : ''), ' for="subject" id="caption_subject">', Lang::getTxt('subject', file: 'General'), '</label>
217217
</dt>
218218
<dd id="pm_subject">
219-
<input type="text" id="subject" name="subject" value="', Utils::$context['subject'], '" tabindex="', Utils::$context['tabindex']++, '" size="80" maxlength="84"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
219+
<input type="text" id="subject" name="subject" value="', Utils::$context['subject'], '" size="80" maxlength="84"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
220220
</dd>
221221
</dl>
222222
<div id="bbcBox_message"></div>';

Themes/default/PersonalMessage.template.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ function template_send()
10271027
// Autosuggest will be added by the JavaScript later on.
10281028
echo '
10291029
<dd id="pm_to" class="clear_right">
1030-
<input type="text" name="to" id="to_control" value="', Utils::$context['to_value'], '" tabindex="', Utils::$context['tabindex']++, '" size="20">';
1030+
<input type="text" name="to" id="to_control" value="', Utils::$context['to_value'], '" size="20">';
10311031

10321032
// A link to add BCC, only visible with JavaScript enabled.
10331033
echo '
@@ -1046,7 +1046,7 @@ function template_send()
10461046
<span', (isset(Utils::$context['post_error']['no_to']) || isset(Utils::$context['post_error']['bad_bcc']) ? ' class="error"' : ''), ' id="caption_bbc">', trim(Lang::getTxt('pm_bcc', ['list' => ''], file: 'PersonalMessage')), '</span>
10471047
</dt>
10481048
<dd id="bcc_div2">
1049-
<input type="text" name="bcc" id="bcc_control" value="', Utils::$context['bcc_value'], '" tabindex="', Utils::$context['tabindex']++, '" size="20">
1049+
<input type="text" name="bcc" id="bcc_control" value="', Utils::$context['bcc_value'], '" size="20">
10501050
<div id="bcc_item_list_container"></div>
10511051
</dd>';
10521052

@@ -1056,7 +1056,7 @@ function template_send()
10561056
<span', (isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : ''), ' id="caption_subject">', Lang::getTxt('subject', file: 'General'), '</span>
10571057
</dt>
10581058
<dd id="pm_subject">
1059-
<input type="text" name="subject" value="', Utils::$context['subject'], '" tabindex="', Utils::$context['tabindex']++, '" size="80" maxlength="80"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
1059+
<input type="text" name="subject" value="', Utils::$context['subject'], '" size="80" maxlength="80"', isset(Utils::$context['post_error']['no_subject']) ? ' class="error"' : '', '>
10601060
</dd>
10611061
</dl>';
10621062

Themes/default/Post.template.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function template_main()
4545
// If this is a poll - use some javascript to ensure the user doesn't create a poll with illegal option combinations.
4646
if (Utils::$context['make_poll'])
4747
echo '
48-
var pollOptionNum = 0, pollTabIndex;
48+
var pollOptionNum = 0;
4949
var pollOptionId = ', Utils::$context['last_choice_id'], ';
5050
function addPollOption()
5151
{
@@ -55,7 +55,6 @@ function addPollOption()
5555
if (document.forms.postmodify.elements[i].id.substr(0, 8) == \'options-\')
5656
{
5757
pollOptionNum++;
58-
pollTabIndex = document.forms.postmodify.elements[i].tabIndex;
5958
}
6059
}
6160
pollOptionNum++
@@ -167,7 +166,7 @@ function addPollOption()
167166
<dl class="settings poll_options">
168167
<dt>', Lang::getTxt('poll_question', file: 'General'), '</dt>
169168
<dd>
170-
<input type="text" name="question" value="', isset(Utils::$context['question']) ? Utils::$context['question'] : '', '" tabindex="', Utils::$context['tabindex']++, '" size="80">
169+
<input type="text" name="question" value="', isset(Utils::$context['question']) ? Utils::$context['question'] : '', '" size="80">
171170
</dd>';
172171

173172
// Loop through all the choices and print them out.
@@ -177,7 +176,7 @@ function addPollOption()
177176
<label for="options-', $choice['id'], '">', Lang::getTxt('option_number', [$choice['number']], file: 'Post'), '</label>
178177
</dt>
179178
<dd>
180-
<input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" tabindex="', Utils::$context['tabindex']++, '" size="80" maxlength="255">
179+
<input type="text" name="options[', $choice['id'], ']" id="options-', $choice['id'], '" value="', $choice['label'], '" size="80" maxlength="255">
181180
</dd>';
182181

183182
echo '
@@ -976,7 +975,7 @@ function template_post_header()
976975
}
977976
}
978977

979-
echo ' tabindex="', Utils::$context['tabindex']++, '">';
978+
echo '>';
980979
}
981980
// textarea
982981
elseif ($pf['input']['type'] === 'textarea')
@@ -1003,7 +1002,7 @@ function template_post_header()
10031002
}
10041003
}
10051004

1006-
echo ' tabindex="', Utils::$context['tabindex']++, '">', !empty($pf['input']['attributes']['value']) ? $pf['input']['attributes']['value'] : '', '</textarea>';
1005+
echo '>', !empty($pf['input']['attributes']['value']) ? $pf['input']['attributes']['value'] : '', '</textarea>';
10071006
}
10081007
// Select menus are more complicated
10091008
elseif ($pf['input']['type'] === 'select' && is_array($pf['input']['options']))
@@ -1029,7 +1028,7 @@ function template_post_header()
10291028
}
10301029
}
10311030

1032-
echo ' tabindex="', Utils::$context['tabindex']++, '">';
1031+
echo '>';
10331032

10341033
// The options
10351034
foreach ($pf['input']['options'] as $optlabel => $option)
@@ -1136,7 +1135,7 @@ function template_post_header()
11361135
echo ' ', $attribute, '="', $value, '"';
11371136
}
11381137

1139-
echo ' tabindex="', Utils::$context['tabindex']++, '"> ', isset($option['label']) ? $option['label'] : $optlabel, '</label>';
1138+
echo '> ', isset($option['label']) ? $option['label'] : $optlabel, '</label>';
11401139
}
11411140

11421141
echo '

0 commit comments

Comments
 (0)