@instructure/ui-table 11.7.5-snapshot-41 → 11.7.5-snapshot-48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,9 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [11.7.5-snapshot-41](https://github.com/instructure/instructure-ui/compare/v11.7.4...v11.7.5-snapshot-41) (2026-08-17)
6
+ ## [11.7.5-snapshot-48](https://github.com/instructure/instructure-ui/compare/v11.7.4...v11.7.5-snapshot-48) (2026-08-18)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-table
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-table:** don't append a sort state to unsorted v1 captions ([d3d892e](https://github.com/instructure/instructure-ui/commit/d3d892e4dc415a275e5524740bddb84c67c98185)), closes [#2574](https://github.com/instructure/instructure-ui/issues/2574)
9
12
 
10
13
 
11
14
 
@@ -141,7 +141,13 @@ let Table = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_clas
141
141
  if (typeof caption === 'function') {
142
142
  return caption(sortInfo?.header ?? '', sortInfo?.direction ?? 'none');
143
143
  }
144
- const sortText = ` Sorted by ${sortInfo?.header} (${sortInfo?.direction})`;
144
+ // An unsorted table has no sort state to describe. Falling through would
145
+ // put ' Sorted by undefined (undefined)' into the accessible name of every
146
+ // unsorted table.
147
+ if (!sortInfo) {
148
+ return caption;
149
+ }
150
+ const sortText = ` Sorted by ${sortInfo.header} (${sortInfo.direction})`;
145
151
  return caption ? caption + sortText : sortText.trim();
146
152
  }
147
153
  render() {
@@ -147,7 +147,13 @@ let Table = exports.Table = (_dec = (0, _emotion.withStyle)(_styles.default, _th
147
147
  if (typeof caption === 'function') {
148
148
  return caption(sortInfo?.header ?? '', sortInfo?.direction ?? 'none');
149
149
  }
150
- const sortText = ` Sorted by ${sortInfo?.header} (${sortInfo?.direction})`;
150
+ // An unsorted table has no sort state to describe. Falling through would
151
+ // put ' Sorted by undefined (undefined)' into the accessible name of every
152
+ // unsorted table.
153
+ if (!sortInfo) {
154
+ return caption;
155
+ }
156
+ const sortText = ` Sorted by ${sortInfo.header} (${sortInfo.direction})`;
151
157
  return caption ? caption + sortText : sortText.trim();
152
158
  }
153
159
  render() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-table",
3
- "version": "11.7.5-snapshot-41",
3
+ "version": "11.7.5-snapshot-48",
4
4
  "description": "A styled HTML table component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -15,25 +15,25 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.29.7",
18
- "@instructure/console": "11.7.5-snapshot-41",
19
- "@instructure/emotion": "11.7.5-snapshot-41",
20
- "@instructure/shared-types": "11.7.5-snapshot-41",
21
- "@instructure/ui-icons": "11.7.5-snapshot-41",
22
- "@instructure/ui-a11y-content": "11.7.5-snapshot-41",
23
- "@instructure/ui-react-utils": "11.7.5-snapshot-41",
24
- "@instructure/ui-simple-select": "11.7.5-snapshot-41",
25
- "@instructure/ui-utils": "11.7.5-snapshot-41",
26
- "@instructure/ui-themes": "11.7.5-snapshot-41",
27
- "@instructure/ui-view": "11.7.5-snapshot-41"
18
+ "@instructure/console": "11.7.5-snapshot-48",
19
+ "@instructure/shared-types": "11.7.5-snapshot-48",
20
+ "@instructure/emotion": "11.7.5-snapshot-48",
21
+ "@instructure/ui-icons": "11.7.5-snapshot-48",
22
+ "@instructure/ui-a11y-content": "11.7.5-snapshot-48",
23
+ "@instructure/ui-react-utils": "11.7.5-snapshot-48",
24
+ "@instructure/ui-simple-select": "11.7.5-snapshot-48",
25
+ "@instructure/ui-utils": "11.7.5-snapshot-48",
26
+ "@instructure/ui-themes": "11.7.5-snapshot-48",
27
+ "@instructure/ui-view": "11.7.5-snapshot-48"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@testing-library/jest-dom": "^6.9.1",
31
31
  "@testing-library/react": "16.3.2",
32
32
  "@testing-library/user-event": "^14.6.1",
33
33
  "vitest": "^4.1.9",
34
- "@instructure/ui-axe-check": "11.7.5-snapshot-41",
35
- "@instructure/ui-babel-preset": "11.7.5-snapshot-41",
36
- "@instructure/ui-color-utils": "11.7.5-snapshot-41"
34
+ "@instructure/ui-axe-check": "11.7.5-snapshot-48",
35
+ "@instructure/ui-babel-preset": "11.7.5-snapshot-48",
36
+ "@instructure/ui-color-utils": "11.7.5-snapshot-48"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": ">=18 <=19"
@@ -161,7 +161,7 @@ class Table extends Component<TableProps> {
161
161
  const headerText =
162
162
  typeof colHeader.props.children === 'string'
163
163
  ? colHeader.props.children
164
- : (colHeader.props.children?.props?.children ?? '')
164
+ : colHeader.props.children?.props?.children ?? ''
165
165
  return { header: headerText, direction: colHeader.props.sortDirection }
166
166
  }
167
167
  }
@@ -174,7 +174,13 @@ class Table extends Component<TableProps> {
174
174
  if (typeof caption === 'function') {
175
175
  return caption(sortInfo?.header ?? '', sortInfo?.direction ?? 'none')
176
176
  }
177
- const sortText = ` Sorted by ${sortInfo?.header} (${sortInfo?.direction})`
177
+ // An unsorted table has no sort state to describe. Falling through would
178
+ // put ' Sorted by undefined (undefined)' into the accessible name of every
179
+ // unsorted table.
180
+ if (!sortInfo) {
181
+ return caption as string
182
+ }
183
+ const sortText = ` Sorted by ${sortInfo.header} (${sortInfo.direction})`
178
184
 
179
185
  return caption ? caption + sortText : sortText.trim()
180
186
  }