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

refactor(data-table): DataTable components to use aria-label instead of ariaLabel #16332

Merged
merged 15 commits into from
Jun 13, 2024

Conversation

digiacomo-a
Copy link
Contributor

@digiacomo-a digiacomo-a commented May 6, 2024

This is my first contribution here, I would like to learn more.
In the scope of this PR I've marked ariaLabel as deprecated (but still usable) and add aria-label

No breaking changes, aria-label will have priority if provided.

Closes #12802

I think this PR close the issue above with the updates to the DataTable components.

Changelog

New

  • aria-label prop for TableSelectAll
  • aria-label prop for TableSelectRow

Changed

  • ariaLabel is marked as deprecated (console.warn)

Removed

  • nothing has been removed, no breaking changes (just warning)

Testing / Reviewing

I've added a unit-test scenario for all cases to check:

  • aria-label is used if provided
  • if both aria-label and ariaLabel are provided, we use the aria-label with priority
  • if we keep using ariaLabel and not passing aria-label, it will still work but print a warning.

Update to deprecate ariaLabel in favor of aria-label.

No breaking changes, aria-label will have priority if provided.
@digiacomo-a digiacomo-a requested review from a team as code owners May 6, 2024 15:07
Copy link
Contributor

github-actions bot commented May 6, 2024

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

@digiacomo-a
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

@digiacomo-a
Copy link
Contributor Author

recheck

Copy link

netlify bot commented May 6, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit c9c92b0
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/666b4c413b29e8000814c242
😎 Deploy Preview https://deploy-preview-16332--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please give context on why the versioning of the eslint-plugin-react-refresh is changed?

Copy link
Contributor Author

@digiacomo-a digiacomo-a May 6, 2024

Choose a reason for hiding this comment

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

I had some issue to run yarn install and commit was failing with an error related to that module.
It was related to something else on my local (I just checkout the repo) but I was keeping this version since it's the latest minor update.

I think the change in that file can be reverted if we want, but it will not have any impact since we use the caret ^ prefix, we are already installing the latest minor update, so it was still installing that version.

Let me know if I'm wrong and if we want to revert it, please :) Thanks for the comment!

Copy link
Contributor

@Gururajj77 Gururajj77 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@digiacomo-a digiacomo-a requested a review from a team as a code owner May 9, 2024 11:41
Copy link

netlify bot commented May 22, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit c9c92b0
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/666b4c411ef92d0008025855
😎 Deploy Preview https://deploy-preview-16332--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Thanks so much for this! I'll incorporate my suggestions and then merge

@tay1orjones tay1orjones enabled auto-merge June 13, 2024 19:45
@tay1orjones tay1orjones added this pull request to the merge queue Jun 13, 2024
Merged via the queue into carbon-design-system:main with commit c35d1c7 Jun 13, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor ariaLabel props to aria-label
5 participants