Skip to content

Commit

Permalink
fix: table resize button aria label
Browse files Browse the repository at this point in the history
  • Loading branch information
corteggiano authored and diehbria committed Dec 18, 2023
1 parent 3b30cd2 commit 1618d50
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 12 deletions.
16 changes: 9 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"dependencies": {
"@cloudscape-design/component-toolkit": "1.0.0-beta.26",
"@cloudscape-design/collection-hooks": "1.0.22",
"@cloudscape-design/components": "3.0.415",
"@cloudscape-design/components": "3.0.421",
"@cloudscape-design/design-tokens": "3.0.15",
"@cloudscape-design/global-styles": "1.0.12"
},
Expand Down Expand Up @@ -71,4 +71,4 @@
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export function AssetModelPropertiesTable({
<AssetModelPropertiesTablePreferences preferences={preferences} updatePreferences={updatePreferences} />
}
ariaLabels={{
resizerRoleDescription: 'Resize button',
itemSelectionLabel: (isNotSelected, assetModelProperty) =>
isNotSelected
? `Select asset model property ${assetModelProperty.name}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export function AssetTable({
}
preferences={<AssetTablePreferences preferences={preferences} updatePreferences={updatePreferences} />}
ariaLabels={{
resizerRoleDescription: 'Resize button',
itemSelectionLabel: (isNotSelected, asset) =>
isNotSelected ? `Select asset ${asset.name}` : `Deselect asset ${asset.name}`,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export function ModeledDataStreamTable({
ariaLabels={{
itemSelectionLabel: ({ selectedItems }, modeledDataStream) =>
propertySelectionLabel([...selectedItems], modeledDataStream),

resizerRoleDescription: 'Resize button',
allItemsSelectionLabel: ({ selectedItems }) =>
selectedItems.length !== items.length ? 'Select modeled data stream' : 'Deselect modeled data stream',
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ export function UnmodeledDataStreamTable({
}}
/>
}
ariaLabels={{
resizerRoleDescription: 'Resize button',
allItemsSelectionLabel: ({ selectedItems }) =>
selectedItems.length !== items.length ? 'Select unmodeled data stream' : 'Deselect unmodeled data stream',
}}
/>
);
}
4 changes: 2 additions & 2 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
},
"dependencies": {
"@cloudscape-design/collection-hooks": "1.0.22",
"@cloudscape-design/components": "3.0.415",
"@cloudscape-design/components": "3.0.421",
"@cloudscape-design/design-tokens": "3.0.15",
"@iot-app-kit/charts": "2.1.2",
"@iot-app-kit/charts-core": "2.1.2",
Expand Down Expand Up @@ -143,4 +143,4 @@
"url": "https://github.com/awslabs/iot-app-kit/issues"
},
"homepage": "https://github.com/awslabs/iot-app-kit#readme"
}
}

0 comments on commit 1618d50

Please sign in to comment.