{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/comments/37656954","id":37656954,"diff_hunk":"@@ -0,0 +1,81 @@\n+// Copyright 2015 Google Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//      http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+goog.require('axs.AuditRules');\n+goog.require('axs.browserUtils');\n+goog.require('axs.constants.Severity');\n+\n+(function () {\n+    function tableDoesNotHaveHeaderRow(rows) {\n+        var headerRow = rows[0];\n+\n+        var headerCells = headerRow.children;\n+\n+        for (var i = 0; i < headerCells.length; i++) {\n+            if (headerCells[i].tagName != 'TH') {\n+                return true;\n+            }\n+        }\n+        return false;\n+    }\n+\n+    function tableDoesNotHaveHeaderColumn(rows) {\n+        for (var i = 0; i < rows.length; i++) {\n+            if (rows[i].children[0].tagName != 'TH') {\n+                return true;\n+            }\n+        }\n+        return false;\n+    }\n+\n+    function tableDoesNotHaveGridLayout(rows) {\n+        var headerCells = rows[0].children;\n+\n+        for (var i = 1; i < headerCells.length; i++) {\n+            if (headerCells[i].tagName != 'TH') {\n+                return true;\n+            }\n+        }\n+\n+        for (var i = 1; i < rows.length; i++) {\n+            if (rows[i].children[0].tagName != 'TH') {\n+                return true;\n+            }\n+        }\n+        return false;\n+    }\n+\n+    axs.AuditRules.addRule({\n+        name: 'dataTableHeadersMissing',\n+        heading: 'Data tables should have appropriate headers',\n+        url: 'https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_table_01',\n+        severity: axs.constants.Severity.SEVERE,\n+        relevantElementMatcher: function (element) {\n+            return axs.browserUtils.matchSelector(element, 'table');","path":"src/audits/DataTableHeadersMissing.js","position":65,"original_position":65,"commit_id":"0844479562fe3efea89e5ce9c7a161b046829233","original_commit_id":"0844479562fe3efea89e5ce9c7a161b046829233","user":{"login":"alice","id":95208,"avatar_url":"https://avatars.githubusercontent.com/u/95208?v=3","gravatar_id":"","url":"https://api.github.com/users/alice","html_url":"https://github.com/alice","followers_url":"https://api.github.com/users/alice/followers","following_url":"https://api.github.com/users/alice/following{/other_user}","gists_url":"https://api.github.com/users/alice/gists{/gist_id}","starred_url":"https://api.github.com/users/alice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alice/subscriptions","organizations_url":"https://api.github.com/users/alice/orgs","repos_url":"https://api.github.com/users/alice/repos","events_url":"https://api.github.com/users/alice/events{/privacy}","received_events_url":"https://api.github.com/users/alice/received_events","type":"User","site_admin":false},"body":"Either this should select for only data tables, or else the heading of this rule is confusing. I see you check for `<th>` on non-data tables below; perhaps this rule should be non-opinionated about the non-data table case, and exclude them here?","created_at":"2015-08-21T17:27:29Z","updated_at":"2015-08-21T17:27:29Z","html_url":"https://github.com/GoogleChrome/accessibility-developer-tools/pull/218#discussion_r37656954","pull_request_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/218","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/comments/37656954"},"html":{"href":"https://github.com/GoogleChrome/accessibility-developer-tools/pull/218#discussion_r37656954"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/218"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/218","id":41290971,"html_url":"https://github.com/GoogleChrome/accessibility-developer-tools/pull/218","diff_url":"https://github.com/GoogleChrome/accessibility-developer-tools/pull/218.diff","patch_url":"https://github.com/GoogleChrome/accessibility-developer-tools/pull/218.patch","issue_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/issues/218","number":218,"state":"open","locked":false,"title":"Add \"dataTableHeadersMissing\" audit rule.","user":{"login":"atomanyih","id":2305345,"avatar_url":"https://avatars.githubusercontent.com/u/2305345?v=3","gravatar_id":"","url":"https://api.github.com/users/atomanyih","html_url":"https://github.com/atomanyih","followers_url":"https://api.github.com/users/atomanyih/followers","following_url":"https://api.github.com/users/atomanyih/following{/other_user}","gists_url":"https://api.github.com/users/atomanyih/gists{/gist_id}","starred_url":"https://api.github.com/users/atomanyih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomanyih/subscriptions","organizations_url":"https://api.github.com/users/atomanyih/orgs","repos_url":"https://api.github.com/users/atomanyih/repos","events_url":"https://api.github.com/users/atomanyih/events{/privacy}","received_events_url":"https://api.github.com/users/atomanyih/received_events","type":"User","site_admin":false},"body":"This rule tests for compliance with [Section 508 #1194.22g](http://www.section508.gov/content/learn/standards/quick-reference-guide#1194.22g)\r\n\r\nWe also added [an entry to the wiki](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_table_01)\r\n\r\n@matt-royal","created_at":"2015-07-30T22:48:43Z","updated_at":"2015-08-21T17:27:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29dbbaa146007d17ee0265745340d2b637bc15c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/218/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/218/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/issues/218/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/statuses/0844479562fe3efea89e5ce9c7a161b046829233","head":{"label":"pivotal-cf:data_table_headers_missing","ref":"data_table_headers_missing","sha":"0844479562fe3efea89e5ce9c7a161b046829233","user":{"login":"pivotal-cf","id":5497370,"avatar_url":"https://avatars.githubusercontent.com/u/5497370?v=3","gravatar_id":"","url":"https://api.github.com/users/pivotal-cf","html_url":"https://github.com/pivotal-cf","followers_url":"https://api.github.com/users/pivotal-cf/followers","following_url":"https://api.github.com/users/pivotal-cf/following{/other_user}","gists_url":"https://api.github.com/users/pivotal-cf/gists{/gist_id}","starred_url":"https://api.github.com/users/pivotal-cf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivotal-cf/subscriptions","organizations_url":"https://api.github.com/users/pivotal-cf/orgs","repos_url":"https://api.github.com/users/pivotal-cf/repos","events_url":"https://api.github.com/users/pivotal-cf/events{/privacy}","received_events_url":"https://api.github.com/users/pivotal-cf/received_events","type":"Organization","site_admin":false},"repo":{"id":39910022,"name":"accessibility-developer-tools","full_name":"pivotal-cf/accessibility-developer-tools","owner":{"login":"pivotal-cf","id":5497370,"avatar_url":"https://avatars.githubusercontent.com/u/5497370?v=3","gravatar_id":"","url":"https://api.github.com/users/pivotal-cf","html_url":"https://github.com/pivotal-cf","followers_url":"https://api.github.com/users/pivotal-cf/followers","following_url":"https://api.github.com/users/pivotal-cf/following{/other_user}","gists_url":"https://api.github.com/users/pivotal-cf/gists{/gist_id}","starred_url":"https://api.github.com/users/pivotal-cf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivotal-cf/subscriptions","organizations_url":"https://api.github.com/users/pivotal-cf/orgs","repos_url":"https://api.github.com/users/pivotal-cf/repos","events_url":"https://api.github.com/users/pivotal-cf/events{/privacy}","received_events_url":"https://api.github.com/users/pivotal-cf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pivotal-cf/accessibility-developer-tools","description":"","fork":true,"url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools","forks_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/forks","keys_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/teams","hooks_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/hooks","issue_events_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/issues/events{/number}","events_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/events","assignees_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/assignees{/user}","branches_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/branches{/branch}","tags_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/tags","blobs_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/languages","stargazers_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/stargazers","contributors_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/contributors","subscribers_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/subscribers","subscription_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/subscription","commits_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/contents/{+path}","compare_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/merges","archive_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/downloads","issues_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/issues{/number}","pulls_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/labels{/name}","releases_url":"https://api.github.com/repos/pivotal-cf/accessibility-developer-tools/releases{/id}","created_at":"2015-07-29T18:39:16Z","updated_at":"2015-07-29T18:39:16Z","pushed_at":"2015-08-21T16:36:21Z","git_url":"git://github.com/pivotal-cf/accessibility-developer-tools.git","ssh_url":"git@github.com:pivotal-cf/accessibility-developer-tools.git","clone_url":"https://github.com/pivotal-cf/accessibility-developer-tools.git","svn_url":"https://github.com/pivotal-cf/accessibility-developer-tools","homepage":"","size":1048,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"be09ad2ad9f6da0400287c28a632fc67aee04812","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":11378642,"name":"accessibility-developer-tools","full_name":"GoogleChrome/accessibility-developer-tools","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/accessibility-developer-tools","description":"","fork":false,"url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools","forks_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/forks","keys_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/events","assignees_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/merges","archive_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/releases{/id}","created_at":"2013-07-12T21:40:22Z","updated_at":"2015-08-21T11:06:25Z","pushed_at":"2015-08-21T16:37:50Z","git_url":"git://github.com/GoogleChrome/accessibility-developer-tools.git","ssh_url":"git@github.com:GoogleChrome/accessibility-developer-tools.git","clone_url":"https://github.com/GoogleChrome/accessibility-developer-tools.git","svn_url":"https://github.com/GoogleChrome/accessibility-developer-tools","homepage":"","size":2256,"stargazers_count":478,"watchers_count":478,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":72,"mirror_url":null,"open_issues_count":45,"forks":72,"open_issues":45,"watchers":478,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/218"},"html":{"href":"https://github.com/GoogleChrome/accessibility-developer-tools/pull/218"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/issues/218"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/issues/218/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/218/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/pulls/218/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/accessibility-developer-tools/statuses/0844479562fe3efea89e5ce9c7a161b046829233"}}}}