Skip to content

Commit 61a9d68

Browse files
authored
Merge pull request #68 from zainfathoni/feature/a11y
Inital support a11y
2 parents adddd9d + 4af58fd commit 61a9d68

4 files changed

Lines changed: 58 additions & 5 deletions

File tree

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["standard", "standard-react"],
2+
"extends": ["standard", "standard-react", "plugin:jsx-a11y/recommended"],
33
"parser": "babel-eslint",
44
"globals": {
55
"describe": true,

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"obj-str": "1.0.3",
1818
"react": "16.9.0",
1919
"react-dom": "16.9.0",
20-
"react-scripts": "3.1.1"
20+
"react-scripts": "3.1.1",
21+
"reakit": "1.0.0-beta.5"
2122
},
2223
"devDependencies": {
2324
"@babel/core": "7.5.5",
@@ -49,6 +50,7 @@
4950
"eslint-config-standard-react": "9.0.0",
5051
"eslint-plugin-cypress": "2.6.1",
5152
"eslint-plugin-import": "2.18.2",
53+
"eslint-plugin-jsx-a11y": "6.2.3",
5254
"eslint-plugin-node": "9.1.0",
5355
"eslint-plugin-promise": "4.2.1",
5456
"eslint-plugin-react": "7.14.3",
@@ -61,6 +63,7 @@
6163
"postcss-cli": "6.1.3",
6264
"prettier-eslint-cli": "5.0.0",
6365
"prop-types": "15.7.2",
66+
"react-axe": "3.2.0",
6467
"react-test-renderer": "16.9.0",
6568
"serve": "11.1.0",
6669
"snapshot-diff": "0.5.2",

src/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ Sentry.init({
1212
const ui = <App />
1313
const container = document.getElementById('root')
1414

15-
ReactDOM.render(ui, container)
15+
if (process.env.NODE_ENV !== 'production') {
16+
import('react-axe').then(axe => {
17+
axe(React, ReactDOM, 1000)
18+
ReactDOM.render(ui, container)
19+
})
20+
} else {
21+
ReactDOM.render(ui, container)
22+
}
1623

1724
// If you want your app to work offline and load faster, you can change
1825
// unregister() to register() below. Note this comes with some pitfalls.

yarn.lock

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2691,6 +2691,11 @@ aws4@^1.8.0:
26912691
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
26922692
integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==
26932693

2694+
axe-core@^3.0.0:
2695+
version "3.3.1"
2696+
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-3.3.1.tgz#3d1fa78cca8ead1b78c350581501e4e37b97b826"
2697+
integrity sha512-gw1T0JptHPF4AdLLqE8yQq3Z7YvsYkpFmFWd84r6hnq/QoKRr8icYHFumhE7wYl5TVIHgVlchMyJsAYh0CfwCQ==
2698+
26942699
axobject-query@^2.0.2:
26952700
version "2.0.2"
26962701
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.2.tgz#ea187abe5b9002b377f925d8bf7d1c561adf38f9"
@@ -3158,6 +3163,11 @@ body-parser@1.19.0:
31583163
raw-body "2.4.0"
31593164
type-is "~1.6.17"
31603165

3166+
body-scroll-lock@^2.6.4:
3167+
version "2.6.4"
3168+
resolved "https://registry.yarnpkg.com/body-scroll-lock/-/body-scroll-lock-2.6.4.tgz#567abc60ef4d656a79156781771398ef40462e94"
3169+
integrity sha512-NP08WsovlmxEoZP9pdlqrE+AhNaivlTrz9a0FF37BQsnOrpN48eNqivKkE7SYpM9N+YIPjsdVzfLAUQDBm6OQw==
3170+
31613171
bonjour@^3.5.0:
31623172
version "3.5.0"
31633173
resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5"
@@ -5166,7 +5176,7 @@ eslint-plugin-import@2.18.2:
51665176
read-pkg-up "^2.0.0"
51675177
resolve "^1.11.0"
51685178

5169-
eslint-plugin-jsx-a11y@6.2.3:
5179+
eslint-plugin-jsx-a11y@6.2.3, eslint-plugin-jsx-a11y@^6.2.3:
51705180
version "6.2.3"
51715181
resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz#b872a09d5de51af70a97db1eea7dc933043708aa"
51725182
integrity sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==
@@ -9903,7 +9913,7 @@ polished@^3.3.1:
99039913
dependencies:
99049914
"@babel/runtime" "^7.4.5"
99059915

9906-
popper.js@^1.14.4, popper.js@^1.14.7:
9916+
popper.js@^1.14.4, popper.js@^1.14.7, popper.js@^1.15.0:
99079917
version "1.15.0"
99089918
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.15.0.tgz#5560b99bbad7647e9faa475c6b8056621f5a4ff2"
99099919
integrity sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA==
@@ -11062,6 +11072,14 @@ react-app-polyfill@^1.0.2:
1106211072
regenerator-runtime "0.13.3"
1106311073
whatwg-fetch "3.0.0"
1106411074

11075+
react-axe@^3.2.0:
11076+
version "3.2.0"
11077+
resolved "https://registry.yarnpkg.com/react-axe/-/react-axe-3.2.0.tgz#d17427e5d54d6c4561e74ad9cf8c1839e411bde3"
11078+
integrity sha512-2KlO2wZq58+GSFP4oWA2ZjU1ggbXdDLJc7tMUXUXkE4NVQ3FftdYtb7qNR+x1nTLeuVYiH4nH4hzIz9vQZ/Chw==
11079+
dependencies:
11080+
axe-core "^3.0.0"
11081+
requestidlecallback "^0.3.0"
11082+
1106511083
react-clientside-effect@^1.2.0:
1106611084
version "1.2.2"
1106711085
resolved "https://registry.yarnpkg.com/react-clientside-effect/-/react-clientside-effect-1.2.2.tgz#6212fb0e07b204e714581dd51992603d1accc837"
@@ -11400,6 +11418,26 @@ readdirp@^2.2.1:
1140011418
micromatch "^3.1.10"
1140111419
readable-stream "^2.0.2"
1140211420

11421+
reakit-system@^0.6.2:
11422+
version "0.6.2"
11423+
resolved "https://registry.yarnpkg.com/reakit-system/-/reakit-system-0.6.2.tgz#beff67eb645c07d7196579eae9db3cfc49f6eae8"
11424+
integrity sha512-qlWb/n+SmQwIR+SdmbTt94xnNA5kE2utTXuaaGDDVojL1LYKcKzcnl5Jxo2qJyXmyfgxglxuBF7ofDj/QoZGZg==
11425+
11426+
reakit-utils@^0.6.2:
11427+
version "0.6.2"
11428+
resolved "https://registry.yarnpkg.com/reakit-utils/-/reakit-utils-0.6.2.tgz#ac8143a349ce53e1eb6e0d408d6cd97d22b0ef2c"
11429+
integrity sha512-sEVOBN6ykA/FcDtc0hXxB4UiqP4Vns4n7tbcmPd9Qu1Ih61BeJV8DbRZyeOqqZzjL/lPOdiBr2jtakPtfSJDDw==
11430+
11431+
reakit@1.0.0-beta.5:
11432+
version "1.0.0-beta.5"
11433+
resolved "https://registry.yarnpkg.com/reakit/-/reakit-1.0.0-beta.5.tgz#e026e7fa15af3a71ac800a9e873505b645a1d5eb"
11434+
integrity sha512-Iqx62U0YgZGszFevSZYHlUqilvoidQD0N8hPbJKOOX2BIa+nfLgxlEvhHXBilD6DGpVQbl6s3Zx2ifSEFq0aig==
11435+
dependencies:
11436+
body-scroll-lock "^2.6.4"
11437+
popper.js "^1.15.0"
11438+
reakit-system "^0.6.2"
11439+
reakit-utils "^0.6.2"
11440+
1140311441
realpath-native@^1.1.0:
1140411442
version "1.1.0"
1140511443
resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c"
@@ -11668,6 +11706,11 @@ request@2.88.0, request@^2.87.0, request@^2.88.0:
1166811706
tunnel-agent "^0.6.0"
1166911707
uuid "^3.3.2"
1167011708

11709+
requestidlecallback@^0.3.0:
11710+
version "0.3.0"
11711+
resolved "https://registry.yarnpkg.com/requestidlecallback/-/requestidlecallback-0.3.0.tgz#6fb74e0733f90df3faa4838f9f6a2a5f9b742ac5"
11712+
integrity sha1-b7dOBzP5DfP6pIOPn2oqX5t0KsU=
11713+
1167111714
require-directory@^2.1.1:
1167211715
version "2.1.1"
1167311716
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"

0 commit comments

Comments
 (0)