From 2c8bafaca309019858f594de40cfffd7e6fd0bce Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 13 Nov 2017 21:28:42 +0000 Subject: [PATCH] fix: remove aria-controls (#10) * Remove unneeded aria-controls attribute from toggler props * Add oliverjam as a code contributor --- .all-contributorsrc | 9 +++++++++ README.md | 6 +++--- src/__tests__/__snapshots__/index.js.snap | 2 -- src/index.js | 1 - 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index b82bd08..e75aa19 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -29,6 +29,15 @@ "doc", "test" ] + }, + { + "login": "oliverjam", + "name": "Oliver", + "avatar_url": "https://avatars1.githubusercontent.com/u/9408641?v=4", + "profile": "http://www.oliverjam.es", + "contributions": [ + "code" + ] } ] } diff --git a/README.md b/README.md index 9e3f81b..c7f81ac 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ [![version][version-badge]][package] [![MIT License][license-badge]][LICENSE] -[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors) [![PRs Welcome][prs-badge]][prs] [![Chat][chat-badge]][chat] [![Code of Conduct][coc-badge]][coc] @@ -194,8 +194,8 @@ are tons of them, so just Thanks goes to these people ([emoji key][emojis]): -| [
Kent C. Dodds](https://kentcdodds.com)
[💻](https://github.com/kentcdodds/react-toggled/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/react-toggled/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/react-toggled/commits?author=kentcdodds "Tests") | [
Frank Tan](https://github.com/tansongyang)
[💻](https://github.com/kentcdodds/react-toggled/commits?author=tansongyang "Code") [📖](https://github.com/kentcdodds/react-toggled/commits?author=tansongyang "Documentation") [⚠️](https://github.com/kentcdodds/react-toggled/commits?author=tansongyang "Tests") | -| :---: | :---: | +| [
Kent C. Dodds](https://kentcdodds.com)
[💻](https://github.com/kentcdodds/react-toggled/commits?author=kentcdodds "Code") [📖](https://github.com/kentcdodds/react-toggled/commits?author=kentcdodds "Documentation") [🚇](#infra-kentcdodds "Infrastructure (Hosting, Build-Tools, etc)") [⚠️](https://github.com/kentcdodds/react-toggled/commits?author=kentcdodds "Tests") | [
Frank Tan](https://github.com/tansongyang)
[💻](https://github.com/kentcdodds/react-toggled/commits?author=tansongyang "Code") [📖](https://github.com/kentcdodds/react-toggled/commits?author=tansongyang "Documentation") [⚠️](https://github.com/kentcdodds/react-toggled/commits?author=tansongyang "Tests") | [
Oliver](http://www.oliverjam.es)
[💻](https://github.com/kentcdodds/react-toggled/commits?author=oliverjam "Code") | +| :---: | :---: | :---: | This project follows the [all-contributors][all-contributors] specification. diff --git a/src/__tests__/__snapshots__/index.js.snap b/src/__tests__/__snapshots__/index.js.snap index be266e7..85d3e7b 100644 --- a/src/__tests__/__snapshots__/index.js.snap +++ b/src/__tests__/__snapshots__/index.js.snap @@ -2,7 +2,6 @@ exports[`getTogglerProps for \`on\` false 1`] = ` Object { - "aria-controls": "target", "aria-expanded": false, "id": "extra", "onClick": [Function], @@ -12,7 +11,6 @@ Object { exports[`getTogglerProps for \`on\` true 1`] = ` Object { - "aria-controls": "target", "aria-expanded": true, "id": "extra", "onClick": [Function], diff --git a/src/index.js b/src/index.js index 02f82c2..a48f3e5 100644 --- a/src/index.js +++ b/src/index.js @@ -27,7 +27,6 @@ class Toggle extends Component { } getTogglerProps = (props = {}) => ({ - 'aria-controls': 'target', 'aria-expanded': Boolean(this.getOn()), tabIndex: 0, ...props,