{"action":"created","comment":{"url":"https://api.github.com/repos/dequelabs/axe-core/pulls/comments/208143850","pull_request_review_id":143893097,"id":208143850,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODE0Mzg1MA==","diff_hunk":"@@ -0,0 +1,171 @@\n+describe('aria.getRole', function() {\n+\t'use strict';\n+\tvar aria = axe.commons.aria;\n+\tvar roleDefinitions = aria.lookupTable.role;\n+\n+\tvar orig;\n+\tbeforeEach(function() {\n+\t\torig = axe.commons.aria.lookupTable.role;\n+\t});\n+\n+\tafterEach(function() {\n+\t\taxe.commons.aria.lookupTable.role = orig;\n+\t});\n+\n+\tit('returns valid roles', function() {\n+\t\tvar node = document.createElement('div');\n+\t\tnode.setAttribute('role', 'button');\n+\t\tassert.equal(aria.getRole(node), 'button');\n+\t});\n+\n+\tit('handles case sensitivity', function() {\n+\t\tvar node = document.createElement('div');\n+\t\tnode.setAttribute('role', 'BUTTON');\n+\t\tassert.equal(aria.getRole(node), 'button');\n+\t});\n+\n+\tit('handles whitespacing', function() {\n+\t\tvar node = document.createElement('div');\n+\t\tnode.setAttribute('role', ' button  ');\n+\t\tassert.equal(aria.getRole(node), 'button');\n+\t});\n+\n+\tit('returns null when there is no role', function() {\n+\t\tvar node = document.createElement('div');\n+\t\tassert.isNull(aria.getRole(node));\n+\t});\n+\n+\tit('returns the explit role if it is valid and non-abstract', function() {\n+\t\tvar node = document.createElement('li');\n+\t\tnode.setAttribute('role', 'menuitem');\n+\t\tassert.equal(aria.getRole(node), 'menuitem');\n+\t});\n+\n+\tit('returns the implicit role if the explicit is invalid', function() {\n+\t\tvar node = document.createElement('li');\n+\t\tnode.setAttribute('role', 'foobar');\n+\t\tassert.equal(aria.getRole(node), 'listitem');\n+\t});\n+\n+\tit('ignores tokenlists by default', function() {\n+\t\tvar node = document.createElement('div');\n+\t\tnode.setAttribute('role', 'spinbutton button');\n+\t\tassert.isNull(aria.getRole(node));\n+\t});\n+\n+\tdescribe('noImplicit', function() {\n+\t\tit('returns the implicit role by default', function() {\n+\t\t\tvar node = document.createElement('li');\n+\t\t\tassert.equal(aria.getRole(node), 'listitem');\n+\t\t});\n+\n+\t\tit('returns null rather than the implicit role with `noImplicit: true`', function() {\n+\t\t\tvar node = document.createElement('li');\n+\t\t\tassert.isNull(aria.getRole(node, { noImplicit: true }));\n+\t\t});\n+\n+\t\tit('still returns the explicit role', function() {\n+\t\t\tvar node = document.createElement('li', { noImplicit: true });","path":"test/commons/aria/get-role.js","position":68,"original_position":68,"commit_id":"fb2aa468acf975dde574691449eb3748d18e137c","original_commit_id":"fb2aa468acf975dde574691449eb3748d18e137c","user":{"login":"WilcoFiers","id":530687,"node_id":"MDQ6VXNlcjUzMDY4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/530687?v=4","gravatar_id":"","url":"https://api.github.com/users/WilcoFiers","html_url":"https://github.com/WilcoFiers","followers_url":"https://api.github.com/users/WilcoFiers/followers","following_url":"https://api.github.com/users/WilcoFiers/following{/other_user}","gists_url":"https://api.github.com/users/WilcoFiers/gists{/gist_id}","starred_url":"https://api.github.com/users/WilcoFiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilcoFiers/subscriptions","organizations_url":"https://api.github.com/users/WilcoFiers/orgs","repos_url":"https://api.github.com/users/WilcoFiers/repos","events_url":"https://api.github.com/users/WilcoFiers/events{/privacy}","received_events_url":"https://api.github.com/users/WilcoFiers/received_events","type":"User","site_admin":false},"body":"Yikes! Indeed it is.","created_at":"2018-08-07T08:37:36Z","updated_at":"2018-08-07T08:37:36Z","html_url":"https://github.com/dequelabs/axe-core/pull/1017#discussion_r208143850","pull_request_url":"https://api.github.com/repos/dequelabs/axe-core/pulls/1017","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dequelabs/axe-core/pulls/comments/208143850"},"html":{"href":"https://github.com/dequelabs/axe-core/pull/1017#discussion_r208143850"},"pull_request":{"href":"https://api.github.com/repos/dequelabs/axe-core/pulls/1017"}},"in_reply_to_id":208053233},"pull_request":{"url":"https://api.github.com/repos/dequelabs/axe-core/pulls/1017","id":202926338,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyOTI2MzM4","html_url":"https://github.com/dequelabs/axe-core/pull/1017","diff_url":"https://github.com/dequelabs/axe-core/pull/1017.diff","patch_url":"https://github.com/dequelabs/axe-core/pull/1017.patch","issue_url":"https://api.github.com/repos/dequelabs/axe-core/issues/1017","number":1017,"state":"open","locked":false,"title":"feat: Add aria.getRole method","user":{"login":"WilcoFiers","id":530687,"node_id":"MDQ6VXNlcjUzMDY4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/530687?v=4","gravatar_id":"","url":"https://api.github.com/users/WilcoFiers","html_url":"https://github.com/WilcoFiers","followers_url":"https://api.github.com/users/WilcoFiers/followers","following_url":"https://api.github.com/users/WilcoFiers/following{/other_user}","gists_url":"https://api.github.com/users/WilcoFiers/gists{/gist_id}","starred_url":"https://api.github.com/users/WilcoFiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilcoFiers/subscriptions","organizations_url":"https://api.github.com/users/WilcoFiers/orgs","repos_url":"https://api.github.com/users/WilcoFiers/repos","events_url":"https://api.github.com/users/WilcoFiers/events{/privacy}","received_events_url":"https://api.github.com/users/WilcoFiers/received_events","type":"User","site_admin":false},"body":"I've got some uses lined up for this. This function is over due :), and is going to help us deal with multiple roles properly at some point in the future.\r\n\r\nThis PR is awaiting merger of #1015.\r\n\r\nCloses issue: *none*\r\n\r\n## Reviewer checks\r\n\r\n**Required fields, to be filled out by PR reviewer(s)**\r\n- [x] Follows the commit message policy, appropriate for next version\r\n- [x] Has documentation updated, a DU ticket, or requires no documentation change\r\n- [x] Includes new tests, or was unnecessary\r\n- [x] Code is reviewed for security by: Jey (@jkodu)\r\n","created_at":"2018-07-20T18:39:59Z","updated_at":"2018-08-07T08:37:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df73c7c767b5dc5918f6e3148903ba56b1f8be75","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dylanb","id":79245,"node_id":"MDQ6VXNlcjc5MjQ1","avatar_url":"https://avatars3.githubusercontent.com/u/79245?v=4","gravatar_id":"","url":"https://api.github.com/users/dylanb","html_url":"https://github.com/dylanb","followers_url":"https://api.github.com/users/dylanb/followers","following_url":"https://api.github.com/users/dylanb/following{/other_user}","gists_url":"https://api.github.com/users/dylanb/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanb/subscriptions","organizations_url":"https://api.github.com/users/dylanb/orgs","repos_url":"https://api.github.com/users/dylanb/repos","events_url":"https://api.github.com/users/dylanb/events{/privacy}","received_events_url":"https://api.github.com/users/dylanb/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dequelabs/axe-core/pulls/1017/commits","review_comments_url":"https://api.github.com/repos/dequelabs/axe-core/pulls/1017/comments","review_comment_url":"https://api.github.com/repos/dequelabs/axe-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dequelabs/axe-core/issues/1017/comments","statuses_url":"https://api.github.com/repos/dequelabs/axe-core/statuses/fb2aa468acf975dde574691449eb3748d18e137c","head":{"label":"dequelabs:aria-getrole","ref":"aria-getrole","sha":"fb2aa468acf975dde574691449eb3748d18e137c","user":{"login":"dequelabs","id":4094299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwOTQyOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/4094299?v=4","gravatar_id":"","url":"https://api.github.com/users/dequelabs","html_url":"https://github.com/dequelabs","followers_url":"https://api.github.com/users/dequelabs/followers","following_url":"https://api.github.com/users/dequelabs/following{/other_user}","gists_url":"https://api.github.com/users/dequelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/dequelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dequelabs/subscriptions","organizations_url":"https://api.github.com/users/dequelabs/orgs","repos_url":"https://api.github.com/users/dequelabs/repos","events_url":"https://api.github.com/users/dequelabs/events{/privacy}","received_events_url":"https://api.github.com/users/dequelabs/received_events","type":"Organization","site_admin":false},"repo":{"id":37205440,"node_id":"MDEwOlJlcG9zaXRvcnkzNzIwNTQ0MA==","name":"axe-core","full_name":"dequelabs/axe-core","owner":{"login":"dequelabs","id":4094299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwOTQyOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/4094299?v=4","gravatar_id":"","url":"https://api.github.com/users/dequelabs","html_url":"https://github.com/dequelabs","followers_url":"https://api.github.com/users/dequelabs/followers","following_url":"https://api.github.com/users/dequelabs/following{/other_user}","gists_url":"https://api.github.com/users/dequelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/dequelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dequelabs/subscriptions","organizations_url":"https://api.github.com/users/dequelabs/orgs","repos_url":"https://api.github.com/users/dequelabs/repos","events_url":"https://api.github.com/users/dequelabs/events{/privacy}","received_events_url":"https://api.github.com/users/dequelabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dequelabs/axe-core","description":"Accessibility engine for automated Web UI testing","fork":false,"url":"https://api.github.com/repos/dequelabs/axe-core","forks_url":"https://api.github.com/repos/dequelabs/axe-core/forks","keys_url":"https://api.github.com/repos/dequelabs/axe-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dequelabs/axe-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dequelabs/axe-core/teams","hooks_url":"https://api.github.com/repos/dequelabs/axe-core/hooks","issue_events_url":"https://api.github.com/repos/dequelabs/axe-core/issues/events{/number}","events_url":"https://api.github.com/repos/dequelabs/axe-core/events","assignees_url":"https://api.github.com/repos/dequelabs/axe-core/assignees{/user}","branches_url":"https://api.github.com/repos/dequelabs/axe-core/branches{/branch}","tags_url":"https://api.github.com/repos/dequelabs/axe-core/tags","blobs_url":"https://api.github.com/repos/dequelabs/axe-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dequelabs/axe-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dequelabs/axe-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/dequelabs/axe-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dequelabs/axe-core/statuses/{sha}","languages_url":"https://api.github.com/repos/dequelabs/axe-core/languages","stargazers_url":"https://api.github.com/repos/dequelabs/axe-core/stargazers","contributors_url":"https://api.github.com/repos/dequelabs/axe-core/contributors","subscribers_url":"https://api.github.com/repos/dequelabs/axe-core/subscribers","subscription_url":"https://api.github.com/repos/dequelabs/axe-core/subscription","commits_url":"https://api.github.com/repos/dequelabs/axe-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/dequelabs/axe-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/dequelabs/axe-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/dequelabs/axe-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/dequelabs/axe-core/contents/{+path}","compare_url":"https://api.github.com/repos/dequelabs/axe-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dequelabs/axe-core/merges","archive_url":"https://api.github.com/repos/dequelabs/axe-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dequelabs/axe-core/downloads","issues_url":"https://api.github.com/repos/dequelabs/axe-core/issues{/number}","pulls_url":"https://api.github.com/repos/dequelabs/axe-core/pulls{/number}","milestones_url":"https://api.github.com/repos/dequelabs/axe-core/milestones{/number}","notifications_url":"https://api.github.com/repos/dequelabs/axe-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dequelabs/axe-core/labels{/name}","releases_url":"https://api.github.com/repos/dequelabs/axe-core/releases{/id}","deployments_url":"https://api.github.com/repos/dequelabs/axe-core/deployments","created_at":"2015-06-10T15:26:45Z","updated_at":"2018-08-06T13:57:50Z","pushed_at":"2018-08-07T08:35:56Z","git_url":"git://github.com/dequelabs/axe-core.git","ssh_url":"git@github.com:dequelabs/axe-core.git","clone_url":"https://github.com/dequelabs/axe-core.git","svn_url":"https://github.com/dequelabs/axe-core","homepage":"https://www.axe-core.org/","size":4630,"stargazers_count":1628,"watchers_count":1628,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":227,"mirror_url":null,"archived":false,"open_issues_count":150,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":227,"open_issues":150,"watchers":1628,"default_branch":"develop"}},"base":{"label":"dequelabs:develop","ref":"develop","sha":"2cece255e871e5017491e368cc992781dd00f87f","user":{"login":"dequelabs","id":4094299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwOTQyOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/4094299?v=4","gravatar_id":"","url":"https://api.github.com/users/dequelabs","html_url":"https://github.com/dequelabs","followers_url":"https://api.github.com/users/dequelabs/followers","following_url":"https://api.github.com/users/dequelabs/following{/other_user}","gists_url":"https://api.github.com/users/dequelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/dequelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dequelabs/subscriptions","organizations_url":"https://api.github.com/users/dequelabs/orgs","repos_url":"https://api.github.com/users/dequelabs/repos","events_url":"https://api.github.com/users/dequelabs/events{/privacy}","received_events_url":"https://api.github.com/users/dequelabs/received_events","type":"Organization","site_admin":false},"repo":{"id":37205440,"node_id":"MDEwOlJlcG9zaXRvcnkzNzIwNTQ0MA==","name":"axe-core","full_name":"dequelabs/axe-core","owner":{"login":"dequelabs","id":4094299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwOTQyOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/4094299?v=4","gravatar_id":"","url":"https://api.github.com/users/dequelabs","html_url":"https://github.com/dequelabs","followers_url":"https://api.github.com/users/dequelabs/followers","following_url":"https://api.github.com/users/dequelabs/following{/other_user}","gists_url":"https://api.github.com/users/dequelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/dequelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dequelabs/subscriptions","organizations_url":"https://api.github.com/users/dequelabs/orgs","repos_url":"https://api.github.com/users/dequelabs/repos","events_url":"https://api.github.com/users/dequelabs/events{/privacy}","received_events_url":"https://api.github.com/users/dequelabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dequelabs/axe-core","description":"Accessibility engine for automated Web UI testing","fork":false,"url":"https://api.github.com/repos/dequelabs/axe-core","forks_url":"https://api.github.com/repos/dequelabs/axe-core/forks","keys_url":"https://api.github.com/repos/dequelabs/axe-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dequelabs/axe-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dequelabs/axe-core/teams","hooks_url":"https://api.github.com/repos/dequelabs/axe-core/hooks","issue_events_url":"https://api.github.com/repos/dequelabs/axe-core/issues/events{/number}","events_url":"https://api.github.com/repos/dequelabs/axe-core/events","assignees_url":"https://api.github.com/repos/dequelabs/axe-core/assignees{/user}","branches_url":"https://api.github.com/repos/dequelabs/axe-core/branches{/branch}","tags_url":"https://api.github.com/repos/dequelabs/axe-core/tags","blobs_url":"https://api.github.com/repos/dequelabs/axe-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dequelabs/axe-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dequelabs/axe-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/dequelabs/axe-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dequelabs/axe-core/statuses/{sha}","languages_url":"https://api.github.com/repos/dequelabs/axe-core/languages","stargazers_url":"https://api.github.com/repos/dequelabs/axe-core/stargazers","contributors_url":"https://api.github.com/repos/dequelabs/axe-core/contributors","subscribers_url":"https://api.github.com/repos/dequelabs/axe-core/subscribers","subscription_url":"https://api.github.com/repos/dequelabs/axe-core/subscription","commits_url":"https://api.github.com/repos/dequelabs/axe-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/dequelabs/axe-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/dequelabs/axe-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/dequelabs/axe-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/dequelabs/axe-core/contents/{+path}","compare_url":"https://api.github.com/repos/dequelabs/axe-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dequelabs/axe-core/merges","archive_url":"https://api.github.com/repos/dequelabs/axe-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dequelabs/axe-core/downloads","issues_url":"https://api.github.com/repos/dequelabs/axe-core/issues{/number}","pulls_url":"https://api.github.com/repos/dequelabs/axe-core/pulls{/number}","milestones_url":"https://api.github.com/repos/dequelabs/axe-core/milestones{/number}","notifications_url":"https://api.github.com/repos/dequelabs/axe-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dequelabs/axe-core/labels{/name}","releases_url":"https://api.github.com/repos/dequelabs/axe-core/releases{/id}","deployments_url":"https://api.github.com/repos/dequelabs/axe-core/deployments","created_at":"2015-06-10T15:26:45Z","updated_at":"2018-08-06T13:57:50Z","pushed_at":"2018-08-07T08:35:56Z","git_url":"git://github.com/dequelabs/axe-core.git","ssh_url":"git@github.com:dequelabs/axe-core.git","clone_url":"https://github.com/dequelabs/axe-core.git","svn_url":"https://github.com/dequelabs/axe-core","homepage":"https://www.axe-core.org/","size":4630,"stargazers_count":1628,"watchers_count":1628,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":227,"mirror_url":null,"archived":false,"open_issues_count":150,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":227,"open_issues":150,"watchers":1628,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/dequelabs/axe-core/pulls/1017"},"html":{"href":"https://github.com/dequelabs/axe-core/pull/1017"},"issue":{"href":"https://api.github.com/repos/dequelabs/axe-core/issues/1017"},"comments":{"href":"https://api.github.com/repos/dequelabs/axe-core/issues/1017/comments"},"review_comments":{"href":"https://api.github.com/repos/dequelabs/axe-core/pulls/1017/comments"},"review_comment":{"href":"https://api.github.com/repos/dequelabs/axe-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dequelabs/axe-core/pulls/1017/commits"},"statuses":{"href":"https://api.github.com/repos/dequelabs/axe-core/statuses/fb2aa468acf975dde574691449eb3748d18e137c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"WilcoFiers"}}