From 91bc3bbf22f81f6da767e35430eaeb8127089f5b Mon Sep 17 00:00:00 2001 From: Tayane Fernandes Date: Mon, 6 Feb 2017 14:22:05 -0200 Subject: [#922] Add accessibility warning in dev env with @anikarni --- web-ui/app/js/account_recovery.js | 3 +++ web-ui/app/js/account_recovery/page.js | 2 +- web-ui/package.json | 1 + web-ui/webpack.config.js | 6 +++++- 4 files changed, 10 insertions(+), 2 deletions(-) (limited to 'web-ui') 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( , 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 = () => (
- + Esqueci minha senha!

E se você esquecer sua senha?

Informe outro e-mail que você usa regularmente. Esse será o seu e-mail de recuperação.

Instruções serão enviadas para esse e-mail, guarde com carinho.

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"' + } + })] } -- cgit v1.2.3