{"action":"created","comment":{"url":"https://api.github.com/repos/gaia-components/gaia-button/pulls/comments/31928864","id":31928864,"diff_hunk":"@@ -21,33 +60,47 @@ $ bower install gaia-components/gaia-button\n Add `disabled` attribute to disable the button.\n \n ```html\n-<gaia-button disabled>button disabled</gaia-button>\n+<gaia-button disabled><span data-l10n-id=\"disable\">button disabled</span></gaia-button>\n ```\n \n-### With icon\n+### Circular\n \n-Button Can show with icon (need import `gaia-icons`) at left\n+Add `circular` attribute to turn button into circular form.\n \n ```html\n-<gaia-button><i data-icon=\"back-light\" aria-hidden=\"true\"></i><span>Back</span></gaia-button>\n+<gaia-button circular>\n+  <span data-icon=\"camera\" data-l10n-id=\"camera\"/>\n+</gaia-button>\n ```\n \n-or right\n \n-```html\n-<gaia-button><span>Forward</span><i data-icon=\"forward-light\" aria-hidden=\"true\"></i></gaia-button>\n-```\n+## RTL\n \n-Remember to add `aria-hidden=\"true\"` when both icon and text existed for **Accessibility**. So the screen reader will read the button text and ignore the icon text.\n+`gaia-button` is RTL ready. The icon and text position will be changed base on RTL settings.\n \n-### Circular\n \n-Add `circular` attribute to turn button into circular form.\n+## Accessibility\n+\n+`aria-disabled=\"true\"` is added automatically when button comes with `disabled` attribute. So the screen reader will read the button text and note it was disabled.\n+\n+* standalone icon butotn:\n \n ```html\n-<gaia-button circular><i data-icon=\"camera\"></i></gaia-button>\n+<gaia-button>\n+  <span data-l10n-id=\"\"/>","path":"README.md","position":98,"original_position":98,"commit_id":"3e5290a4fcf475e5a59effcf93fa0711f729451d","original_commit_id":"3e5290a4fcf475e5a59effcf93fa0711f729451d","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":"data-l10n-id=\"\" can be on the gaia-button itself in general.\r\nIt depends on what we are trying to achieve with l10n.\r\n* if icon[s] is irrelevant to content:\r\n  * we can use aria-hidden on the element that has data-icon iff it is inside the button (e.g. span). aria-hidden will affect only that element.\r\n  * we can apply aria-label (via data-l10n-id) onto the gaia-button itself that describes the button entirely. Since the icon is irrelevant, the label value will be identical to the textual content of the button. Note in this case span is not needed.\r\n\r\n* if Icon is relevant to content:\r\n  * if data-icon is on inner span, we must provide data-l10n-id for the span and ensure that the value for aria-label + optional text content make sense\r\n  * if data-icon is on the gaia-button itself we must provide data-l10n-id for the gaia-button describing the button the same way as it would be perceived by the sighted user i.e. icon meaning + inner text content","created_at":"2015-06-08T15:50:47Z","updated_at":"2015-06-08T15:50:47Z","html_url":"https://github.com/gaia-components/gaia-button/pull/12#discussion_r31928864","pull_request_url":"https://api.github.com/repos/gaia-components/gaia-button/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/gaia-components/gaia-button/pulls/comments/31928864"},"html":{"href":"https://github.com/gaia-components/gaia-button/pull/12#discussion_r31928864"},"pull_request":{"href":"https://api.github.com/repos/gaia-components/gaia-button/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/gaia-components/gaia-button/pulls/12","id":36807390,"html_url":"https://github.com/gaia-components/gaia-button/pull/12","diff_url":"https://github.com/gaia-components/gaia-button/pull/12.diff","patch_url":"https://github.com/gaia-components/gaia-button/pull/12.patch","issue_url":"https://api.github.com/repos/gaia-components/gaia-button/issues/12","number":12,"state":"open","locked":false,"title":"Bug 1162138 - [accessibility][gaia-button] Make sure gaia-button is accessible to screen reader","user":{"login":"gasolin","id":748808,"avatar_url":"https://avatars.githubusercontent.com/u/748808?v=3","gravatar_id":"","url":"https://api.github.com/users/gasolin","html_url":"https://github.com/gasolin","followers_url":"https://api.github.com/users/gasolin/followers","following_url":"https://api.github.com/users/gasolin/following{/other_user}","gists_url":"https://api.github.com/users/gasolin/gists{/gist_id}","starred_url":"https://api.github.com/users/gasolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasolin/subscriptions","organizations_url":"https://api.github.com/users/gasolin/orgs","repos_url":"https://api.github.com/users/gasolin/repos","events_url":"https://api.github.com/users/gasolin/events{/privacy}","received_events_url":"https://api.github.com/users/gasolin/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-03T08:07:28Z","updated_at":"2015-06-08T15:50:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5139dae68dee9ec1df76cec048dd37a75e09cb54","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gaia-components/gaia-button/pulls/12/commits","review_comments_url":"https://api.github.com/repos/gaia-components/gaia-button/pulls/12/comments","review_comment_url":"https://api.github.com/repos/gaia-components/gaia-button/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gaia-components/gaia-button/issues/12/comments","statuses_url":"https://api.github.com/repos/gaia-components/gaia-button/statuses/3e5290a4fcf475e5a59effcf93fa0711f729451d","head":{"label":"gasolin:issue-1162138-2","ref":"issue-1162138-2","sha":"3e5290a4fcf475e5a59effcf93fa0711f729451d","user":{"login":"gasolin","id":748808,"avatar_url":"https://avatars.githubusercontent.com/u/748808?v=3","gravatar_id":"","url":"https://api.github.com/users/gasolin","html_url":"https://github.com/gasolin","followers_url":"https://api.github.com/users/gasolin/followers","following_url":"https://api.github.com/users/gasolin/following{/other_user}","gists_url":"https://api.github.com/users/gasolin/gists{/gist_id}","starred_url":"https://api.github.com/users/gasolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasolin/subscriptions","organizations_url":"https://api.github.com/users/gasolin/orgs","repos_url":"https://api.github.com/users/gasolin/repos","events_url":"https://api.github.com/users/gasolin/events{/privacy}","received_events_url":"https://api.github.com/users/gasolin/received_events","type":"User","site_admin":false},"repo":{"id":34542157,"name":"gaia-button","full_name":"gasolin/gaia-button","owner":{"login":"gasolin","id":748808,"avatar_url":"https://avatars.githubusercontent.com/u/748808?v=3","gravatar_id":"","url":"https://api.github.com/users/gasolin","html_url":"https://github.com/gasolin","followers_url":"https://api.github.com/users/gasolin/followers","following_url":"https://api.github.com/users/gasolin/following{/other_user}","gists_url":"https://api.github.com/users/gasolin/gists{/gist_id}","starred_url":"https://api.github.com/users/gasolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasolin/subscriptions","organizations_url":"https://api.github.com/users/gasolin/orgs","repos_url":"https://api.github.com/users/gasolin/repos","events_url":"https://api.github.com/users/gasolin/events{/privacy}","received_events_url":"https://api.github.com/users/gasolin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gasolin/gaia-button","description":"Gaia button component","fork":true,"url":"https://api.github.com/repos/gasolin/gaia-button","forks_url":"https://api.github.com/repos/gasolin/gaia-button/forks","keys_url":"https://api.github.com/repos/gasolin/gaia-button/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gasolin/gaia-button/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gasolin/gaia-button/teams","hooks_url":"https://api.github.com/repos/gasolin/gaia-button/hooks","issue_events_url":"https://api.github.com/repos/gasolin/gaia-button/issues/events{/number}","events_url":"https://api.github.com/repos/gasolin/gaia-button/events","assignees_url":"https://api.github.com/repos/gasolin/gaia-button/assignees{/user}","branches_url":"https://api.github.com/repos/gasolin/gaia-button/branches{/branch}","tags_url":"https://api.github.com/repos/gasolin/gaia-button/tags","blobs_url":"https://api.github.com/repos/gasolin/gaia-button/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gasolin/gaia-button/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gasolin/gaia-button/git/refs{/sha}","trees_url":"https://api.github.com/repos/gasolin/gaia-button/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gasolin/gaia-button/statuses/{sha}","languages_url":"https://api.github.com/repos/gasolin/gaia-button/languages","stargazers_url":"https://api.github.com/repos/gasolin/gaia-button/stargazers","contributors_url":"https://api.github.com/repos/gasolin/gaia-button/contributors","subscribers_url":"https://api.github.com/repos/gasolin/gaia-button/subscribers","subscription_url":"https://api.github.com/repos/gasolin/gaia-button/subscription","commits_url":"https://api.github.com/repos/gasolin/gaia-button/commits{/sha}","git_commits_url":"https://api.github.com/repos/gasolin/gaia-button/git/commits{/sha}","comments_url":"https://api.github.com/repos/gasolin/gaia-button/comments{/number}","issue_comment_url":"https://api.github.com/repos/gasolin/gaia-button/issues/comments{/number}","contents_url":"https://api.github.com/repos/gasolin/gaia-button/contents/{+path}","compare_url":"https://api.github.com/repos/gasolin/gaia-button/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gasolin/gaia-button/merges","archive_url":"https://api.github.com/repos/gasolin/gaia-button/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gasolin/gaia-button/downloads","issues_url":"https://api.github.com/repos/gasolin/gaia-button/issues{/number}","pulls_url":"https://api.github.com/repos/gasolin/gaia-button/pulls{/number}","milestones_url":"https://api.github.com/repos/gasolin/gaia-button/milestones{/number}","notifications_url":"https://api.github.com/repos/gasolin/gaia-button/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gasolin/gaia-button/labels{/name}","releases_url":"https://api.github.com/repos/gasolin/gaia-button/releases{/id}","created_at":"2015-04-24T21:13:23Z","updated_at":"2015-04-24T21:13:23Z","pushed_at":"2015-06-08T09:04:18Z","git_url":"git://github.com/gasolin/gaia-button.git","ssh_url":"git@github.com:gasolin/gaia-button.git","clone_url":"https://github.com/gasolin/gaia-button.git","svn_url":"https://github.com/gasolin/gaia-button","homepage":null,"size":1011,"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":"c82b31854371bb5b3953d38bc19173b7dd0f2220","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":20906109,"name":"gaia-button","full_name":"gaia-components/gaia-button","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-button","description":"Gaia button component","fork":false,"url":"https://api.github.com/repos/gaia-components/gaia-button","forks_url":"https://api.github.com/repos/gaia-components/gaia-button/forks","keys_url":"https://api.github.com/repos/gaia-components/gaia-button/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaia-components/gaia-button/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaia-components/gaia-button/teams","hooks_url":"https://api.github.com/repos/gaia-components/gaia-button/hooks","issue_events_url":"https://api.github.com/repos/gaia-components/gaia-button/issues/events{/number}","events_url":"https://api.github.com/repos/gaia-components/gaia-button/events","assignees_url":"https://api.github.com/repos/gaia-components/gaia-button/assignees{/user}","branches_url":"https://api.github.com/repos/gaia-components/gaia-button/branches{/branch}","tags_url":"https://api.github.com/repos/gaia-components/gaia-button/tags","blobs_url":"https://api.github.com/repos/gaia-components/gaia-button/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaia-components/gaia-button/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaia-components/gaia-button/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaia-components/gaia-button/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaia-components/gaia-button/statuses/{sha}","languages_url":"https://api.github.com/repos/gaia-components/gaia-button/languages","stargazers_url":"https://api.github.com/repos/gaia-components/gaia-button/stargazers","contributors_url":"https://api.github.com/repos/gaia-components/gaia-button/contributors","subscribers_url":"https://api.github.com/repos/gaia-components/gaia-button/subscribers","subscription_url":"https://api.github.com/repos/gaia-components/gaia-button/subscription","commits_url":"https://api.github.com/repos/gaia-components/gaia-button/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaia-components/gaia-button/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaia-components/gaia-button/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaia-components/gaia-button/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaia-components/gaia-button/contents/{+path}","compare_url":"https://api.github.com/repos/gaia-components/gaia-button/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaia-components/gaia-button/merges","archive_url":"https://api.github.com/repos/gaia-components/gaia-button/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaia-components/gaia-button/downloads","issues_url":"https://api.github.com/repos/gaia-components/gaia-button/issues{/number}","pulls_url":"https://api.github.com/repos/gaia-components/gaia-button/pulls{/number}","milestones_url":"https://api.github.com/repos/gaia-components/gaia-button/milestones{/number}","notifications_url":"https://api.github.com/repos/gaia-components/gaia-button/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaia-components/gaia-button/labels{/name}","releases_url":"https://api.github.com/repos/gaia-components/gaia-button/releases{/id}","created_at":"2014-06-17T01:24:51Z","updated_at":"2015-05-08T09:59:19Z","pushed_at":"2015-06-08T09:04:19Z","git_url":"git://github.com/gaia-components/gaia-button.git","ssh_url":"git@github.com:gaia-components/gaia-button.git","clone_url":"https://github.com/gaia-components/gaia-button.git","svn_url":"https://github.com/gaia-components/gaia-button","homepage":null,"size":1327,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gaia-components/gaia-button/pulls/12"},"html":{"href":"https://github.com/gaia-components/gaia-button/pull/12"},"issue":{"href":"https://api.github.com/repos/gaia-components/gaia-button/issues/12"},"comments":{"href":"https://api.github.com/repos/gaia-components/gaia-button/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/gaia-components/gaia-button/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/gaia-components/gaia-button/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gaia-components/gaia-button/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/gaia-components/gaia-button/statuses/3e5290a4fcf475e5a59effcf93fa0711f729451d"}}}}