Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(modal): added deprecation warning for iconDescription #9787

Conversation

sstrubberg
Copy link
Member

@sstrubberg sstrubberg commented Oct 1, 2021

REF #9624

Added deprecation warnings for iconDescription for v11.

  • Title and aria-label attributes now use the ariaLabel prop instead of iconDescription.
  • The close button now gets an aria-hidden="true"

Testing

Review Modal in Storybook and ensure tests are firing off correctly.

Feedback

Unclear on why the tests are failing because of the deprecation warning. Feedback welcome.

@sstrubberg sstrubberg requested a review from a team as a code owner October 1, 2021 15:01
@netlify
Copy link

netlify bot commented Oct 1, 2021

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: d861ec9

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/615efab9ee15e20007018cc9

😎 Browse the preview: https://deploy-preview-9787--carbon-react-next.netlify.app

@netlify
Copy link

netlify bot commented Oct 1, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: d861ec9

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/615efab95946770008e8ceba

😎 Browse the preview: https://deploy-preview-9787--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Oct 1, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: d861ec9

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/615efab9f9da270007133b1c

😎 Browse the preview: https://deploy-preview-9787--carbon-components-react.netlify.app

@sstrubberg sstrubberg marked this pull request as draft October 1, 2021 15:58
Co-authored-by: Alessandra Davila <aledavila@users.noreply.github.com>
@sstrubberg sstrubberg marked this pull request as ready for review October 5, 2021 18:46
@sstrubberg sstrubberg requested a review from a team as a code owner October 5, 2021 22:34
@@ -217,7 +220,8 @@ export default class Modal extends Component {
primaryButtonDisabled: false,
onKeyDown: () => {},
passiveModal: false,
iconDescription: 'Close',
// iconDescription is deprecated in v11 use aria-label instead
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, do we usually remove the default prop value even if the prop hasn't been deprecated yet?

@@ -409,16 +413,20 @@ export default class Modal extends Component {
Array.isArray(secondaryButtons) && secondaryButtons.length === 2,
});

// ['aria-label']: ariaLabel,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be commented out?

@abbeyhrt
Copy link
Contributor

abbeyhrt commented Oct 7, 2021

Should aria-label for Modal now be required in V11? Just thinking that it might be since these changes seem In the same vein as this issue from last sprint #9466

@sstrubberg sstrubberg closed this Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants