Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362372 - [Accessibility] Label 'For' attribute does not reference an appropriate form control and violates w3c checklist
Summary: [Accessibility] Label 'For' attribute does not reference an appropriate form ...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2011-10-28 16:52 EDT by Neal Timpe CLA
Modified: 2019-09-28 02:07 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neal Timpe CLA 2011-10-28 16:52:50 EDT
Build Identifier: 3.1 and 3.6

The for="index" is flagged as a violation in the following code sample. It violates the W3c checklist for 1.3a, 1.3d, 4.1a.

</frame>
<frame frameborder="0" marginheight="0" marginwidth="10" src="indexView.jsp?view=index&topic=/com.ibm.lotuslive.events.doc/ll_events_overview.html" title="indexView" name="indexViewFrame">
<html>
<head>
</head>
<body onunload="onunloadHandler()" onload="onloadHandler()" onresize="resize()" dir="ltr">
<table id="indexTable" name="indexTable">
<tbody>
<tr>
</tr>
<tr>
</tr>
<tr>
<td class="index" colspan="2">
<label style="display: none;" for="index">Select box for index keywords</label>
<div id="indexDiv" style="margin-top: -18px;"></div>

Reproducible: Always

Steps to Reproduce:
Steps to Reproduce:
1. Open an eclipse page
2. Use Firebug to focus on the code in the TOC when the search and print table
pops up.
Comment 2 Neal Timpe CLA 2011-11-11 17:27:51 EST
The code is in a hidden iframe, that I only found while testing it dynamically. 
Here is the entire iframe code. The for="index" tag is at the bottom next to Select box for index keywords.

I don't have enough skill to know what this iframe is for or whether it is part of this eclipse framework or IEHS.


<iframe id="index" class="hidden" frameborder="0" src="view.jsp?view=index&topic=/com.ibm.lotuslive.events.doc/ll_events_overview.html" title="Layout frame: index" name="index" style="visibility: hidden;">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Index</title>
<script language="JavaScript">
1
2
3function onloadHandler(e)
4{
5 var h=window.indexToolbarFrame.document.getElementById("titleText").offsetHeight;
6 if(h<=19){
7 return;
8 }
9 document.getElementById("viewFrameset").setAttribute("rows", (11+h)+",*");
10 window.indexToolbarFrame.document.getElementById("titleTextTableDiv").style.height=(9+h)+"px";
11
12}
</script>
</head>
<frameset id="viewFrameset" border="0" framespacing="0" frameborder="0" rows="24,*" onload="onloadHandler()">
<frame id="toolbar" scrolling="no" noresize="0" frameborder="0" marginheight="0" marginwidth="0" src="indexToolbar.jsp" title="indexViewToolbar" name="indexToolbarFrame">
<html>
<head>
</head>
<body onunload="onunloadHandler()" onload="onloadHandler()" dir="ltr">
<table id="container" height="100%" cellspacing="0" cellpadding="0" border="0" width="100%" style="padding-left: 8px;">
<tbody>
<tr>
<td nowrap="" valign="middle" style="font: icon;">
<div id="titleTextTableDiv" style="overflow: hidden; height: 22px;">
<table>
<tbody>
<tr>
<td nowrap="" style="font: icon;">
<div id="titleText">&nbsp;Index</div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position: absolute; top: 1px; right: 0px;">
<table height="100%" cellspacing="1" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td align="right">
<table height="100%" cellspacing="0" cellpadding="0" border="0" align="right" style="background: none repeat scroll 0% 0% buttonface;">
<tbody>
<tr>
<td id="tdb_synchnav" class="button" height="18" align="middle">
<a id="b0" reg4i00000019="" of="" end="" title="Refresh / Show Current Topic" onmouseout="window.status='';" onmouseover="javascript:setWindowStatus('synchnav');return true;" href="javascript:resynchNav('b0');">
<img id="synchnav" border="0" title="Refresh / Show Current Topic" alt="Refresh / Show Current Topic" src="images/e_synch_nav.gif">
</a>
</td>
<td id="tdb_maximize_restore" class="button" height="18" align="middle">
<a id="b1" reg4i00000019="" of="" end="" title="Maximize" onmouseout="window.status='';" onmouseover="javascript:setWindowStatus('maximize_restore');return true;" href="javascript:restore_maximize('b1');">
<img id="maximize_restore" border="0" title="Maximize" alt="Maximize" src="images/e_maximize.gif">
</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</frame>
<frame frameborder="0" marginheight="0" marginwidth="10" src="indexView.jsp?view=index&topic=/com.ibm.lotuslive.events.doc/ll_events_overview.html" title="indexView" name="indexViewFrame">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache" http-equiv="Pragma">
<meta content="-1" http-equiv="Expires">
<title>Index</title>
<style type="text/css">
1
2
3/* need this one for Mozilla */
4html {
5 width:100%;
6 height:100%;
7 margin:0px;
8 padding:0px;
9 border:0px;
10}
11
12body {
13 width:100%;
14 height:100%;
15 margin:0px;
16 padding:0px;
17 background-color: Window;
18 color:WindowText;
19 font: icon;
20}
21
22table {
23 width: 100%;
24 height: 100%;
25 cell-spacing: 10px;
26 background-color: Window;
27 color:WindowText;
28 font: icon;
29}
30
31td {
32 width: 100%;
33 padding: 4px;
34}
35
36td.editor {
37 height:16px;
38 width:250px;
39}
40
41input.editor {
42 color:black;
43 width:200px;
44 font-size:12px;
45 border: 1px solid ThreeDShadow;;
46 background-color: window;
47}
48
49td.index {
50 height:100%;
51}
52div#indexDiv {
53 width:100%;
54
55 height:90%;
56
57 background-color: window;
58}
59
60select.index {
61 width:100%;
62
63 height:100%;
64
65 color:black;
66 font-family: "sans serif";
67 font-size:10px
68 border: 1px solid;
69 background-color: window;
70}
71
72td.display {
73 height:16px;
74
75 padding-right: 17px;
76
77}
78
79input.display {
80 background:ThreeDShadow;
81 color:Window;
82 font-weight:bold;
83 border: 1px solid ThreeDShadow;
84}
85
</style>
<script language="JavaScript">
1
2var advancedDialog;
3
4var oldEditor;
5var index;
6var editor;
7var indexInstruction;
8var displayButton;
9var tempindex = document.c
10
11var w = 500;
12var h = 250;
13
14var selectHead = '<select name="select" size="2" class="index" id="index" onChange="onIndexChange();" onKeyPress="return onEnterKeyPress(event);" onClick="onIndexChange();" onDblClick="javascript:displayTopic();">';
15var selectFoot = '</select>';
16var indexContent;
17
18var isIndexLoaded = false;
19
20function keyListener(e){
21 if(!e){
22 //for IE
23 e = window.event;
24 }
25 switch (e.keyCode) {
26 case 38:
27 if (index.selectedIndex > 0) {
28 index.selectedIndex = index.selectedIndex - 1;
29 onIndexChange();
30 setCaretToEnd(editor);
31 return false;
32 }
33 return true;
34 case 40:
35 if (index.selectedIndex < (index.length - 1) ) {
36 index.selectedIndex = index.selectedIndex + 1;
37 onIndexChange(index);
38 setCaretToEnd(editor);
39 return false;
40 }
41 return true;
42 default:
43 return true;
44 };
45}
46
47function selectTopic(i) {
48
49
50 var l = top.screenX + (top.innerWidth - w) / 2;
51 var t = top.screenY + (top.innerHeight - h) / 2;
52
53
54 // move the dialog just a bit higher than the middle
55 if (t-50 > 0) t = t-50;
56
57 window.location="javascript://needModal";
58 advancedDialog = window.open("selectTopic.jsp?entry="+i, "selectDialog", "resizable=yes,height="+h+",width="+w+",left="+l+",top="+t );
59 advancedDialog.focus();
60}
61
62function openTopic(href) {
63 window.parent.parent.parent.setContentToolbarTitle("");
64 window.parent.parent.parent.parent.ContentFrame.ContentViewFrame.window.location=href;
65}
66
67function alertEmpty() {
68 alert("To locate information about this keyword \nplease select one of the subentries in the list");
69}
70function onEnterKeyPress(onEvent) {
71
72 // updateIndex();
73
74 if(onEvent.keyCode==13) {
75
76 // uat4i00000149 1/2
77 onIndexChange();
78 // end of uat4i00000149 1/2
79
80 displayTopic();
81 return false;
82 }
83 else {
84 return true;
85 }
86}
87
88function setCaretToEnd (control) {
89 if (control.createTextRange) {
90 var range = control.createTextRange();
91 range.collapse(false);
92 range.select();
93 }
94 else if (control.setSelectionRange) {
95 control.focus();
96 var length = control.value.length;
97 control.setSelectionRange(length, length);
98 }
99}
100
101function onIndexChange() {
102 //alert("onIndexChange");
103
104 var input = index.options[index.selectedIndex].text;
105 var start = 0;
106 while (input.charCodeAt(start)==160) {
107 start++;
108 }
109
110 editor.value = input.substring(start, input.length);
111 oldEditor = editor.value;
112}
113
114// uat4i00000117
115function compare(keyword, pattern) {
116 var kI = 0, pI = 0;
117 var kCh, pCh;
118
119 while ( kI < keyword.length && pI < pattern.length) {
120 kCh = keyword.charAt(kI).toLowerCase();
121 pCh = pattern.charAt(pI).toLowerCase();
122 if ( kCh > pCh ) {
123 return kI+1;
124 }
125 else if ( kCh < pCh) {
126 return -1*(kI+1);
127 }
128 kI++;
129 pI++;
130 }
131 if( keyword.length == pattern.length ) {
132 return 0;
133 }
134 else if( keyword.length > pattern.length ) {
135 return kI+1;
136 }
137 else {
138 return -1*(kI+1);
139 }
140 }
141
142function searchPattern(pattern) {
143 var from = 0;
144 var to = index.length;
145 var i;
146 var res;
147
148 do {
149
150 i = Math.floor((to + from) / 2);
151
152 res = compare(index.options[index.options[i].value].text, pattern);
153 if( res == 0) {
154 if (index.options[i].value == i) {
155 index.selectedIndex = i;
156 return;
157 }
158 else {
159 to = i;
160 }
161 }
162 else if (res < 0) {
163 from = i + 1;
164 }
165 else {
166 to = i;
167 }
168 } while (to > from) ;
169
170 i = from;
171 if (i >= index.length)
172 i = index.length - 1;
173
174 while ((index.options[i].value != i)) {
175 i--;
176 };
177
178 res = compare(index.options[index.options[i].value].text, pattern);
179
180 var j=i;
181
182 while ((res > 0) && (i > 0)) {
183 j = i;
184 do {
185 i--;
186 } while ((index.options[i].value != i) && (i > 0));
187 res = compare(index.options[index.options[i].value].text, pattern);
188 };
189
190 var resj = compare(index.options[index.options[j].value].text, pattern);
191 if (Math.abs(resj) > Math.abs(res)) {
192 i = j;
193 }
194
195 index.selectedIndex = i;
196 return;
197}
198
199// end of uat4i00000117
200
201function updateIndex() {
202 var newEditor = editor.value;
203 if(oldEditor != newEditor) {
204 oldEditor = newEditor;
205 searchPattern(oldEditor);
206 }
207}
208
209function onloadHandler() {
210 editor = document.getElementById("editor");
211 //index = document.getElementById("index");
212 indexInstruction = document.getElementById("indexInstruction");
213 displayButton = document.getElementById("displayButton");
214 //index.selectedIndex = 0;
215 editor.value = "";
216 //editor.focus();
217 oldEditor=editor.value;
218 document.onkeydown = keyListener;
219 window.self.setInterval("updateIndex()", 200);
220 showIndexLoading();
221 if (window.parent.parent.parent.isIndexLoaded) {
222 loadIndex();
223 }
224}
225
226
227// uat4i00000496
228function onunloadHandler()
229{
230 try{
231 if (advancedDialog){
232 advancedDialog.close();
233 }
234 }catch(e){
235 }
236}
237// end of uat4i00000496
238
239function resize()
240{
241 var windowWidth; // frame width
242
243 if(window.innerWidth){
244 windowWidth=window.innerWidth;
245 } else if(document.documentElement && document.documentElement.clientWidth){
246 windowWidth=document.documentElement.clientWidth;
247 } else if(document.body){
248 windowWidth=document.body.offsetWidth;
249 }
250
251
252
253
254 if (document.getElementById("index")) {
255 var indexWidth = windowWidth - 28;
256 document.getElementById("index").style.width = indexWidth + "px";
257 }
258
259
260 //var buttonLeft = windowWidth - displayButton.clientWidth - 30;
261 //document.getElementById("displayButton").style.left = buttonLeft + "px";
262}
263
264function displayTopic() {
265 display(index.selectedIndex);
266}
267
268var indexInstructionLoaded = "{0} entries are loaded.";
269
270function loadIndex() {
271 if (!isIndexLoaded) {
272 loadMore();
273 }
274}
275
276function showIndexLoading()
277{
278 indexInstruction.innerHTML = "The index is being loaded. This action could take some time.";
279 //index.style.display = "none";
280 editor.style.display = "none";
281 displayButton.style.display = "none";
282}
283
284function showIndexLoaded()
285{
286 indexInstruction.innerHTML = "Please type the word and then click Display button";
287 var div = document.getElementById("indexDiv");
288
289
290 div.innerHTML = selectHead + en.join() + selectFoot;
291
292 en = null;
293 index = document.getElementById("index");
294 index.selectedIndex = 0;
295 //index.style.display = "block";
296 editor.style.display = "block";
297 displayButton.style.display = "block";
298
299 resize();
300
301 isIndexLoaded = true;
302 window.parent.parent.parent.isIndexLoaded = true;
303}
304
305function showIndexLoadFail()
306{
307 indexInstruction.innerHTML = "The index cannot be loaded.";
308 isIndexLoaded = true;
309 window.parent.parent.parent.isIndexLoaded = true;
310}
311
312<!-- ajax index loader -->
313var from = 0;
314var interval = 100;
315
316function loadMore() {
317 var url = "IndexServlet?fromStr=" + from;
318 initRequest(url);
319
320 req.onreadystatechange = processElements;
321 req.send(null);
322}
323
324var en = new Array();
325
326function processElements() {
327 try {
328 if (req.readyState == 4) {
329 if (req.status == 200) {
330
331 var content = req.responseText
332 en[en.length] = content;
333
334 if (content != "") {
335
336 from = from + interval;
337 var currentIndexInstruction = indexInstructionLoaded.replace("{0}", from);
338 indexInstruction.innerHTML = currentIndexInstruction;
339 loadMore();
340 }
341 else {
342
343 indexInstruction.innerHTML = "The index is being rendered. The rendering time varies by the index size.";
344 setTimeout("showIndexLoaded()", 100);
345 }
346 }
347 else {
348 showIndexLoadFail();
349 }
350 }
351 }
352 catch (e) {
353 showIndexLoadFail();
354 }
355}
356
357<!-- ajax href loader -->
358var isIE = false;
359var req;
360
361function display(index) {
362 var url = "IndexServlet?index=" + index;
363 initRequest(url);
364
365 // set callback function
366 req.onreadystatechange = processXMLResponse;
367 req.send(null);
368
369}
370
371function initRequest(url) {
372 if (window.XMLHttpRequest) {
373 req = new XMLHttpRequest();
374 } else if (window.ActiveXObject) {
375 isIE = true;
376 req = new ActiveXObject("Microsoft.XMLHTTP");
377 }
378 req.open("GET", url, true);
379 req.setRequestHeader('Content-Type', 'text/xml; charset=UTF-8');
380}
381
382function processXMLResponse() {
383 if (req.readyState == 4) {
384 if (req.status == 200) {
385 var ENTRY_HAS_MULTIPLE_TOPIC = "m";
386 var item = req.responseXML.getElementsByTagName("href")[0];
387
388 var href = item.firstChild.nodeValue;
389 if (href == ENTRY_HAS_MULTIPLE_TOPIC) {
390 selectTopic(index.selectedIndex);
391 } else {
392 openTopic(href);
393 }
394 }
395 }
396}
397
</script>
</head>
<body onunload="onunloadHandler()" onload="onloadHandler()" onresize="resize()" dir="ltr">
<table id="indexTable" name="indexTable">
<tbody>
<tr>
<td>
<label id="indexInstruction" for="editor">The index is being loaded. This action could take some time.</label>
</td>
</tr>
<tr>
<td class="editor">
<input id="editor" class="editor" type="text" onkeypress="return onEnterKeyPress(event);" style="display: none;">
</td>
<td class="display" align="right">
<input id="displayButton" class="display" type="submit" onclick="javascript:displayTopic();" value="Display" style="display: none;">
</td>
</tr>
<tr>
<td class="index" colspan="2">
<label style="display: none;" for="index">Select box for index keywords</label>
<div id="indexDiv" style="margin-top: -18px;"></div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</frame>
</frameset>
</html>
</iframe>
Comment 3 Steve Francisco CLA 2011-11-14 15:25:26 EST
Neal, I could not find instances of this either in Eclipse code.  Could you see if it's reproducible with just Eclipse?  If not perhaps it's IEHS specific.
Comment 4 Eclipse Genie CLA 2019-09-28 02:07:57 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.