{"action":"created","issue":{"url":"https://api.github.com/repos/gpbl/react-day-picker/issues/35","labels_url":"https://api.github.com/repos/gpbl/react-day-picker/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/gpbl/react-day-picker/issues/35/comments","events_url":"https://api.github.com/repos/gpbl/react-day-picker/issues/35/events","html_url":"https://github.com/gpbl/react-day-picker/issues/35","id":97904916,"number":35,"title":"New labels prop","user":{"login":"gpbl","id":120693,"avatar_url":"https://avatars.githubusercontent.com/u/120693?v=3","gravatar_id":"","url":"https://api.github.com/users/gpbl","html_url":"https://github.com/gpbl","followers_url":"https://api.github.com/users/gpbl/followers","following_url":"https://api.github.com/users/gpbl/following{/other_user}","gists_url":"https://api.github.com/users/gpbl/gists{/gist_id}","starred_url":"https://api.github.com/users/gpbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpbl/subscriptions","organizations_url":"https://api.github.com/users/gpbl/orgs","repos_url":"https://api.github.com/users/gpbl/repos","events_url":"https://api.github.com/users/gpbl/events{/privacy}","received_events_url":"https://api.github.com/users/gpbl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-29T10:13:12Z","updated_at":"2015-07-29T16:50:09Z","closed_at":null,"body":"A `labels` prop may help to implement `title` and `aria-label` attributes (see #33). Example:\r\n\r\n```js\r\n// default labels\r\nlet labels = { \"today\": \"Today\" }\r\n<DayPicker labels={labels} />\r\n\r\n// localized, modifier specific labels\r\nlet modifiers = { \"weekend\": day => day.getDate() === 5 || day.getDate() === 6 }\r\nlet labels = { \"weekend\": { en: \"Weekend\", it: \"Fine settimana\", de: \"Wochenende\" }\r\n<DayPicker labels={labels} modifiers={modifiers} />\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/gpbl/react-day-picker/issues/comments/126015449","html_url":"https://github.com/gpbl/react-day-picker/issues/35#issuecomment-126015449","issue_url":"https://api.github.com/repos/gpbl/react-day-picker/issues/35","id":126015449,"user":{"login":"basham","id":347558,"avatar_url":"https://avatars.githubusercontent.com/u/347558?v=3","gravatar_id":"","url":"https://api.github.com/users/basham","html_url":"https://github.com/basham","followers_url":"https://api.github.com/users/basham/followers","following_url":"https://api.github.com/users/basham/following{/other_user}","gists_url":"https://api.github.com/users/basham/gists{/gist_id}","starred_url":"https://api.github.com/users/basham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basham/subscriptions","organizations_url":"https://api.github.com/users/basham/orgs","repos_url":"https://api.github.com/users/basham/repos","events_url":"https://api.github.com/users/basham/events{/privacy}","received_events_url":"https://api.github.com/users/basham/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T16:50:09Z","updated_at":"2015-07-29T16:50:09Z","body":"Seems like a worthy endeavor. Just keep in mind that not every Day cell will need an `aria-label` value (which means the attribute doesn't need to be rendered in those cases). The original desire to have `aria-label=\"Today\"` applied is because none of the other semantics (`aria-disabled`, `aria-selected`) sufficiently describe what is visually presented via the `.DayPicker-Day--today` modifier class. It is not necessary, and it may be even a detriment, if `aria-label` is overused. For example:\r\n\r\n## Do\r\n\r\n```html\r\n<div\r\n  class=\"DayPicker-Day DayPicker-Day--today DayPicker-Day--selected\"\r\n  aria-label=\"Today\"\r\n  aria-selected=\"true\"\r\n  ...>\r\n  29\r\n</div>\r\n```\r\n\r\n```html\r\n<div\r\n  class=\"DayPicker-Day DayPicker-Day--selected\"\r\n  aria-selected=\"true\"\r\n  ...>\r\n  30\r\n</div>\r\n```\r\n\r\n## Do not\r\n\r\n```html\r\n<div\r\n  class=\"DayPicker-Day DayPicker-Day--today DayPicker-Day--selected\"\r\n  aria-label=\"Today, Selected\"\r\n  aria-selected=\"true\"\r\n  ...>\r\n  29\r\n</div>\r\n```\r\n\r\n```html\r\n<div\r\n  class=\"DayPicker-Day DayPicker-Day--selected\"\r\n  aria-label=\"Selected\"\r\n  aria-selected=\"true\"\r\n  ...>\r\n  30\r\n</div>\r\n```"}}