raakt 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/lib/raakt.rb +454 -0
  2. data/tests/empty.htm +1 -0
  3. data/tests/emptytitledoc.htm +8 -0
  4. data/tests/fielddoc1.htm +2 -0
  5. data/tests/fielddoc2.htm +11 -0
  6. data/tests/fielddoc3.htm +14 -0
  7. data/tests/flickerdoc1.htm +0 -0
  8. data/tests/framedoc1.htm +22 -0
  9. data/tests/framedoc2.htm +8 -0
  10. data/tests/full_google.htm +17 -0
  11. data/tests/headingsdoc1.htm +17 -0
  12. data/tests/headingsdoc2.htm +14 -0
  13. data/tests/headingsdoc3.htm +6 -0
  14. data/tests/headingsdoc4.htm +9 -0
  15. data/tests/headingsdoc5.htm +9 -0
  16. data/tests/headingsdoc6.htm +6 -0
  17. data/tests/headingsdoc7.htm +8 -0
  18. data/tests/headingsdoc8.htm +12 -0
  19. data/tests/headingsdoc9.htm +20 -0
  20. data/tests/imagedoc1.htm +8 -0
  21. data/tests/imagedoc2.htm +1 -0
  22. data/tests/imagedoc3.htm +11 -0
  23. data/tests/imagedoc4.htm +7 -0
  24. data/tests/invalidelements1.htm +18 -0
  25. data/tests/invalidhtmldoc1.htm +10 -0
  26. data/tests/invalidhtmldoc2.htm +20 -0
  27. data/tests/invalidxhtmldoc1.htm +17 -0
  28. data/tests/linkdoc1.htm +18 -0
  29. data/tests/linkdoc2.htm +12 -0
  30. data/tests/linkdoc3.htm +16 -0
  31. data/tests/linkdoc4.htm +10 -0
  32. data/tests/metarefreshdoc1.htm +10 -0
  33. data/tests/metarefreshdoc2.htm +14 -0
  34. data/tests/metarefreshdoc3.htm +10 -0
  35. data/tests/nestedcomment.htm +7 -0
  36. data/tests/newlinetext.txt +3 -0
  37. data/tests/raakt_test.rb +224 -0
  38. data/tests/scriptdoc1.htm +15 -0
  39. data/tests/scriptdoc2.htm +10 -0
  40. data/tests/tabledoc1.htm +5 -0
  41. data/tests/tabledoc2.htm +9 -0
  42. data/tests/tabledoc3.htm +6 -0
  43. data/tests/tabledoc4.htm +17 -0
  44. data/tests/tabledoc5.htm +11 -0
  45. data/tests/tabledoc6.htm +11 -0
  46. data/tests/tablelayoutdoc.htm +16 -0
  47. data/tests/test_helper.rb +21 -0
  48. data/tests/xhtmldoc1.htm +14 -0
  49. metadata +100 -0
@@ -0,0 +1,15 @@
1
+ <link rel="stylesheet" type="text/css">
2
+ <title>This is the title</title>
3
+ <!-- A comment -->
4
+ <script type="text/javascript">
5
+ function imgPopup2(url){
6
+ MyWin = window.open("","","scrollbars=no,resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width=100,height=100");
7
+ with(MyWin.document){
8
+ open();
9
+ write("<html>\n<head><scr"+"ipt>awidth=(document.layers)?0:8;awidth+=(document.all)?4:0;aheight=(document.layers)?0:29;</scr"+"ipt>\n<title>This is not the title</title>\n</head>\n<body onLoad=\"window.resizeTo(document.images[0].width+awidth,document.images[0].height+aheight)\"marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 rightmargin=0 style=\"overflow:hidden;\">\n");
10
+ write("<img src=\""+url+"\">\n");
11
+ write("</body>\n</html>\n");
12
+ close();
13
+ }
14
+ }
15
+ </script>
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <script hey baberiba>
3
+ code
4
+ </script>
5
+ <script>
6
+ more code
7
+ </script>
8
+
9
+ <p>content</p>
10
+ </html>
@@ -0,0 +1,5 @@
1
+ <table class="123" summary='my summary'>
2
+ <caption>my caption</caption>
3
+ <tr><th>a header cell</th></tr>
4
+ <tr><td>a cell</td></tr>
5
+ </table>
@@ -0,0 +1,9 @@
1
+ <h1>First heading</h1>
2
+ <table id='1' summary='my summary'>
3
+ <caption>my caption</caption>
4
+ <tr><td>a cell</td></tr>
5
+ </table>
6
+ <TABLE ID='2' SUMMARY='my summary'>
7
+ <CAPTION>my caption</CAPTION>
8
+ <tr><td>a cell</td></tr>
9
+ </TABLE>
@@ -0,0 +1,6 @@
1
+ <Html><br><h1 class='234'>first heading</h1><img src="/table/pic.png">
2
+ <table id="1"><tr><td class="no 1">
3
+ <table summary="my summary" id="2"><caption>my caption</caption><tr><th class="no 2">data</th></tr>
4
+ <tr><td class="no 3">data</td></tr>
5
+ </table>
6
+ </td></tr></table></html>
@@ -0,0 +1,17 @@
1
+ <TABLE summary="my summary">
2
+ <THEAD>
3
+ <TR><TH>first header</TH></TR>
4
+ </THEAD>
5
+ <TFOOT>
6
+ <TR><TD>First</TD></TR>
7
+ </TFOOT>
8
+ <TBODY>
9
+ <TR><TD>First</TD></TR>
10
+ <TR><TD>First</TD></TR>
11
+ </TBODY>
12
+ <TBODY>
13
+ <TR><TD>First</TD></TR>
14
+ <TR><TD>First</TD></TR>
15
+ <TR><TD>First</TD></TR>
16
+ </TBODY>
17
+ </TABLE>
@@ -0,0 +1,11 @@
1
+ <Html><br><h1 class='234'>first heading</h1><img src="/table/pic.png">
2
+ <table summary="my summary" id="2"><caption>my caption</caption><tr><th class="no 2">data</th></tr>
3
+ <tr><td class="no 3">data</td></tr>
4
+ </table>
5
+ <table id="1"><tr><td class="no 1">
6
+ <table summary="my summary" id="2"><caption>my caption</caption><tr><th class="no 2">data</th></tr>
7
+ <tr><td class="no 3">data <table summary="my summary" id="2"><caption>my caption</caption><tr><th class="no 2">data</th></tr>
8
+ <tr><td class="no 3">data</td></tr>
9
+ </table></td></tr>
10
+ </table>
11
+ </td></tr></table></html>
@@ -0,0 +1,11 @@
1
+ <Html><br><h1 class='234'>first heading</h1><img src='/table/pic.png'>
2
+ <table summary='my summary' id='3'><caption>my caption</caption><tr><td>fake header</td></tr>
3
+ <tr><td class='no 3'>data</td></tr>
4
+ </table>
5
+ <table id='1'><tr><td class='no 1'>
6
+ <table summary='my summary' id='2'><caption>my caption</caption><tr><th class='no 2'>data</th></tr>
7
+ <tr><td class='no 3'>data <table summary='my summary' id='2'><caption>my caption</caption><tr><th class='no 2'>data</th></tr>
8
+ <tr><td class='no 3'>data</td></tr>
9
+ </table></td></tr>
10
+ </table>
11
+ </td></tr></table></html>
@@ -0,0 +1,16 @@
1
+ <html>
2
+ <head>
3
+ <?xml version="1.0" encoding="UTF-8"?>
4
+ <title>This is the title</title>
5
+ <link rel="schema.DC" href="http://purl.org/DC/elements/1.0/" />
6
+ </head>
7
+ <body>
8
+ <TABLE><tr><td>
9
+ <p>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a>
10
+ document.</p>
11
+ </td>
12
+ </tr>
13
+ </table>
14
+ <table><tr><td>In table two.</td></tr></table>
15
+ </body>
16
+ </html>
@@ -0,0 +1,21 @@
1
+ require 'test/unit'
2
+ require 'rubygems'
3
+
4
+ class Test::Unit::TestCase
5
+
6
+ def method_missing(methId)
7
+ methodname = methId.id2name
8
+
9
+ if(methodname[0..4] == "data_")
10
+ file_name = $0.sub(/raakt_test.rb/, "") + methodname[5..-1] + ".htm"
11
+ if File.exist?(file_name)
12
+ File.open(file_name) {|file|
13
+ return file.read
14
+ }
15
+ else
16
+ raise "Missing file " + file_name
17
+ end
18
+ end
19
+ end
20
+
21
+ end
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
4
+ "DTD/xhtml1-strict.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <title>This is the title</title>
8
+ <link rel="schema.DC" href="http://purl.org/DC/elements/1.0/" />
9
+ </head>
10
+ <body>
11
+ <p>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a>
12
+ document.</p>
13
+ </body>
14
+ </html>
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.11
3
+ specification_version: 1
4
+ name: raakt
5
+ version: !ruby/object:Gem::Version
6
+ version: "0.1"
7
+ date: 2006-07-11 00:00:00 +02:00
8
+ summary: A toolkit to find accessibility issues in HTML documents.
9
+ require_paths:
10
+ - lib
11
+ email: peter.krantzNODAMNSPAM@gmail.com
12
+ homepage: http://peterkrantz.com/projects/raakt
13
+ rubyforge_project: raakt
14
+ description:
15
+ autorequire: raakt
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.8.2
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ authors:
29
+ - Peter Krantz
30
+ files:
31
+ - lib/raakt.rb
32
+ - tests/empty.htm
33
+ - tests/emptytitledoc.htm
34
+ - tests/fielddoc1.htm
35
+ - tests/fielddoc2.htm
36
+ - tests/fielddoc3.htm
37
+ - tests/flickerdoc1.htm
38
+ - tests/framedoc1.htm
39
+ - tests/framedoc2.htm
40
+ - tests/full_google.htm
41
+ - tests/headingsdoc1.htm
42
+ - tests/headingsdoc2.htm
43
+ - tests/headingsdoc3.htm
44
+ - tests/headingsdoc4.htm
45
+ - tests/headingsdoc5.htm
46
+ - tests/headingsdoc6.htm
47
+ - tests/headingsdoc7.htm
48
+ - tests/headingsdoc8.htm
49
+ - tests/headingsdoc9.htm
50
+ - tests/imagedoc1.htm
51
+ - tests/imagedoc2.htm
52
+ - tests/imagedoc3.htm
53
+ - tests/imagedoc4.htm
54
+ - tests/invalidelements1.htm
55
+ - tests/invalidhtmldoc1.htm
56
+ - tests/invalidhtmldoc2.htm
57
+ - tests/invalidxhtmldoc1.htm
58
+ - tests/linkdoc1.htm
59
+ - tests/linkdoc2.htm
60
+ - tests/linkdoc3.htm
61
+ - tests/linkdoc4.htm
62
+ - tests/metarefreshdoc1.htm
63
+ - tests/metarefreshdoc2.htm
64
+ - tests/metarefreshdoc3.htm
65
+ - tests/nestedcomment.htm
66
+ - tests/newlinetext.txt
67
+ - tests/raakt_test.rb
68
+ - tests/scriptdoc1.htm
69
+ - tests/scriptdoc2.htm
70
+ - tests/tabledoc1.htm
71
+ - tests/tabledoc2.htm
72
+ - tests/tabledoc3.htm
73
+ - tests/tabledoc4.htm
74
+ - tests/tabledoc5.htm
75
+ - tests/tabledoc6.htm
76
+ - tests/tablelayoutdoc.htm
77
+ - tests/test_helper.rb
78
+ - tests/xhtmldoc1.htm
79
+ test_files:
80
+ - tests/raakt_test.rb
81
+ rdoc_options: []
82
+
83
+ extra_rdoc_files: []
84
+
85
+ executables: []
86
+
87
+ extensions: []
88
+
89
+ requirements: []
90
+
91
+ dependencies:
92
+ - !ruby/object:Gem::Dependency
93
+ name: rubyful_soup
94
+ version_requirement:
95
+ version_requirements: !ruby/object:Gem::Version::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 1.0.4
100
+ version: