Commit 794419ca authored by wurblzap%gmail.com's avatar wurblzap%gmail.com

Bug 281691: Misused <label>'s cause screen reader problems.

Patch by Marc Schumann <wurblzap@gmail.com>, r=LpSolit, a=justdave
parent 6ec3903c
......@@ -130,7 +130,8 @@
<input type="checkbox" name="isprivate-[% count %]" value="1"
onClick="updateCommentPrivacy(this, [% count %])"
id="isprivate-[% count %]"
[% " checked=\"checked\"" IF comment.isprivate %]> Private
[% " checked=\"checked\"" IF comment.isprivate %]>
<label for="isprivate-[% count %]">Private</label>
</i>
[% END %]
[% IF UserInGroup(Param('timetrackinggroup')) &&
......
......@@ -258,8 +258,8 @@
<table>
<tr>
<td align="right">
<b>Period <label accesskey="s"
for="start_date"><u>s</u>tarting</label></b>:
<b><label accesskey="s"
for="start_date">Period <u>s</u>tarting</label></b>:
</td><td colspan="3">
<input type="text" id="start_date" name="start_date" size="11"
align="right" value="[% start_date FILTER html %]" maxlength="10">
......@@ -286,26 +286,24 @@
%]><label
for="owner" accesskey="d"><u>D</u>eveloper</label>
</td><td colspan="2">
<b>Format</b>: <select name="ctype">
<label for="ctype"><b>Format</b></label>: <select name="ctype" id="ctype">
<option value="html">HTML Report</option>
</select>
</td></tr><tr>
<td>&nbsp;</td><td colspan="4">
<label for="monthly" accesskey="m">
<input type="checkbox" name="monthly" [% 'checked="checked"' IF
monthly %] id="monthly">
Split by <u>m</u>onth</label>
<label for="monthly" accesskey="m">Split by <u>m</u>onth</label>
[%# XXX: allow splitting by other intervals %]
&nbsp;
<label for="detailed" accesskey="t">
<input type="checkbox" name="detailed" [% 'checked="checked"' IF
detailed %] id="detailed">
De<u>t</u>ailed summaries</label>
<label for="detailed" accesskey="t">De<u>t</u>ailed summaries</label>
&nbsp;
<label for="inactive" accesskey="i">
<input type="checkbox" name="inactive" [% 'checked="checked"' IF
inactive %] id="inactive">
Also show <u>i</u>nactive [% terms.bugs %]</label>
<label for="inactive" accesskey="i">Also show <u>i</u>nactive
[%+ terms.bugs %]</label>
</td>
</tr></table>
......
......@@ -79,7 +79,6 @@
'field.description',
'field.accesskey',
'sel.name',
'sel.accesskey',
],
'search/search-specific.html.tmpl' => [
......@@ -169,7 +168,6 @@
'reports/series-common.html.tmpl' => [
'sel.name',
'sel.accesskey',
'"onchange=\"$sel.onchange\"" IF sel.onchange',
],
......@@ -325,11 +323,11 @@
'group.description',
'dep.title',
'dep.fieldname',
'accesskey',
'bug.${dep.fieldname}.join(\', \')',
'selname',
'depbug FILTER bug_link(depbug)',
'"${bug.dup_id}" FILTER bug_link(bug.dup_id)',
'" accesskey=\"$accesskey\"" IF accesskey',
],
'bug/knob.html.tmpl' => [
......
......@@ -98,8 +98,9 @@
[% flag.setter.nick FILTER html %]:
</td>
<td>
<label title="[% type.description FILTER html %]">
[%- type.name FILTER html FILTER no_break %]</label>
<label title="[% type.description FILTER html %]"
for="flag-[% flag.id %]">
[%- type.name FILTER html FILTER no_break -%]</label>
</td>
<td>
<select id="flag-[% flag.id %]" name="flag-[% flag.id %]"
......@@ -140,7 +141,8 @@
<tr>
<td>&nbsp;</td>
<td>
<label title="[% type.description FILTER html %]">
<label title="[% type.description FILTER html %]"
for="flag_type-[% type.id %]">
[%- type.name FILTER html FILTER no_break %]</label>
</td>
<td>
......@@ -179,7 +181,8 @@
[% END %]
<tr>
<td colspan="2">
addl. <label title="[% type.description FILTER html %]">
addl. <label title="[% type.description FILTER html %]"
for="flag_type-[% type.id %]">
[%- type.name FILTER html FILTER no_break %]</label>
</td>
<td>
......
......@@ -70,11 +70,11 @@ function subcatSelected() {
</tr>
[% ELSE %]
<tr>
<th>Category:</th>
<th><label for="category">Category</label>:</th>
<th></th>
<th>Sub-category:</th>
<th><label for="subcategory">Sub-category</label>:</th>
<th></th>
<th>Name:</th>
<th><label for="name" accesskey="N">Name</label>:</th>
<th><br>
</th>
</tr>
......@@ -102,19 +102,17 @@ function subcatSelected() {
</td>
<td align="left">
<label for="name" accesskey="N">
<select name="name" id="name" style="width: 15em"
size="5" multiple="multiple"
[%+ "disabled=\"disabled\"" UNLESS name.keys.size %]>
[% FOREACH x = name.keys.sort %]
<option value="[% name.$x FILTER html %]">
[% x FILTER html %]</option>
[% END %]
[% UNLESS name.keys.size %]
<option value="" disabled="disabled"></option>
[% END %]
</select>
</label>
<select name="name" id="name" style="width: 15em"
size="5" multiple="multiple"
[%+ "disabled=\"disabled\"" UNLESS name.keys.size %]>
[% FOREACH x = name.keys.sort %]
<option value="[% name.$x FILTER html %]">
[% x FILTER html %]</option>
[% END %]
[% UNLESS name.keys.size %]
<option value="" disabled="disabled"></option>
[% END %]
</select>
</td>
<td align="center" valign="middle">
......@@ -233,18 +231,18 @@ function subcatSelected() {
</td>
<td style="text-align: right; vertical-align: bottom;">
<b>Cumulate:</b>
<input type="checkbox" name="cumulate" value="1"
<label for="cumulate"><b>Cumulate</b></label>:
<input type="checkbox" name="cumulate" id="cumulate" value="1"
[% " checked" IF chart.cumulate %]>
</td>
<td></td>
<td valign="bottom">
<b>Date Range:</b>
<input type="text" size="12" name="datefrom"
<td valign="bottom">
<label for="datefrom"><b>Date Range</b></label>:
<input type="text" size="12" name="datefrom" id="datefrom"
value="[% time2str("%Y-%m-%d", chart.datefrom) IF chart.datefrom%]">
<b>to</b>
<input type="text" size="12" name="dateto"
<label for="dateto"><b>to</b></label>
<input type="text" size="12" name="dateto" id="dateto"
value="[% time2str("%Y-%m-%d", chart.dateto) IF chart.dateto %]">
</td>
......
......@@ -99,22 +99,20 @@ function checkNewState() {
[% BLOCK series_select %]
<td align="left">
<label for="[% sel.name %]" accesskey="[% sel.accesskey %]">
<select name="[% sel.name %]" id="[% sel.name %]"
size="[% sel.size %]" style="width: 15em"
[%+ "disabled=\"disabled\"" UNLESS ${sel.name}.keys.size || newtext %]
[%+ "onchange=\"$sel.onchange\"" IF sel.onchange %]>
[% FOREACH x = ${sel.name}.keys.sort %]
<option value="[% x FILTER html %]"
[% " selected" IF default.${sel.name} == x %]>
[% x FILTER html %]</option>
[% END %]
[% IF newtext %]
<option value="">[% newtext FILTER html %]</option>
[% ELSIF NOT ${sel.name}.keys.size %]
<option value="" disabled="disabled"></option>
[% END %]
</select>
</label>
<select name="[% sel.name %]" id="[% sel.name %]"
size="[% sel.size %]" style="width: 15em"
[%+ "disabled=\"disabled\"" UNLESS ${sel.name}.keys.size || newtext %]
[%+ "onchange=\"$sel.onchange\"" IF sel.onchange %]>
[% FOREACH x = ${sel.name}.keys.sort %]
<option value="[% x FILTER html %]"
[% " selected" IF default.${sel.name} == x %]>
[% x FILTER html %]</option>
[% END %]
[% IF newtext %]
<option value="">[% newtext FILTER html %]</option>
[% ELSIF NOT ${sel.name}.keys.size %]
<option value="" disabled="disabled"></option>
[% END %]
</select>
</td>
[% END %]
......@@ -43,8 +43,8 @@
<input type="hidden" name="cmdtype" value="doit">
<p>
Sort results by:
<select name="order">
<label for="order">Sort results by</label>:
<select name="order" id="order">
[% FOREACH order = orders %]
<option value="[% order FILTER html %]"
[% " selected" IF default.order.0 == order %]>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment