From ccc31c1e1867c37335ee3fbdd4bc729ad6917883 Mon Sep 17 00:00:00 2001 From: Sriram Viswanathan Date: Fri, 24 Mar 2017 14:39:43 -0300 Subject: |#973| Thais + Sriram | Adds title and aria label for the logout button on the header --- web-ui/src/common/flat_button/flat_button.js | 2 ++ web-ui/src/common/flat_button/flat_button.spec.js | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'web-ui/src/common/flat_button') diff --git a/web-ui/src/common/flat_button/flat_button.js b/web-ui/src/common/flat_button/flat_button.js index 33df7de4..b8c6c2c7 100644 --- a/web-ui/src/common/flat_button/flat_button.js +++ b/web-ui/src/common/flat_button/flat_button.js @@ -43,6 +43,8 @@ const SubmitFlatButton = ({ name, buttonText, fontIconClass }) => ( labelPosition='before' label={buttonText} labelStyle={labelStyle} + aria-label={buttonText} + title={buttonText} icon={} /> ); diff --git a/web-ui/src/common/flat_button/flat_button.spec.js b/web-ui/src/common/flat_button/flat_button.spec.js index 8939e3d9..16f03acb 100644 --- a/web-ui/src/common/flat_button/flat_button.spec.js +++ b/web-ui/src/common/flat_button/flat_button.spec.js @@ -18,6 +18,14 @@ describe('FlatButton', () => { expect(flatButton.find('FlatButton').props().label).toEqual('Logout'); }); + it('renders a FlatButton of type submit with title logout', () => { + expect(flatButton.find('FlatButton').props().title).toEqual('Logout'); + }); + + it('renders a FlatButton of type submit with aria-label logout', () => { + expect(flatButton.find('FlatButton').props()['aria-label']).toEqual('Logout'); + }); + it('renders a FlatButton with given fontIcon class', () => { expect(flatButton.find('FlatButton').props().icon.props.className).toEqual('fa fa-sign-out'); }); -- cgit v1.2.3