{"action":"created","comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/176018452","pull_request_review_id":105644914,"id":176018452,"diff_hunk":"@@ -84,6 +86,10 @@ const effects = {\n \t\t} )\n \t\t\t.then( () => store.dispatch( metaBoxUpdatesSuccess() ) );\n \t},\n+\tSWITCH_MODE( action ) {","path":"edit-post/store/effects.js","position":13,"original_position":13,"commit_id":"c387d5162f850ab35c3fe26b66f76ec5b8862d5e","original_commit_id":"c387d5162f850ab35c3fe26b66f76ec5b8862d5e","user":{"login":"youknowriad","id":272444,"avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"body":"Looks like a good usage of effects for me 👍 ","created_at":"2018-03-21T09:20:02Z","updated_at":"2018-03-21T09:20:02Z","html_url":"https://github.com/WordPress/gutenberg/pull/5715#discussion_r176018452","pull_request_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/5715","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/176018452"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/5715#discussion_r176018452"},"pull_request":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/5715"}}},"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/5715","id":176248366,"html_url":"https://github.com/WordPress/gutenberg/pull/5715","diff_url":"https://github.com/WordPress/gutenberg/pull/5715.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/5715.patch","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5715","number":5715,"state":"open","locked":false,"title":"Menu items toggle a11y improvements","user":{"login":"afercia","id":1682452,"avatar_url":"https://avatars1.githubusercontent.com/u/1682452?v=4","gravatar_id":"","url":"https://api.github.com/users/afercia","html_url":"https://github.com/afercia","followers_url":"https://api.github.com/users/afercia/followers","following_url":"https://api.github.com/users/afercia/following{/other_user}","gists_url":"https://api.github.com/users/afercia/gists{/gist_id}","starred_url":"https://api.github.com/users/afercia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afercia/subscriptions","organizations_url":"https://api.github.com/users/afercia/orgs","repos_url":"https://api.github.com/users/afercia/repos","events_url":"https://api.github.com/users/afercia/events{/privacy}","received_events_url":"https://api.github.com/users/afercia/received_events","type":"User","site_admin":false},"body":"This PR tries to improve the accessibility of the `MenuItemsToggle` buttons and tries to add a `speak` message for screen reader users to confirm when they switch editor mode. Thanks to the feedback from the accessibility testers, see #5699 and #5700.\r\n\r\n1\r\nto indicate the actual state of the `MenuItemsToggle`, adds an `aria-pressed` attribute on the buttons. This works pretty well with screen readers, see screenshots:\r\n\r\n![screen shot 2018-03-20 at 15 35 00](https://user-images.githubusercontent.com/1682452/37667680-d93b33da-2c62-11e8-9335-07c5bff9143c.png)\r\n![screen shot 2018-03-20 at 15 35 05](https://user-images.githubusercontent.com/1682452/37667681-d958a406-2c62-11e8-8e25-a68e61cb3f6a.png)\r\n![screen shot 2018-03-20 at 15 35 31](https://user-images.githubusercontent.com/1682452/37667682-d9745304-2c62-11e8-8c29-cc75de31f0e1.png)\r\n\r\nAs mentioned in the related issue, for buttons the most appropriate ARIA attribute is `aria-pressed` https://www.w3.org/TR/wai-aria-1.1/#aria-pressed as `aria-selected` is not used for buttons https://www.w3.org/TR/wai-aria-1.1/#aria-selected\r\n\r\n2\r\nI've tried to add a `speak` message when switching editor mode. The switch happens:\r\n- via shortcut `mod+Shift+Alt+M`\r\n- when activating the toggle buttons\r\n\r\nIn order to implement the message just once, I'm doing it in the  \"effects\" where the `SWITCH_MODE` action is available. I've seen `speak` is already used in `editor/store/effects.js` and tried to follow a similar approach. I really don't know if this is a desired pattern or the best option, any feedback and suggestions are very welcome.\r\n\r\nFixes #5699 \r\nFixes #5700 ","created_at":"2018-03-20T16:28:05Z","updated_at":"2018-03-21T09:20:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e634af243de4e761c92a4b51b4f90e2e4644f50","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":546517042,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/Accessibility","name":"Accessibility","color":"655104","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/5715/commits","review_comments_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/5715/comments","review_comment_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5715/comments","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/c387d5162f850ab35c3fe26b66f76ec5b8862d5e","head":{"label":"WordPress:update/menu-items-toggle-a11y-improvements","ref":"update/menu-items-toggle-a11y-improvements","sha":"c387d5162f850ab35c3fe26b66f76ec5b8862d5e","user":{"login":"WordPress","id":276006,"avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"name":"gutenberg","full_name":"WordPress/gutenberg","owner":{"login":"WordPress","id":276006,"avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Beta plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-03-21T09:08:15Z","pushed_at":"2018-03-21T09:19:35Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/ ","size":11625,"stargazers_count":2151,"watchers_count":2151,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":502,"mirror_url":null,"archived":false,"open_issues_count":813,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":502,"open_issues":813,"watchers":2151,"default_branch":"master"}},"base":{"label":"WordPress:master","ref":"master","sha":"f4cc3bfb4fd751dbd7e711868088ef33f710ff11","user":{"login":"WordPress","id":276006,"avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"name":"gutenberg","full_name":"WordPress/gutenberg","owner":{"login":"WordPress","id":276006,"avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Beta plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-03-21T09:08:15Z","pushed_at":"2018-03-21T09:19:35Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/ ","size":11625,"stargazers_count":2151,"watchers_count":2151,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":502,"mirror_url":null,"archived":false,"open_issues_count":813,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":502,"open_issues":813,"watchers":2151,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/5715"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/5715"},"issue":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/5715"},"comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/5715/comments"},"review_comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/5715/comments"},"review_comment":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/5715/commits"},"statuses":{"href":"https://api.github.com/repos/WordPress/gutenberg/statuses/c387d5162f850ab35c3fe26b66f76ec5b8862d5e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"youknowriad"}}