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
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,15 @@
"contributions": [
"code"
]
},
{
"login": "digiacomo-a",
"name": "Andrea DG",
"avatar_url": "https://avatars.githubusercontent.com/u/117646602?v=4",
"profile": "https://github.com/digiacomo-a",
"contributions": [
"code"
]
}
],
"commitConvention": "none"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/2nikhiltom"><img src="https://avatars.githubusercontent.com/2nikhiltom?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikhil Tomar</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=2nikhiltom" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/aninaantony"><img src="https://avatars.githubusercontent.com/u/164350784?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anina Antony</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=aninaantony" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ychavoya"><img src="https://avatars.githubusercontent.com/u/7907338?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yael Chavoya</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=ychavoya" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/digiacomo-a"><img src="https://avatars.githubusercontent.com/u/117646602?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrea DG</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=digiacomo-a" title="Code">💻</a></td>
</tr>
</table>

Expand Down
16 changes: 8 additions & 8 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1989,10 +1989,10 @@ Map {
},
"TableSelectAll": Object {
"propTypes": Object {
"ariaLabel": Object {
"isRequired": true,
"aria-label": Object {
"type": "string",
},
"ariaLabel": [Function],
"checked": Object {
"isRequired": true,
"type": "bool",
Expand Down Expand Up @@ -2022,10 +2022,10 @@ Map {
},
"TableSelectRow": Object {
"propTypes": Object {
"ariaLabel": Object {
"isRequired": true,
"aria-label": Object {
"type": "string",
},
"ariaLabel": [Function],
"checked": Object {
"isRequired": true,
"type": "bool",
Expand Down Expand Up @@ -8000,10 +8000,10 @@ Map {
},
"TableSelectAll" => Object {
"propTypes": Object {
"ariaLabel": Object {
"isRequired": true,
"aria-label": Object {
"type": "string",
},
"ariaLabel": [Function],
"checked": Object {
"isRequired": true,
"type": "bool",
Expand Down Expand Up @@ -8033,10 +8033,10 @@ Map {
},
"TableSelectRow" => Object {
"propTypes": Object {
"ariaLabel": Object {
"isRequired": true,
"aria-label": Object {
"type": "string",
},
"ariaLabel": [Function],
"checked": Object {
"isRequired": true,
"type": "bool",
Expand Down
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!

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"eslint": "^8.54.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"eslint-plugin-react-refresh": "^0.4.6",
"sass": "1.69.5",
"vite": "^5.0.13"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const CustomDataTable = ({
indeterminate={
selectedRowsCountInFiltered > 0 && !selectedAllInFiltered
}
ariaLabel="Select all rows"
aria-label="Select all rows"
name={selectionAllName}
onSelect={handleChangeSelectionAll}
/>
Expand Down Expand Up @@ -247,7 +247,7 @@ const CustomDataTable = ({
id={`${elementId}--select-${rowId}`}
checked={Boolean(selected)}
name={selectionName}
ariaLabel="Select row"
aria-label="Select row"
onSelect={handleChangeSelection}
/>
)}
Expand Down
Loading
Loading