diff --git a/src/components/ActivateHalfHourLoad/ActivateHalfHourLoad.spec.tsx b/src/components/ActivateHalfHourLoad/ActivateHalfHourLoad.spec.tsx index ae28dd87d107952e7bc9752615ee3dbc2c90ef86..8e8e3841c26bc8f514f5c47dfb4c2b097a2d2c84 100644 --- a/src/components/ActivateHalfHourLoad/ActivateHalfHourLoad.spec.tsx +++ b/src/components/ActivateHalfHourLoad/ActivateHalfHourLoad.spec.tsx @@ -6,7 +6,7 @@ import configureStore from 'redux-mock-store' import { globalStateData } from '../../../tests/__mocks__/globalStateData.mock' import * as reactRedux from 'react-redux' import { userChallengeExplo1OnGoing } from '../../../tests/__mocks__/userChallengeData.mock' -import MuiButton from '@material-ui/core/Button' +import Button from '@material-ui/core/Button' jest.mock('cozy-ui/transpiled/react/I18n', () => { return { @@ -39,7 +39,7 @@ describe('ActivateHalfHourLoad component test', () => { global.open = jest.fn() - wrapper.find(MuiButton).simulate('click') + wrapper.find(Button).simulate('click') expect(global.open).toHaveBeenCalledWith( 'https://mon-compte-particulier.enedis.fr/donnees/', '_blank' diff --git a/src/components/ActivateHalfHourLoad/ActivateHalfHourLoad.tsx b/src/components/ActivateHalfHourLoad/ActivateHalfHourLoad.tsx index 8c91e922240526695e486640fb4ccb93dcb41813..6c445e602801c3ef52b2b4b93da49326680bb45a 100644 --- a/src/components/ActivateHalfHourLoad/ActivateHalfHourLoad.tsx +++ b/src/components/ActivateHalfHourLoad/ActivateHalfHourLoad.tsx @@ -2,7 +2,7 @@ import React from 'react' import { IuseI18n, useI18n } from 'cozy-ui/transpiled/react/I18n' import ConfigService from 'services/fluidConfig.service' -import MuiButton from '@material-ui/core/Button' +import Button from '@material-ui/core/Button' import StyledIcon from 'components/CommonKit/Icon/StyledIcon' import iconEnedisLogo from 'assets/icons/visu/enedis-logo.svg' import './activateHalfHourLoad.scss' @@ -20,7 +20,8 @@ const ActivateHalfHourLoad = () => { <div className="activatehalfhour-box-header header-text text-16-normal"> {t('timestep.activate.enedis.info')} </div> - <MuiButton + <Button + aria-label={t('timestep.activate.enedis.accessibility.button_activate')} onClick={() => { setValidExploration(UserExplorationID.EXPLORATION004) window.open(fluidConfig[0].konnectorConfig.activation, '_blank') @@ -38,7 +39,7 @@ const ActivateHalfHourLoad = () => { <div> {t('timestep.activate.enedis.label1')}</div> </div> </div> - </MuiButton> + </Button> </div> ) } diff --git a/src/locales/fr.json b/src/locales/fr.json index e5a5a8e7c9bed3b3372a394e1dd0441653c25e73..0974445c854e459b170b5c75c515534f09b78c0f 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -314,7 +314,10 @@ "activate": { "enedis": { "info": "Pour visualiser vos consommations à la 1/2 heure, il vous faut valider l'activation de l'enregistrement de votre consommation horaire sur votre compte Enedis", - "label1": "Activer sur mon compte Enedis" + "label1": "Activer sur mon compte Enedis", + "accessibility": { + "button_activate": "Aller sur mon compte Enedis" + } } } },