PageSourceSearch

https://sw.ac.kr/_res/_common/js/3rd/accessibility.js

js sw.ac.kr collected 2026-10-10 00:13:03 UTC 26,261 bytes, 703 lines download raw bytes

1var pajetURI = "http://mydeute.com/was/";
2
3var allElForWas = document.getElementsByTagName("*");
4var NgbUserEvent = new __NgbUserEvent();
5var NgbBrowser = new __NgbBrowser();
6function getObjectList()
7{
8	var objectEl = document.getElementsByTagName("object");
9	var embedEl = document.getElementsByTagName("embed");
10}
11function getImgTagList()
12{
13	var summary = '<div class="sum">';
14	var imgEl = document.getElementsByTagName("img");
15	var inputEl = document.getElementsByTagName("input");
16	var returnValue = "<h2>1. 적절한 대체 텍스트 제공</h2>";
17
18	if(imgEl.length != 0)
19	{
20		returnValue += '<ul id="imageList">';
21		mapEl = document.getElementsByTagName("map");
22		mapElCount = mapEl.length;
23		for (var i=0; i<imgEl.length; i++)
24		{
25			if(imgEl[i].getAttribute("alt") == null)
26			{
27				returnValue +="<li class=\"fail\"><img src=\""+imgEl[i].getAttribute("src")+"\" onmouseover=\"viewImage(event,this.src); return false;\" onmouseout=\"hideImage();\" class=\"imageItem\" /> : alt 미정의";
28			}
29			else if(imgEl[i].getAttribute("alt") =="")
30			{
31				returnValue +="<li class=\"warning\"><img src=\""+imgEl[i].getAttribute("src")+"\" onmouseover=\"viewImage(event,this.src); return false;\" onmouseout=\"hideImage();\" class=\"imageItem\" /> : alt가 빈값";
32			}
33			else
34			{
35				returnValue +="<li><img src=\""+imgEl[i].getAttribute("src")+"\" onmouseover=\"viewImage(event,this.src,this.alt); return false;\" onmouseout=\"hideImage();\" class=\"imageItem\" alt=\""+imgEl[i].getAttribute("alt")+"\" /> : "+imgEl[i].getAttribute("alt");
36			}
37
38			if(imgEl[i].getAttribute("usemap") && imgEl[i].getAttribute("usemap") != null)
39			{
40				returnValue +="<h3>이미지 맵의 사용</h3>";
41				var mapValue = imgEl[i].getAttribute("usemap").replace("#",'');
42				returnValue +="<p>";
43				for(var l=0;l<mapElCount;++l)
44				{
45					if(mapEl[l].getAttribute("name")== mapValue)
46					{
47						areaEl = mapEl[l].getElementsByTagName("area");
48						for(var m=0;m<areaEl.length;++m)
49						{
50							returnValue+=areaEl[m].getAttribute("alt")+", ";
51						}
52					}
53				}
54				returnValue +="</p>";
55			}
56
57			if(imgEl[i].getAttribute("longdesc") && imgEl[i].getAttribute("longdesc") != null)
58			{
59				returnValue +="<p>";
60				returnValue +="<a href=\""+imgEl[i].getAttribute("longdesc")+"\">Long description link</a>";
61				returnValue +="</p>";
62			}
63			returnValue += "</li>\n";
64		}
65		returnValue += '</ul>';
66		summary += '<p>이 페이지 내의 IMG 요소는' + imgEl.length +'개입니다.</p>';
67	}
68	else
69	{
70		summary += '<p>이 페이지 내의 IMG 요소는 0 개입니다.</p>';
71	}
72	var countImgInput = 0;
73	if(inputEl.length>0)
74	{
75		returnValue += "<ul style='margin-top:20px;'>"
76		for(var j=0;j<inputEl.length;++j)
77		{
78			var getTypeInput = (inputEl[j].getAttribute("type")!=null)?inputEl[j].getAttribute("type").toLowerCase():"text";
79			if(getTypeInput=="image")
80			{
81				returnValue +="<li><img src=\""+inputEl[j].getAttribute("src")+"\" onmouseover=\"viewImage(event,this.src,this.alt); return false;\" onmouseout=\"hideImage();\" class=\"imageItem\" alt=\""+inputEl[j].getAttribute("alt")+"\" /> : "+inputEl[j].getAttribute("alt")+"</li>\n";
82				countImgInput++;
83			}
84		}
85		returnValue += "</ul>"
86	}
87	summary += '<p>이 페이지 내의 AREA 요소는 ' + document.getElementsByTagName("area").length +'개입니다.</p>';
88	summary += '<p>이 페이지 내의 input[type="image"] 요소는 ' + countImgInput +' 개입니다.</p>';
89	summary += '</div>'
90	return returnValue + summary;
91}
92function checkBackgroundImg()
93{
94	var returnValue = "<h2>1. 적절한 대체 텍스트 제공(배경사용여부)</h2>";
95	returnValue += "<p><button onclick='toggleImageOutline()'>Toggle image outline</button></p>";
96	returnValue += "<p><button onclick='togglebgimage()'>Turn on.off background Image</button></p>";
97	return returnValue;
98}
99var isImageOutlineToggled;
100function toggleImageOutline() {
101	var imgEl = document.getElementsByTagName("img");
102	if (isImageOutlineToggled) {
103		for (var i=0; i<imgEl.length; i++)
104		{
105			imgEl.item(i).style.outline = 'none';
106			isImageOutlineToggled = false;
107		}
108	} else {
109		for (var i=0; i<imgEl.length; i++)
110		{
111			imgEl.item(i).style.outline = '1px solid #000';
112			isImageOutlineToggled = true;
113		}
114	}
115}
116var isBackgroundImageStatus=true;
117var tempSaveBg = new Array();
118function togglebgimage() {
119	if(isBackgroundImageStatus)
120	{
121		tempSaveBg = new Array();
122		for (var i =0;i<allElForWas.length;++i)
123		{
124			var getBackgroundImage = getStyle(allElForWas[i],"backgroundImage");
125			if(getBackgroundImage !="none")
126			{
127				tempSaveBg[i] = getBackgroundImage;
128				allElForWas[i].style.backgroundImage = "none";
129			}
130		}
131		isBackgroundImageStatus = false
132	} else {
133		for (var i =0;i<allElForWas.length;++i)
134		{
135			if(tempSaveBg[i]!=null)
136			{
137				allElForWas[i].style.backgroundImage = tempSaveBg[i]
138			}
139		}
140		isBackgroundImageStatus = true;
141	}
142}
143
144
145//get #link
146function getSkipNav() {
147	var aEl = document.getElementsByTagName("a");
148	var returnValue = "<h2>12. 반복영역 건너뛰기</h2>";
149	var hrefCount = 0;
150	if(aEl.length>0)
151	{
152		var aElLength = (aEl.length>10)? 10 : aEl.length;
153		returnValue += "<ul id='skipPajetL'>";
154		for (var i=0;i<aElLength; ++i)
155		{
156			var getHref = aEl[i].getAttribute("href",2);
157			if(getHref && getHref.indexOf('#')==0 && getHref != "#")
158			{
159				hrefCount++;
160				var inText = aEl[i].innerHTML;
161				var inDom = getHref.replace('#','');
162				var ableAccess;
163				if(document.getElementById(inDom))
164				{
165					ableAccess = true;
166				} else {
167					if(document.getElementsByName(inDom).length>0)
168						ableAccess = true;
169					else
170						ableAccess = false;
171				}
172				if(ableAccess)
173					returnValue += "<li class=\"pass\">["+ (i+1) + "번째 링크]\""+ inText + "\" 바로가기 링크(href=\""+getHref+"\")가 문서내에 연결이 되어 있습니다.</li>";
174				else
175					returnValue += "<li class=\"fail\">["+ (i+1) + "번째 링크]\""+ inText + "\" 바로가기 링크(href=\""+getHref+"\")가 문서내에 연결이 되어 있지 않습니다.</li>";
176			}
177		}
178		if(hrefCount==0)
179		{
180			returnValue += "<li class=\"fail\">스킵 네비게이션이 정의되어 있지 않습니다.</li>";
181		}
182		returnValue += "</ul>";
183	} else {
184		returnValue += "<p class=\"fail\">이 페이지에는 링크가 존재하지 않습니다.</p>";
185	}
186	return returnValue;
187}
188function getTitle()
189{
190	var titleElLsit = '<h2>13.1 제목 제공(페이지 타이틀)</h2>';
191	var elText = document.getElementsByTagName("head")[0];
192	if (elText) elText = elText.getElementsByTagName("title")[0];
193	if (elText) elText = elText.text;
194	if(elText && elText != null)
195	{
196		titleElLsit += "<p>"+ elText + "</p>";
197	}
198	else
199	{
200		titleElLsit += '<p class="fail">페이지 타이틀이 정의 되지 않았습니다.</p>';
201	}
202	return titleElLsit;
203}
204
205
206function getFrameTagList()
207{
208	var frameEl = document.getElementsByTagName("frame");
209	var iframeEl = document.getElementsByTagName("iframe");
210	var frameCount = frameEl.length + iframeEl.length;
211	var frameElList = "<h2>13.2 제목 제공(프레임제목)</h2>";
212	if(frameCount>0)
213	{
214		frameElList += "<p>"+frameCount+"개의 프레임이 사용 되었습니다.</p>";
215		frameElList += "<table class=\"frameTable\"><thead><tr><th>URL</th><th>title</th></tr></thead><tbody>";
216		if(frameEl.length != 0)
217		{
218			for (var i=0; i<frameEl.length; i++)
219			{
220				frameElList +="<tr><td>frame: <a href=\""+frameEl[i].getAttribute("src")+"\">"+frameEl[i].getAttribute("src")+"</a></td><td>"+frameEl[i].getAttribute("title")+"</td></tr>";
221			}
222		}
223		if(iframeEl.length != 0)
224		{
225			for (var i=0; i<iframeEl.length; i++)
226			{
227				frameElList +="<tr><td>iframe: <a href=\""+iframeEl[i].getAttribute("src")+"\">"+iframeEl[i].getAttribute("src")+"</a></td><td>"+iframeEl[i].getAttribute("title")+"</td></tr>";
228			}
229		}
230		frameElList += "</tbody></table>";
231	}
232	else
233	{
234		frameElList += '<p>이 페이지는 프레임이 사용되지 않았습니다.</p>';
235	}
236	return frameElList;
237}
238function getHnTagList()
239{
240	var returnValue = "<h2>13.3 제목 제공(콘텐츠 블록)</h2>";
241	for(var i=1;i<7;++i)
242	{
243		var hnTag = document.getElementsByTagName("h"+i);
244		returnValue += "<h3>h"+i +"태그의 사용</h3>";
245		returnValue += "<ul class=\"hnTagList\">";
246		if(hnTag.length>0)
247		{
248			for(j=0;j<hnTag.length;++j)
249			{
250				returnValue += "<li>"+hnTag[j].innerHTML +"</li>";
251			}
252		} else {
253			returnValue += "<li class=\"warning\">이페이지에는 h"+i+"태그가 사용되지 않았습니다.</li>";
254		}
255		returnValue += "</ul>";
256	}
257	return returnValue;
258}
259function getLinkCount()
260{
261	var linkElList = [];
262	linkElList.push('<h2>14 적절한 링크 텍스트</h2>');
263	var aEl = document.getElementsByTagName("a");
264	var aElC = aEl.length;
265	var hasHrefA = 0;
266	for (var i=0;i<aElC;i++)
267	{
268		if(aEl[i].href != null)
269		{hasHrefA++;}
270	}
271
272
273	var areaEl = document.getElementsByTagName("area");
274	var areaElC = areaEl.length;
275	var hasHrefArea = 0;
276	for (var j=0;j<areaElC;j++)
277	{
278		if(areaEl[j].href != null)
279		{hasHrefArea++}
280	}
281
282
283	if (hasHrefA > 0 )
284		linkElList.push("<p>문서의 링크의 갯수는 "+ hasHrefA + "개 입니다.</p>")
285	else
286		linkElList.push("<p>
286이 문서에는 링크가 존재하지 않습니다.</p>")
287
288	if (hasHrefArea > 0 )
289		linkElList.push("<p>문서의 이미지 맵의 갯수는 "+ hasHrefArea + "개 입니다.</p>")
290	else
291		linkElList.push("<p>이 문서에는 이미지 맵이 없거나 이미지 맵에 링크가 없습니다.</p>")
292
293	linkElList.push("<div class='sum'><p>링크 항목의 총 갯수는 "+ (hasHrefA + hasHrefArea) + "개 입니다.</p></div>")
294	return linkElList.join('');
295}
296function getlocale()
297{
298	var returnValue = "<h2>15 기본언어 표시</h2><ul class=\"localeList\">";
299	var htmlEL = document.getElementsByTagName("html");
300	if(htmlEL.length >0)
301	{
302		returnValue += "<li>lang : ";
303		returnValue += (htmlEL[0].getAttribute("lang")!=null)?"<span class='pass'>"+htmlEL[0].getAttribute("lang")+"</span>":"<span class='fail'>값이 없습니다</span>";
304		returnValue += "</li>";
305		returnValue += "<li>xml:lang : ";
306		returnValue += (htmlEL[0].getAttribute("xml:lang")!=null)?"<span class='pass'>"+htmlEL[0].getAttribute("xml:lang")+"</span>":"<span class='fail'>값이 없습니다</span>";
307		returnValue += "</li>";
308	}
309	returnValue += "</ul>";
310	return returnValue;
311}
312
313
314function getTableInfo()
315{
316	var el = document.getElementsByTagName("table");
317	var genList = "<h2>18. 표의 구성</h2>";
318	if(el.length != 0)
319	{
320		genList += "<ul class='tblist'>";
321		for (var i=0; i<el.length; i++) {
322			var thList = el[i].getElementsByTagName("th");
323			var thStr = '';
324			for (var j=0; j<thList.length; j++) {
325				thStr += ', <span class="warning">' + thList.item(j).innerHTML + '</span>';
326			}
327			var summaryStr = (el[i].getAttribute("summary")==null) ? "" : el[i].getAttribute("summary");
328			var captionStr = (el[i].getElementsByTagName("caption").length > 0) ? el[i].getElementsByTagName("caption")[0].innerHTML : "";
329			if (captionStr == '' && summaryStr == '') {
330				tableHeading = '<span class="fail">제목없는</span>';
331			} else if (captionStr == summaryStr) {
332				tableHeading = '<span class="fail">[C][S] ' + captionStr + '</span>';
333			} else {
334				var resultCaptionCode;
335				var resultsummaryCode;
336				resultCaptionCode = (captionStr=="")?'<span class="fail">[C]:미정의</span>':'<span class="pass">[C]' + captionStr +'</span>';
337				resultsummaryCode = (summaryStr=="")?'<span class="fail">[S]:미정의</span>':'<span class="pass">[S]' + summaryStr +'</span>';
338				tableHeading = resultCaptionCode +", "+ resultsummaryCode;
339			}
340			genList += "<li>" + tableHeading + ' 테이블: th의 사용 ' + ((thStr == '') ? '<span class="fail">th태그가 사용되지 않았습니다</span>.' : thStr.replace(', ', '').replace(/<br>/ig,'')) +"</li>";
341		}
342		genList += "</ul>";
343	}
344	else
345		genList += "<p>이 페이지는 테이블이 사용되지 않았습니다.</p>";
346	return genList;
347}
348//match label list and form format
349function getLabelList()
350{
351	var returnValue = "<h2>19. 레이블 제공</h2>"
352	var labelEl = document.getElementsByTagName("label");
353	var returnLabelFor = "";
354	if(labelEl.length>0)
355	{
356		for(var i=0;i<labelEl.length;++i)
357		{
358			if(labelEl[i].getAttribute("for"))
359			{
360				returnLabelFor += ","+labelEl[i].getAttribute("for")+"|";
361			}
362			else if(labelEl[i].getAttribute('htmlFor'))
363			{
364				returnLabelFor += ","+labelEl[i].attributes['for'].nodeValue+"|";
365			}
366		}
367	}
368	else
369	{
370		returnValue += "<p>이 페이지에는 label이 사용되지 않았습니다. 서식을 확인하세요.</p>";
371	}
372	returnValue += "<ul>"
373
374	var needLabelNum = 0;
375	var summary = '<div class="sum">';
376	var inputEl = document.getElementsByTagName("input");
377	if(inputEl.length>0)
378	{
379		for(var j=0;j<inputEl.length;++j)
380		{
381			var getTypeInput = (inputEl[j].getAttribute("type")!=null)?inputEl[j].getAttribute("type").toLowerCase():"text";
382			if(getTypeInput=="text"||getTypeInput=="radio"||getTypeInput=="checkbox"||getTypeInput=="password"||getTypeInput=="file")
383			{
384				needLabelNum++
385				var nameId = inputEl[j].getAttribute("id");
386				var nameTitle = inputEl[j].getAttribute("title");
387				if(returnLabelFor.indexOf(","+nameId+"|")>-1) {
388					var labelText = document.querySelector ? document.querySelector('label[for="'+nameId+'"]').innerHTML : 'LABEL';
389					returnValue += '<li>'+j+'번째 input[type="'+getTypeInput+'"]는 "'+labelText+'"과 "<span class="pass">'+nameId+'</span>"으로 연결되었습니다.';
390				}
391				else if(nameTitle)
392				{
393					returnValue += '<li>'+j+'번째 input[type="'+getTypeInput+'"]는 label과 연결되지 않았고, title속성은 "<span class="warning">'+nameTitle+'</span>"입니다';
394				}
395				else
396				{
397					returnValue += '<li>'+j+'번째 input[type="'+getTypeInput+'"]는 label과 <span class="fail">연결되지 않았습니다.</span>';
398				}
399			}
400		}
401	}
402	var selectEl = document.getElementsByTagName("select");
403	if(selectEl.length>0)
404	{
405		for(var k=0;k<selectEl.length;++k)
406		{
407			needLabelNum++
408			var nameId = selectEl[k].getAttribute("id");
409			var nameName = selectEl[k].getAttribute("name");
410			var nameTitle = selectEl[k].getAttribute("title");
411			if(returnLabelFor.indexOf(","+nameId+"|")>-1) {
412				var labelText = document.querySelector ? document.querySelector('label[for="'+nameId+'"]').innerHTML : 'LABEL';
413				returnValue += '<li>'+k+'번째 select태그는 id 속성으로 "'+labelText+'"과 "<span class="pass">'+nameId+'</span>"으로 연결되었습니다.';
414			}
415			else if(nameTitle)
416				returnValue += '<li>'+k+'번째 select태그는 label과 연결되지 않았고, title속성은 "<span class="warning">'+nameTitle+'</span>"입니다';
417			else
418				returnValue += '<li>'+k+'번째 select[name="'+nameName+'"]는 label과 <span class="fail">연결되지 않았습니다.</span>';
419		}
420	}
421	var textareaEl = document.getElementsByTagName("textarea");
422	if(textareaEl.length>0)
423	{
424		for(var l=0;l<textareaEl.length;++l)
425		{
426			needLabelNum++;
427			var nameAtt = textareaEl[l].getAttribute("name");
428			var nameId = textareaEl[l].getAttribute("id");
429			var nameTitle = textareaEl[l].getAttribute("title");
430			if(returnLabelFor.indexOf(","+nameId)>-1) {
431				var labelText = document.querySelector ? document.querySelector('label[for="'+nameId+'"]').innerHTML : 'LABEL';
432				returnValue += '<li>'+l+'번째 textarea태그는 id 속성으로 "'+labelText+'"과 "<span class="pass">'+nameId+'</span>"으로 연결되었습니다.';
433			}
434			else if(nameTitle)
435				returnValue += '<li>'+l+'번째 textarea태그는 label과 연결되지 않았고, title속성은 "<span class="warning">'+nameTitle+'</span>"입니다';
436			else
437				returnValue += '<li>'+l+'번째 textarea태그는 label과 <span class="fail">연결되지 않았습니다.</span>';
438		}
439	}
440	returnValue += "</ul>"
441	summary += '<p>label이 필요한 서식은 ' + needLabelNum + '개입니다.</p></div>'
442	returnValue += summary;
443	return returnValue;
444}
445//input,select,text area is related label
446
447
448//form use action attribute and have submit, button, image
449function getFromList()
450{
451	var formEl = document.getElementsByTagName("form");
452	var returnValue = "<h2>4.2.1 웹 어플리케이션 접근성 준수(서식의 올바른 사용)</h2>";
453	if(formEl.length>0)
454	{
455		returnValue += "<p>이 페이지에는 "+formEl.length+"개의 form 세트가 사용되었습니다.<p><ul>";
456		for(var i=0;i<formEl.length;++i)
457		{
458			returnValue += "<li><h3>"+i+"번째 form태그의 정보입니다.</h3>";
459			if(formEl[i].action!=null)
460				returnValue += "<p>action속성에 \"<span class='pass'>"+formEl[i].action+"</span>\"이 정의되었습니다.</p>";
461			else
462				returnValue += "<p class='warning'>action속성이 정의되지 않은 form set 입니다.</p>"
463
464			var formInputEl = formEl[i].getElementsByTagName("input");
465			if(formInputEl.length > 0)
466			{
467				var submitCount = 0;
468				var submitText = "";
469				for(var j=0;j<formInputEl.length;j++)
470				{
471					if(formInputEl[j].type =="submit" || formInputEl[j].type =="button" || formInputEl[j].type =="image")
472					{
473						submitCount += 1;
474						submitText = ", " + formInputEl[j].type
475					}
476				}
477
478				if(submitCount>0)
479				{
480					submitText = submitText.substring(2);
481					returnValue += "<p>이 폼에는 버튼 서식이 "+((submitCount==1)?"<span class='pass'>1</span>":"<span class='warning'>"+submitCount+"</span>")+"개 사용되었으며, 버튼들의 type은 \""+((submitCount==1)?"<span class='pass'>"+submitText+"</span>":"<span class='warning'>"+submitText+"</span>")+"\" 으로 구성되어 있습니다.</p>";
482				}
483				else
484				{
485					returnValue += "<p class=\"fail\">이 폼은 버튼 서식이 없습니다. 링크등으로 구성되어 있는지 확인해보세요.</p>"
486				}
487			}
488			else
489			{
490				returnValue += "<p>input이 사용되지 않은 폼입니다.</p>"
491			}
492			returnValue +="</li>";
493		}
494		returnValue +="</ul>";
495	}
496	else
497	{
498		returnValue += "<p>이 페이지에는 form이 사용되지 않았습니다. 혹시 서식이 사용되지않았는지 아래항목에서 확인하십시오.<p>";
499	}
500
501	return returnValue;
502}
503//pseudo javascript
504function getJsLink(){
505	var returnValue = "<h2>4.2.1 웹 어플리케이션 접근성 준수( pseudo자바스크립트 사용 여부)</h2>";
506	var countPseudo = 0;
507	var aEl = document.getElementsByTagName("a");
508	returnValue += "<ul id='jsLink'>";
509	for (var i = 0; i < aEl.length; ++i) {
510		if (aEl[i].href.toLowerCase().indexOf('javascript:') > -1) {
511			returnValue += "<li>\"" + aEl[i].innerHTML + '"에 수도 자바스크립트 링크 <span class="fail">' + aEl[i].href + "</span>가 사용되었습니다.</li>";
512		}
513	}
514	returnValue += "</ul>";
515	return returnValue;
516}
517//onclick
518function getOnclick()
519{
520	var returnValue = "<h2>4.2.1 웹 어플리케이션 접근성 준수(onclick 사용시 대체 URL체크)</h2><ul class=\"linkList\">";
521	var hrefText = '', countOnclick = 0;
522	for (var j = 0;j<allElForWas.length;j++)
523	{
524		if(allElForWas[j].onclick && allElForWas[j].onclick != null)
525		{
526			hrefText = '';
527			if(allElForWas[j].href && allElForWas[j].onclick != null)
528			{
529				hrefText = allElForWas[j].href.replace(window.location.href,'');
530			}
531			else
532			{
533				hrefText = "<span class=\"warning\">지정되지않았거나 정의되지않음("+allElForWas[j].tagName+")</span>";
534			}
535			var elementName = (allElForWas[j].innerHTML) ? allElForWas[j].innerHTML + " 링크" : allElForWas[j].tagName + " 태그";
536			returnValue += hrefText=="#" ? "<li>\""+elementName+"\"의 href값은 \"<span class=\"fail\">"+ hrefText + "</span>\"이고 <span class=\"warning\">onclick("+allElForWas[j].onclick+")</span>이 사용되었습니다." : "<li>\""+elementName+"\"의 href값은 \"<span class=\"pass\">"+ hrefText + "</span>\"이고 onclick("+allElForWas[j].onclick+")이 사용되었습니다.";
537			countOnclick +=1;
538		}
539	}
540	returnValue += (countOnclick==0)?"<li>이 페이지에는 onclick 요소가 없습니다.</li>":"";
541	returnValue += "</ul>";
542	return returnValue;
543}
544
545
546//create contents
547function generateTag()
548{
549	var gHTML = '<div id="pajetWrap"><div id="pajetHeader"><h1>접근성 진단</h1><p class="closeWacs"><button id="closePm" onclick="closeWacs();"><i class="fa fa-close"></i></button></p></div><div id="pajetContents">';
550	gHTML += '<div id="section1" class="section">'+getImgTagList()+'</div>'; //1.1.1
551	gHTML += '<div id="section2" class="section">'+checkBackgroundImg()+'</div>';//1.1.1
552	gHTML += '<div id="section3" class="section">'+getSkipNav()+'</div>'; //241
553	gHTML += '<div id="section4" class="section">'+getTitle()+'</div>'; //242
554	gHTML += '<div id="section5" class="section">'+getFrameTagList()+'</div>'; //242
555	gHTML += '<div id="section6" class="section">'+getHnTagList()+'</div>';
556	gHTML += '<div id="section7" class="section">'+getLinkCount()+'</div>'; //341
557	gHTML += '<div id="section8" class="section">'+getlocale()+'</div>'; //311
558	gHTML += '<div id="section9" class="section">'+getTableInfo()+'</div>'; //332
559	gHTML += '<div id="section10" class="section">'+getLabelList()+'</div>'; //341
560
561//	gHTML += '<div id="section11" class="section">'+getFromList()+'</div>';
562//	gHTML += '<div id="section12" class="section">'+getJsLink()+'</div>';
563//	gHTML += '<div id="section13" class="section">'+getOnclick()+'</div>';
564	gHTML += '</div>';
565	return gHTML;
566}
567
568//util
569function viewImage(evnt,imgSrc,imgAlt)
570{
571        if(document.getElementById("deuteWasImg") != null)
572        {
573                var targetDom = document.getElementById("deuteWasImg")
574        }
575        else
576        {
577                var targetDom = document.createElement("div");
578                targetDom.setAttribute("id","deuteWasImg")
579                document.getElementsByTagName( 'body' )[ 0 ].appendChild( targetDom );
580        }
581        targetDom.innerHTML = "<img src=\""+imgSrc+"\" /><br />" + ((imgAlt) ? imgAlt : 'ALT 없음');
582        // USERBILITY TESTING…
583        targetDom.style.left = "50%";
584        targetDom.style.top = "50%";
585        targetDom.style.display = "block";
586        targetDom.style.margin = '-' + targetDom.offsetHeight / 2 + 'px 0 0 -' + targetDom.offsetWidth / 2 + 'px';
587        targetDom.style.border = "3px solid #fdaf17";
588        targetDom.style.background = "#fff";
589}
590function __NgbUserEvent()
591{
592        this.MousePositionX = function(vent)
593        {
594                var LeftValue;
595                if ( window.pageYOffset ) { LeftValue = window.pageXOffset; }
596                else if ( document.documentElement && document.documentElement.scrollTop ) { LeftValue = document.documentElement.scrollLeft; }
597                else if ( document.body ) { LeftValue = document.body.scrollLeft; }
598
599                if(NgbBrowser.msie()) { return LeftValue + event.clientX; }
600                else { return evnt.pageX; }
601        };
602        this.MousePositionY = function(evnt)
603        {
604                var TopValue;
605                if ( window.pageYOffset ) { TopValue = window.pageYOffset;      }
606                else if ( document.documentElement && document.documentElement.scrollTop ) { TopValue = document.documentElement.scrollTop; }
607                else if ( document.body ) { TopValue = document.body.scrollTop; }
608
609                if(NgbBrowser.msie()) { return TopValue + event.clientY; }
610                else { return evnt.pageY;}
611        };
612}
613function __NgbBrowser()
614{
615        this.agt = navigator.userAgent.toLowerCase();
616        this.check = function(browserName) { return this.agt.indexOf(browserName) != -1 };
617        this.msie = function() { return this.check("msie") };
618        this.msie5 = function() { return this.check("msie 5") };
619        this.msie55 = function() { return this.check("msie 5.5") };
620        this.msie6 = function() { return this.check("msie 6") };
621        this.msie7 = function() { return this.check("msie 7") };
622        this.firefox = function() { return this.check("firefox") };
623        this.netscape = function() { return this.check("netscape") };
624        this.safari = function() { return this.check("safari") };
625        this.opera = function() { return this.check("opera") };
626        this.gecko = function() { return this.check("gecko") };
627        this.khtml = function() { return this.check("khtml") };
628        this.windows = function() { return this.check("windows") };
629        this.windows2000 = function() { return this.check("windows nt 5.0") };
630        this.windowsXP = function() { return this.check("windows nt 5.
6301") };
631        this.windows98 = function() { return this.check("windows 98") };
632        this.mac = function() { return this.check("mac") };
633        this.linux = function() { return this.check("linux") };
634}
635function hideImage()
636{
637        var targetDom = document.getElementById("deuteWasImg");
638        targetDom.innerHTML = "";
639        targetDom.style.display = "none";
640}
641
642
643function closeWacs()
644{
645	document.getElementById("deuteWas").innerHTML = "";
646	document.getElementById("deuteWas").style.display = "none";
647}
648function miniWacs()
649{
650	var pContents = document.getElementById('miniWacs');
651	var minButton = document.getElementById('pajetContents');
652	if(minButton.style.display=="none")
653	{
654		minButton.style.display="block"
655		pContents.innerHTML = "_"
656	}
657	else
658	{
659		minButton.style.display="none"
660		pContents.innerHTML = "ㅁ"
661	}
662}
663
664function getStyle(el, sStyle) {
665	if (el.currentStyle) {
666		getStyle = function(el, sStyle) {
667			var computedStyle;
668			computedStyle = el.currentStyle;
669			return computedStyle[sStyle];
670		};
671	} else {
672		getStyle = function(el, sStyle) {
673			var computedStyle;
674			computedStyle = window.getComputedStyle(el, null);
675			return computedStyle[sStyle];
676		};
677	}
678	getStyle(el, sStyle);
679}
680
681
682function accessibilityCheck() {
683	//실행
684	if(document.getElementById("deuteWas") != null)
685	{
686	        document.getElementById("deuteWas").innerHTML = "";
687	        document.getElementById("deuteWas").innerHTML = generateTag();
688	        document.getElementById("deuteWas").style.display = "block";
689	}
690	else
691	{
692
693	        var newDiv = document.createElement("div");
694	        newDiv.setAttribute("id","deuteWas")
695	        newDiv.innerHTML = generateTag();
696		if(document.getElementsByTagName("body")[0]){
697			document.getElementsByTagName("body")[0].appendChild(newDiv);
698		} else {
699			alert("이 페이지에는 body가 없습니다. 혹시 frameset으로 페이지가 구성되지 않았는지 확인하세요.\n(프레임 셋 페이지는 평가 하실수 없습니다.)");
700		}
701	}
702
703}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.