{"action":"created","comment":{"url":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/comments/41002887","id":41002887,"diff_hunk":"@@ -0,0 +1,144 @@\n+/* jshint maxlen:120 */\n+/* global sinon, suite, setup, teardown, test, assert, d1, d2, d3, d4 */\n+\n+suite('GaiaDialog', function() {\n+  'use strict';\n+\n+  var accessibility = window['test-utils'].accessibility;\n+\n+  function openDialog(dialog) {\n+    return new Promise(resolve => {\n+      function onOpened() {\n+        dialog.removeEventListener('opened', onOpened);\n+        resolve();\n+      }\n+      dialog.addEventListener('opened', onOpened);\n+      dialog.open();\n+    });\n+  }\n+\n+  function closeDialog(dialog) {\n+    return new Promise(resolve => {\n+      function onClosed() {\n+        dialog.removeEventListener('closed', onClosed);\n+        resolve();\n+      }\n+      dialog.addEventListener('closed', onClosed);\n+      dialog.close();\n+    });\n+  }\n+\n+  setup(function() {\n+    this.sandbox = sinon.sandbox.create();\n+    this.container = document.createElement('div');\n+    this.container.innerHTML = `\n+      <gaia-dialog id=\"d1\">\n+        <h1>Main Heading</h1>\n+        <h2>Sub Heading</h2>\n+        <p>Lorem ipsum dolor sit amet, ...</p>\n+        <button on-click=\"close\">Action</button>\n+        <button on-click=\"close\">Cancel</button>\n+      </gaia-dialog>\n+\n+      <gaia-dialog-select id=\"d2\">\n+        <h1>Ring tone</h1>\n+        <li>Classic prism</li>\n+        <li>Wallphone</li>\n+        <li>Disco drive</li>\n+        <li>Touchmatic</li>\n+        <li>Classic courier</li>\n+        <li>Hacker</li>\n+      </gaia-dialog-select>\n+\n+      <gaia-dialog-select multiple id=\"d3\">\n+        <h1>Ring tone</h1>\n+        <li>Classic prism</li>\n+        <li>Wallphone</li>\n+        <li>Disco drive</li>\n+        <li>Touchmatic</li>\n+        <li>Classic courier</li>\n+        <li>Hacker</li>\n+      </gaia-dialog-select>\n+\n+      <gaia-dialog-menu id=\"d4\">\n+        <button on-click=\"close\" data-icon=\"firefox\">Open in new window</button>\n+        <button on-click=\"close\" data-icon=\"firefox\">Add to Home Screen</button>\n+        <button on-click=\"close\" data-icon=\"firefox\">Share link</button>\n+        <button on-click=\"close\" data-icon=\"firefox\">Settings</button>\n+      </gaia-dialog-menu>`;\n+\n+    this.dialogs = this.container.querySelectorAll('gaia-dialog');\n+    document.body.appendChild(this.container);\n+  });\n+\n+  teardown(function() {\n+    this.sandbox.restore();\n+    document.body.removeChild(this.container);\n+    this.container = null;\n+  });\n+\n+  suite('accessibility', function() {\n+    /**\n+     * Accessibility test utils module tests the following things, amongst other\n+     * checks (all at once).:\n+     *  - ARIA attributes specific checks\n+     *  - accesskey uniqueness if applicable\n+     *  - Presence of alternative descriptions, labels and names\n+     *  - Color contrast\n+     *  - Markup is semantically correct from a11y standpoint","path":"test/test-unit.js","position":88,"original_position":88,"commit_id":"a683ded29cecaddaef07b7186d3f3805b67841a6","original_commit_id":"a683ded29cecaddaef07b7186d3f3805b67841a6","user":{"login":"wilsonpage","id":1020551,"avatar_url":"https://avatars.githubusercontent.com/u/1020551?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonpage","html_url":"https://github.com/wilsonpage","followers_url":"https://api.github.com/users/wilsonpage/followers","following_url":"https://api.github.com/users/wilsonpage/following{/other_user}","gists_url":"https://api.github.com/users/wilsonpage/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonpage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonpage/subscriptions","organizations_url":"https://api.github.com/users/wilsonpage/orgs","repos_url":"https://api.github.com/users/wilsonpage/repos","events_url":"https://api.github.com/users/wilsonpage/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonpage/received_events","type":"User","site_admin":false},"body":"How can it know markup is correct without knowing component's intent?","created_at":"2015-10-02T09:03:50Z","updated_at":"2015-10-02T09:03:50Z","html_url":"https://github.com/gaia-components/gaia-dialog/pull/14#discussion_r41002887","pull_request_url":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/comments/41002887"},"html":{"href":"https://github.com/gaia-components/gaia-dialog/pull/14#discussion_r41002887"},"pull_request":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/14","id":46425706,"html_url":"https://github.com/gaia-components/gaia-dialog/pull/14","diff_url":"https://github.com/gaia-components/gaia-dialog/pull/14.diff","patch_url":"https://github.com/gaia-components/gaia-dialog/pull/14.patch","issue_url":"https://api.github.com/repos/gaia-components/gaia-dialog/issues/14","number":14,"state":"open","locked":false,"title":"Bug 1210020 - some improvements to dialog's accessibility (semantics)…","user":{"login":"yzen","id":561275,"avatar_url":"https://avatars.githubusercontent.com/u/561275?v=3","gravatar_id":"","url":"https://api.github.com/users/yzen","html_url":"https://github.com/yzen","followers_url":"https://api.github.com/users/yzen/followers","following_url":"https://api.github.com/users/yzen/following{/other_user}","gists_url":"https://api.github.com/users/yzen/gists{/gist_id}","starred_url":"https://api.github.com/users/yzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yzen/subscriptions","organizations_url":"https://api.github.com/users/yzen/orgs","repos_url":"https://api.github.com/users/yzen/repos","events_url":"https://api.github.com/users/yzen/events{/privacy}","received_events_url":"https://api.github.com/users/yzen/received_events","type":"User","site_admin":false},"body":"…. Added unit and integration tests.","created_at":"2015-09-30T16:36:12Z","updated_at":"2015-10-02T09:03:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"433b576c724a4ada753e69edeaeb13905518e314","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/14/commits","review_comments_url":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/14/comments","review_comment_url":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gaia-components/gaia-dialog/issues/14/comments","statuses_url":"https://api.github.com/repos/gaia-components/gaia-dialog/statuses/a683ded29cecaddaef07b7186d3f3805b67841a6","head":{"label":"yzen:bug-1210020","ref":"bug-1210020","sha":"a683ded29cecaddaef07b7186d3f3805b67841a6","user":{"login":"yzen","id":561275,"avatar_url":"https://avatars.githubusercontent.com/u/561275?v=3","gravatar_id":"","url":"https://api.github.com/users/yzen","html_url":"https://github.com/yzen","followers_url":"https://api.github.com/users/yzen/followers","following_url":"https://api.github.com/users/yzen/following{/other_user}","gists_url":"https://api.github.com/users/yzen/gists{/gist_id}","starred_url":"https://api.github.com/users/yzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yzen/subscriptions","organizations_url":"https://api.github.com/users/yzen/orgs","repos_url":"https://api.github.com/users/yzen/repos","events_url":"https://api.github.com/users/yzen/events{/privacy}","received_events_url":"https://api.github.com/users/yzen/received_events","type":"User","site_admin":false},"repo":{"id":43005227,"name":"gaia-dialog","full_name":"yzen/gaia-dialog","owner":{"login":"yzen","id":561275,"avatar_url":"https://avatars.githubusercontent.com/u/561275?v=3","gravatar_id":"","url":"https://api.github.com/users/yzen","html_url":"https://github.com/yzen","followers_url":"https://api.github.com/users/yzen/followers","following_url":"https://api.github.com/users/yzen/following{/other_user}","gists_url":"https://api.github.com/users/yzen/gists{/gist_id}","starred_url":"https://api.github.com/users/yzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yzen/subscriptions","organizations_url":"https://api.github.com/users/yzen/orgs","repos_url":"https://api.github.com/users/yzen/repos","events_url":"https://api.github.com/users/yzen/events{/privacy}","received_events_url":"https://api.github.com/users/yzen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yzen/gaia-dialog","description":"","fork":true,"url":"https://api.github.com/repos/yzen/gaia-dialog","forks_url":"https://api.github.com/repos/yzen/gaia-dialog/forks","keys_url":"https://api.github.com/repos/yzen/gaia-dialog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yzen/gaia-dialog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yzen/gaia-dialog/teams","hooks_url":"https://api.github.com/repos/yzen/gaia-dialog/hooks","issue_events_url":"https://api.github.com/repos/yzen/gaia-dialog/issues/events{/number}","events_url":"https://api.github.com/repos/yzen/gaia-dialog/events","assignees_url":"https://api.github.com/repos/yzen/gaia-dialog/assignees{/user}","branches_url":"https://api.github.com/repos/yzen/gaia-dialog/branches{/branch}","tags_url":"https://api.github.com/repos/yzen/gaia-dialog/tags","blobs_url":"https://api.github.com/repos/yzen/gaia-dialog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yzen/gaia-dialog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yzen/gaia-dialog/git/refs{/sha}","trees_url":"https://api.github.com/repos/yzen/gaia-dialog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yzen/gaia-dialog/statuses/{sha}","languages_url":"https://api.github.com/repos/yzen/gaia-dialog/languages","stargazers_url":"https://api.github.com/repos/yzen/gaia-dialog/stargazers","contributors_url":"https://api.github.com/repos/yzen/gaia-dialog/contributors","subscribers_url":"https://api.github.com/repos/yzen/gaia-dialog/subscribers","subscription_url":"https://api.github.com/repos/yzen/gaia-dialog/subscription","commits_url":"https://api.github.com/repos/yzen/gaia-dialog/commits{/sha}","git_commits_url":"https://api.github.com/repos/yzen/gaia-dialog/git/commits{/sha}","comments_url":"https://api.github.com/repos/yzen/gaia-dialog/comments{/number}","issue_comment_url":"https://api.github.com/repos/yzen/gaia-dialog/issues/comments{/number}","contents_url":"https://api.github.com/repos/yzen/gaia-dialog/contents/{+path}","compare_url":"https://api.github.com/repos/yzen/gaia-dialog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yzen/gaia-dialog/merges","archive_url":"https://api.github.com/repos/yzen/gaia-dialog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yzen/gaia-dialog/downloads","issues_url":"https://api.github.com/repos/yzen/gaia-dialog/issues{/number}","pulls_url":"https://api.github.com/repos/yzen/gaia-dialog/pulls{/number}","milestones_url":"https://api.github.com/repos/yzen/gaia-dialog/milestones{/number}","notifications_url":"https://api.github.com/repos/yzen/gaia-dialog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yzen/gaia-dialog/labels{/name}","releases_url":"https://api.github.com/repos/yzen/gaia-dialog/releases{/id}","created_at":"2015-09-23T14:13:33Z","updated_at":"2015-09-23T14:13:33Z","pushed_at":"2015-09-30T16:31:51Z","git_url":"git://github.com/yzen/gaia-dialog.git","ssh_url":"git@github.com:yzen/gaia-dialog.git","clone_url":"https://github.com/yzen/gaia-dialog.git","svn_url":"https://github.com/yzen/gaia-dialog","homepage":null,"size":140,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gaia-components:master","ref":"master","sha":"9ddb3c1d3e4b52a09ec9ec373eb977536f0c645d","user":{"login":"gaia-components","id":7851599,"avatar_url":"https://avatars.githubusercontent.com/u/7851599?v=3","gravatar_id":"","url":"https://api.github.com/users/gaia-components","html_url":"https://github.com/gaia-components","followers_url":"https://api.github.com/users/gaia-components/followers","following_url":"https://api.github.com/users/gaia-components/following{/other_user}","gists_url":"https://api.github.com/users/gaia-components/gists{/gist_id}","starred_url":"https://api.github.com/users/gaia-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaia-components/subscriptions","organizations_url":"https://api.github.com/users/gaia-components/orgs","repos_url":"https://api.github.com/users/gaia-components/repos","events_url":"https://api.github.com/users/gaia-components/events{/privacy}","received_events_url":"https://api.github.com/users/gaia-components/received_events","type":"Organization","site_admin":false},"repo":{"id":21570752,"name":"gaia-dialog","full_name":"gaia-components/gaia-dialog","owner":{"login":"gaia-components","id":7851599,"avatar_url":"https://avatars.githubusercontent.com/u/7851599?v=3","gravatar_id":"","url":"https://api.github.com/users/gaia-components","html_url":"https://github.com/gaia-components","followers_url":"https://api.github.com/users/gaia-components/followers","following_url":"https://api.github.com/users/gaia-components/following{/other_user}","gists_url":"https://api.github.com/users/gaia-components/gists{/gist_id}","starred_url":"https://api.github.com/users/gaia-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaia-components/subscriptions","organizations_url":"https://api.github.com/users/gaia-components/orgs","repos_url":"https://api.github.com/users/gaia-components/repos","events_url":"https://api.github.com/users/gaia-components/events{/privacy}","received_events_url":"https://api.github.com/users/gaia-components/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gaia-components/gaia-dialog","description":"","fork":false,"url":"https://api.github.com/repos/gaia-components/gaia-dialog","forks_url":"https://api.github.com/repos/gaia-components/gaia-dialog/forks","keys_url":"https://api.github.com/repos/gaia-components/gaia-dialog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaia-components/gaia-dialog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaia-components/gaia-dialog/teams","hooks_url":"https://api.github.com/repos/gaia-components/gaia-dialog/hooks","issue_events_url":"https://api.github.com/repos/gaia-components/gaia-dialog/issues/events{/number}","events_url":"https://api.github.com/repos/gaia-components/gaia-dialog/events","assignees_url":"https://api.github.com/repos/gaia-components/gaia-dialog/assignees{/user}","branches_url":"https://api.github.com/repos/gaia-components/gaia-dialog/branches{/branch}","tags_url":"https://api.github.com/repos/gaia-components/gaia-dialog/tags","blobs_url":"https://api.github.com/repos/gaia-components/gaia-dialog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaia-components/gaia-dialog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaia-components/gaia-dialog/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaia-components/gaia-dialog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaia-components/gaia-dialog/statuses/{sha}","languages_url":"https://api.github.com/repos/gaia-components/gaia-dialog/languages","stargazers_url":"https://api.github.com/repos/gaia-components/gaia-dialog/stargazers","contributors_url":"https://api.github.com/repos/gaia-components/gaia-dialog/contributors","subscribers_url":"https://api.github.com/repos/gaia-components/gaia-dialog/subscribers","subscription_url":"https://api.github.com/repos/gaia-components/gaia-dialog/subscription","commits_url":"https://api.github.com/repos/gaia-components/gaia-dialog/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaia-components/gaia-dialog/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaia-components/gaia-dialog/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaia-components/gaia-dialog/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaia-components/gaia-dialog/contents/{+path}","compare_url":"https://api.github.com/repos/gaia-components/gaia-dialog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaia-components/gaia-dialog/merges","archive_url":"https://api.github.com/repos/gaia-components/gaia-dialog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaia-components/gaia-dialog/downloads","issues_url":"https://api.github.com/repos/gaia-components/gaia-dialog/issues{/number}","pulls_url":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls{/number}","milestones_url":"https://api.github.com/repos/gaia-components/gaia-dialog/milestones{/number}","notifications_url":"https://api.github.com/repos/gaia-components/gaia-dialog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaia-components/gaia-dialog/labels{/name}","releases_url":"https://api.github.com/repos/gaia-components/gaia-dialog/releases{/id}","created_at":"2014-07-07T13:03:56Z","updated_at":"2015-04-17T13:29:20Z","pushed_at":"2015-09-30T16:36:12Z","git_url":"git://github.com/gaia-components/gaia-dialog.git","ssh_url":"git@github.com:gaia-components/gaia-dialog.git","clone_url":"https://github.com/gaia-components/gaia-dialog.git","svn_url":"https://github.com/gaia-components/gaia-dialog","homepage":null,"size":414,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":4,"forks":6,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/14"},"html":{"href":"https://github.com/gaia-components/gaia-dialog/pull/14"},"issue":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/issues/14"},"comments":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/gaia-components/gaia-dialog/statuses/a683ded29cecaddaef07b7186d3f3805b67841a6"}}}}