{"action":"created","comment":{"url":"https://api.github.com/repos/angular/material/pulls/comments/55200597","id":55200597,"diff_hunk":"@@ -422,8 +422,25 @@\n     */\n    function cacheIcon( id ) {\n \n-     return function updateCache( icon ) {\n-       iconCache[id] = isIcon(icon) ? icon : new Icon(icon, config[id]);\n+     return function updateCache( _icon ) {\n+       var icon = isIcon(_icon) ? _icon : new Icon(_icon, config[id]);\n+\n+       //clear id attributes to prevent aria issues\n+       var elem = icon.element;\n+       elem.removeAttribute('id');\n+\n+       var children = elem.childNodes;\n+\n+       for (var i=0; i<children.length;i++) {\n+         var child = children[i];\n+         if(child.nodeName==='path') {","path":"src/components/icon/js/iconService.js","position":44,"original_position":44,"commit_id":"3223d72b675b8e1d9b365f14175d72681281c1b4","original_commit_id":"3223d72b675b8e1d9b365f14175d72681281c1b4","user":{"login":"david-gang","id":1292882,"avatar_url":"https://avatars.githubusercontent.com/u/1292882?v=3","gravatar_id":"","url":"https://api.github.com/users/david-gang","html_url":"https://github.com/david-gang","followers_url":"https://api.github.com/users/david-gang/followers","following_url":"https://api.github.com/users/david-gang/following{/other_user}","gists_url":"https://api.github.com/users/david-gang/gists{/gist_id}","starred_url":"https://api.github.com/users/david-gang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-gang/subscriptions","organizations_url":"https://api.github.com/users/david-gang/orgs","repos_url":"https://api.github.com/users/david-gang/repos","events_url":"https://api.github.com/users/david-gang/events{/privacy}","received_events_url":"https://api.github.com/users/david-gang/received_events","type":"User","site_admin":false},"body":"You are right. I will remove the if.","created_at":"2016-03-07T13:10:48Z","updated_at":"2016-03-07T13:10:48Z","html_url":"https://github.com/angular/material/pull/7440#discussion_r55200597","pull_request_url":"https://api.github.com/repos/angular/material/pulls/7440","_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/comments/55200597"},"html":{"href":"https://github.com/angular/material/pull/7440#discussion_r55200597"},"pull_request":{"href":"https://api.github.com/repos/angular/material/pulls/7440"}}},"pull_request":{"url":"https://api.github.com/repos/angular/material/pulls/7440","id":61897393,"html_url":"https://github.com/angular/material/pull/7440","diff_url":"https://github.com/angular/material/pull/7440.diff","patch_url":"https://github.com/angular/material/pull/7440.patch","issue_url":"https://api.github.com/repos/angular/material/issues/7440","number":7440,"state":"open","locked":false,"title":"fix(md-icon): accessibility issue with unique ids","user":{"login":"david-gang","id":1292882,"avatar_url":"https://avatars.githubusercontent.com/u/1292882?v=3","gravatar_id":"","url":"https://api.github.com/users/david-gang","html_url":"https://github.com/david-gang","followers_url":"https://api.github.com/users/david-gang/followers","following_url":"https://api.github.com/users/david-gang/following{/other_user}","gists_url":"https://api.github.com/users/david-gang/gists{/gist_id}","starred_url":"https://api.github.com/users/david-gang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-gang/subscriptions","organizations_url":"https://api.github.com/users/david-gang/orgs","repos_url":"https://api.github.com/users/david-gang/repos","events_url":"https://api.github.com/users/david-gang/events{/privacy}","received_events_url":"https://api.github.com/users/david-gang/received_events","type":"User","site_admin":false},"body":"fix(md-icon): accessibility issue with unique ids\r\n\r\nWhen the same svg icon is placed multiple times in the same page, it raises an aria warning that every element should have an  [unique id](https://www.w3.org/TR/WCAG20-TECHS/F77).\r\nThe solution is to remove the id from the svg and the path children.\r\n\r\ncloses: #6796","created_at":"2016-03-07T10:21:25Z","updated_at":"2016-03-07T13:10:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe7ade8363a97b228e81585e6f6233a780521214","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/material/pulls/7440/commits","review_comments_url":"https://api.github.com/repos/angular/material/pulls/7440/comments","review_comment_url":"https://api.github.com/repos/angular/material/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/material/issues/7440/comments","statuses_url":"https://api.github.com/repos/angular/material/statuses/3223d72b675b8e1d9b365f14175d72681281c1b4","head":{"label":"david-gang:david-gang-fix-aria-unique-ids-patch","ref":"david-gang-fix-aria-unique-ids-patch","sha":"3223d72b675b8e1d9b365f14175d72681281c1b4","user":{"login":"david-gang","id":1292882,"avatar_url":"https://avatars.githubusercontent.com/u/1292882?v=3","gravatar_id":"","url":"https://api.github.com/users/david-gang","html_url":"https://github.com/david-gang","followers_url":"https://api.github.com/users/david-gang/followers","following_url":"https://api.github.com/users/david-gang/following{/other_user}","gists_url":"https://api.github.com/users/david-gang/gists{/gist_id}","starred_url":"https://api.github.com/users/david-gang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-gang/subscriptions","organizations_url":"https://api.github.com/users/david-gang/orgs","repos_url":"https://api.github.com/users/david-gang/repos","events_url":"https://api.github.com/users/david-gang/events{/privacy}","received_events_url":"https://api.github.com/users/david-gang/received_events","type":"User","site_admin":false},"repo":{"id":31208175,"name":"material","full_name":"david-gang/material","owner":{"login":"david-gang","id":1292882,"avatar_url":"https://avatars.githubusercontent.com/u/1292882?v=3","gravatar_id":"","url":"https://api.github.com/users/david-gang","html_url":"https://github.com/david-gang","followers_url":"https://api.github.com/users/david-gang/followers","following_url":"https://api.github.com/users/david-gang/following{/other_user}","gists_url":"https://api.github.com/users/david-gang/gists{/gist_id}","starred_url":"https://api.github.com/users/david-gang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-gang/subscriptions","organizations_url":"https://api.github.com/users/david-gang/orgs","repos_url":"https://api.github.com/users/david-gang/repos","events_url":"https://api.github.com/users/david-gang/events{/privacy}","received_events_url":"https://api.github.com/users/david-gang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/david-gang/material","description":"Material design for Angular","fork":true,"url":"https://api.github.com/repos/david-gang/material","forks_url":"https://api.github.com/repos/david-gang/material/forks","keys_url":"https://api.github.com/repos/david-gang/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/david-gang/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/david-gang/material/teams","hooks_url":"https://api.github.com/repos/david-gang/material/hooks","issue_events_url":"https://api.github.com/repos/david-gang/material/issues/events{/number}","events_url":"https://api.github.com/repos/david-gang/material/events","assignees_url":"https://api.github.com/repos/david-gang/material/assignees{/user}","branches_url":"https://api.github.com/repos/david-gang/material/branches{/branch}","tags_url":"https://api.github.com/repos/david-gang/material/tags","blobs_url":"https://api.github.com/repos/david-gang/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/david-gang/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/david-gang/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/david-gang/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/david-gang/material/statuses/{sha}","languages_url":"https://api.github.com/repos/david-gang/material/languages","stargazers_url":"https://api.github.com/repos/david-gang/material/stargazers","contributors_url":"https://api.github.com/repos/david-gang/material/contributors","subscribers_url":"https://api.github.com/repos/david-gang/material/subscribers","subscription_url":"https://api.github.com/repos/david-gang/material/subscription","commits_url":"https://api.github.com/repos/david-gang/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/david-gang/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/david-gang/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/david-gang/material/issues/comments{/number}","contents_url":"https://api.github.com/repos/david-gang/material/contents/{+path}","compare_url":"https://api.github.com/repos/david-gang/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/david-gang/material/merges","archive_url":"https://api.github.com/repos/david-gang/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/david-gang/material/downloads","issues_url":"https://api.github.com/repos/david-gang/material/issues{/number}","pulls_url":"https://api.github.com/repos/david-gang/material/pulls{/number}","milestones_url":"https://api.github.com/repos/david-gang/material/milestones{/number}","notifications_url":"https://api.github.com/repos/david-gang/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/david-gang/material/labels{/name}","releases_url":"https://api.github.com/repos/david-gang/material/releases{/id}","deployments_url":"https://api.github.com/repos/david-gang/material/deployments","created_at":"2015-02-23T13:01:28Z","updated_at":"2016-03-06T09:41:07Z","pushed_at":"2016-03-07T10:09:38Z","git_url":"git://github.com/david-gang/material.git","ssh_url":"git@github.com:david-gang/material.git","clone_url":"https://github.com/david-gang/material.git","svn_url":"https://github.com/david-gang/material","homepage":"https://material.angularjs.org/","size":41104,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"angular:master","ref":"master","sha":"e50dd9b8f6a7e742c55b734c1320e30a6e1c74a4","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":21399598,"name":"material","full_name":"angular/material","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/material","description":"Material design for Angular","fork":false,"url":"https://api.github.com/repos/angular/material","forks_url":"https://api.github.com/repos/angular/material/forks","keys_url":"https://api.github.com/repos/angular/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/material/teams","hooks_url":"https://api.github.com/repos/angular/material/hooks","issue_events_url":"https://api.github.com/repos/angular/material/issues/events{/number}","events_url":"https://api.github.com/repos/angular/material/events","assignees_url":"https://api.github.com/repos/angular/material/assignees{/user}","branches_url":"https://api.github.com/repos/angular/material/branches{/branch}","tags_url":"https://api.github.com/repos/angular/material/tags","blobs_url":"https://api.github.com/repos/angular/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/material/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/material/languages","stargazers_url":"https://api.github.com/repos/angular/material/stargazers","contributors_url":"https://api.github.com/repos/angular/material/contributors","subscribers_url":"https://api.github.com/repos/angular/material/subscribers","subscription_url":"https://api.github.com/repos/angular/material/subscription","commits_url":"https://api.github.com/repos/angular/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/material/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/material/contents/{+path}","compare_url":"https://api.github.com/repos/angular/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/material/merges","archive_url":"https://api.github.com/repos/angular/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/material/downloads","issues_url":"https://api.github.com/repos/angular/material/issues{/number}","pulls_url":"https://api.github.com/repos/angular/material/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/material/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/material/labels{/name}","releases_url":"https://api.github.com/repos/angular/material/releases{/id}","deployments_url":"https://api.github.com/repos/angular/material/deployments","created_at":"2014-07-01T19:20:06Z","updated_at":"2016-03-07T12:21:55Z","pushed_at":"2016-03-07T10:21:25Z","git_url":"git://github.com/angular/material.git","ssh_url":"git@github.com:angular/material.git","clone_url":"https://github.com/angular/material.git","svn_url":"https://github.com/angular/material","homepage":"https://material.angularjs.org/","size":46681,"stargazers_count":12782,"watchers_count":12782,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2492,"mirror_url":null,"open_issues_count":1659,"forks":2492,"open_issues":1659,"watchers":12782,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/7440"},"html":{"href":"https://github.com/angular/material/pull/7440"},"issue":{"href":"https://api.github.com/repos/angular/material/issues/7440"},"comments":{"href":"https://api.github.com/repos/angular/material/issues/7440/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/material/pulls/7440/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/material/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/material/pulls/7440/commits"},"statuses":{"href":"https://api.github.com/repos/angular/material/statuses/3223d72b675b8e1d9b365f14175d72681281c1b4"}}}}