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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

digiacomo-a
Copy link

@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.
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
Author

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

@digiacomo-a
Copy link
Author

recheck

Copy link

netlify bot commented May 6, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 828c248
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66508a97af2588000847c615
😎 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
Author

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 828c248
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66508a97cb56a50007a9cb2f
😎 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.

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
4 participants