diff options
author | Tayane Fernandes <tayane.rmf@gmail.com> | 2017-02-06 14:22:05 -0200 |
---|---|---|
committer | Tayane Fernandes <tayane.rmf@gmail.com> | 2017-02-06 19:02:19 -0200 |
commit | 91bc3bbf22f81f6da767e35430eaeb8127089f5b (patch) | |
tree | e0adcad639f9c14d2eef0970c760b576a0079df1 | |
parent | a384b422e54695a2c1931640006403561fde7585 (diff) |
[#922] Add accessibility warning in dev env
with @anikarni
-rw-r--r-- | web-ui/app/js/account_recovery.js | 3 | ||||
-rw-r--r-- | web-ui/app/js/account_recovery/page.js | 2 | ||||
-rw-r--r-- | web-ui/package.json | 1 | ||||
-rw-r--r-- | web-ui/webpack.config.js | 6 |
4 files changed, 10 insertions, 2 deletions
diff --git a/web-ui/app/js/account_recovery.js b/web-ui/app/js/account_recovery.js index 02183574..a48415f8 100644 --- a/web-ui/app/js/account_recovery.js +++ b/web-ui/app/js/account_recovery.js @@ -1,6 +1,9 @@ import React from 'react' import { render } from 'react-dom' import Page from 'js/account_recovery/page' +import a11y from 'react-a11y' + +if(process.env.NODE_ENV === 'development') a11y(React); render( <Page/>, diff --git a/web-ui/app/js/account_recovery/page.js b/web-ui/app/js/account_recovery/page.js index 447331bc..55df9ee7 100644 --- a/web-ui/app/js/account_recovery/page.js +++ b/web-ui/app/js/account_recovery/page.js @@ -5,7 +5,7 @@ import 'scss/account_recovery/page.scss' const Page = () => ( <div className='container'> <form> - <img src='assets/images/forgot-my-password.svg' /> + <img src='assets/images/forgot-my-password.svg' alt="Esqueci minha senha!"/> <h1>E se você esquecer sua senha?</h1> <p>Informe outro e-mail que você usa regularmente. Esse será o seu e-mail de recuperação.</p> <p>Instruções serão enviadas para esse e-mail, guarde com carinho.</p> diff --git a/web-ui/package.json b/web-ui/package.json index 6f875280..cd9e1286 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -49,6 +49,7 @@ "node-sass": "^4.5.0", "quoted-printable": "^1.0.1", "react": "^15.4.2", + "react-a11y": "^0.3.3", "react-addons-test-utils": "^15.4.2", "react-dom": "^15.4.2", "requirejs": "2.2.0", diff --git a/web-ui/webpack.config.js b/web-ui/webpack.config.js index 59d2ae5b..c59ebb63 100644 --- a/web-ui/webpack.config.js +++ b/web-ui/webpack.config.js @@ -33,5 +33,9 @@ module.exports = { } ] }, - plugins: [copyWebpack] + plugins: [copyWebpack, new webpack.DefinePlugin({ + 'process.env': { + 'NODE_ENV': '"development"' + } + })] } |