From 35649748630de4eba44dcb3d54e073160c478a28 Mon Sep 17 00:00:00 2001 From: emyarod Date: Wed, 25 Mar 2020 11:34:55 -0500 Subject: [PATCH 1/2] fix(Modal): edit close icon alt text to match content guidelines --- packages/react/src/components/Modal/Modal-story.js | 10 ++-------- packages/react/src/components/Modal/Modal-test.js | 2 +- packages/react/src/components/Modal/Modal.js | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/react/src/components/Modal/Modal-story.js b/packages/react/src/components/Modal/Modal-story.js index ef34780ed8a5..56a2fa4c75e1 100644 --- a/packages/react/src/components/Modal/Modal-story.js +++ b/packages/react/src/components/Modal/Modal-story.js @@ -55,10 +55,7 @@ const props = () => ({ '[data-modal-primary-focus]' ), size: select('Size (size)', sizes), - iconDescription: text( - 'Close icon description (iconDescription)', - 'Close the modal' - ), + iconDescription: text('Close icon description (iconDescription)', 'Close'), onBlur: action('onBlur'), onClick: action('onClick'), onFocus: action('onFocus'), @@ -93,10 +90,7 @@ const titleOnlyProps = () => { 'Secondary Button' ), size: select('Size (size)', sizes, 'sm'), - iconDescription: text( - 'Close icon description (iconDescription)', - 'Close the modal' - ), + iconDescription: text('Close icon description (iconDescription)', 'Close'), onBlur: action('onBlur'), onClick: action('onClick'), onFocus: action('onFocus'), diff --git a/packages/react/src/components/Modal/Modal-test.js b/packages/react/src/components/Modal/Modal-test.js index 4afcb7a8ffad..9adf8afa4910 100644 --- a/packages/react/src/components/Modal/Modal-test.js +++ b/packages/react/src/components/Modal/Modal-test.js @@ -49,7 +49,7 @@ describe('Modal', () => { }); it('has the expected default iconDescription', () => { - expect(mounted.props().iconDescription).toEqual('close the modal'); + expect(mounted.props().iconDescription).toEqual('Close'); }); it('adds new iconDescription when passed via props', () => { diff --git a/packages/react/src/components/Modal/Modal.js b/packages/react/src/components/Modal/Modal.js index 607711043ffc..dd7a1a2e501e 100644 --- a/packages/react/src/components/Modal/Modal.js +++ b/packages/react/src/components/Modal/Modal.js @@ -169,7 +169,7 @@ export default class Modal extends Component { primaryButtonDisabled: false, onKeyDown: () => {}, passiveModal: false, - iconDescription: 'close the modal', + iconDescription: 'Close', modalHeading: '', modalLabel: '', selectorPrimaryFocus: '[data-modal-primary-focus]', From 9cad40b45d4077489443f7a0e42dd1c470c23197 Mon Sep 17 00:00:00 2001 From: emyarod Date: Thu, 26 Mar 2020 10:04:14 -0500 Subject: [PATCH 2/2] chore: update snapshots --- .../__tests__/__snapshots__/PublicAPI-test.js.snap | 2 +- .../__snapshots__/ModalWrapper-test.js.snap | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap index 0a760df50512..54d0db06e862 100644 --- a/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap +++ b/packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap @@ -2938,7 +2938,7 @@ Map { "Modal" => Object { "defaultProps": Object { "hasScrollingContent": false, - "iconDescription": "close the modal", + "iconDescription": "Close", "modalHeading": "", "modalLabel": "", "onKeyDown": [Function], diff --git a/packages/react/src/components/ModalWrapper/__snapshots__/ModalWrapper-test.js.snap b/packages/react/src/components/ModalWrapper/__snapshots__/ModalWrapper-test.js.snap index 97cc0dfa7e80..7f7921682be2 100644 --- a/packages/react/src/components/ModalWrapper/__snapshots__/ModalWrapper-test.js.snap +++ b/packages/react/src/components/ModalWrapper/__snapshots__/ModalWrapper-test.js.snap @@ -44,7 +44,7 @@ exports[`ModalWrapper should render 1`] = `