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