@instructure/ui-table 11.0.2-snapshot-0 → 11.0.2-snapshot-2

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.0.2-snapshot-0](https://github.com/instructure/instructure-ui/compare/v11.0.1...v11.0.2-snapshot-0) (2025-10-15)
6
+ ## [11.0.2-snapshot-2](https://github.com/instructure/instructure-ui/compare/v11.0.1...v11.0.2-snapshot-2) (2025-10-20)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-table
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-table:** fix selectable table screen reader issue on select all checkbox in the column header ([93a9847](https://github.com/instructure/instructure-ui/commit/93a9847800eea63e874587d19cf06c76bcb9ab95))
9
12
 
10
13
 
11
14
 
package/README.md CHANGED
@@ -10,7 +10,7 @@ A styled HTML table component.
10
10
 
11
11
  The `ui-table` package contains the following:
12
12
 
13
- - [Table](#Table)
13
+ - [Table](Table)
14
14
 
15
15
  ### Installation
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-table",
3
- "version": "11.0.2-snapshot-0",
3
+ "version": "11.0.2-snapshot-2",
4
4
  "description": "A styled HTML table component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,10 +23,10 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "11.0.2-snapshot-0",
27
- "@instructure/ui-babel-preset": "11.0.2-snapshot-0",
28
- "@instructure/ui-color-utils": "11.0.2-snapshot-0",
29
- "@instructure/ui-themes": "11.0.2-snapshot-0",
26
+ "@instructure/ui-axe-check": "11.0.2-snapshot-2",
27
+ "@instructure/ui-babel-preset": "11.0.2-snapshot-2",
28
+ "@instructure/ui-color-utils": "11.0.2-snapshot-2",
29
+ "@instructure/ui-themes": "11.0.2-snapshot-2",
30
30
  "@testing-library/jest-dom": "^6.6.3",
31
31
  "@testing-library/react": "15.0.7",
32
32
  "@testing-library/user-event": "^14.6.1",
@@ -34,15 +34,15 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.27.6",
37
- "@instructure/console": "11.0.2-snapshot-0",
38
- "@instructure/emotion": "11.0.2-snapshot-0",
39
- "@instructure/shared-types": "11.0.2-snapshot-0",
40
- "@instructure/ui-a11y-content": "11.0.2-snapshot-0",
41
- "@instructure/ui-icons": "11.0.2-snapshot-0",
42
- "@instructure/ui-react-utils": "11.0.2-snapshot-0",
43
- "@instructure/ui-simple-select": "11.0.2-snapshot-0",
44
- "@instructure/ui-utils": "11.0.2-snapshot-0",
45
- "@instructure/ui-view": "11.0.2-snapshot-0"
37
+ "@instructure/console": "11.0.2-snapshot-2",
38
+ "@instructure/emotion": "11.0.2-snapshot-2",
39
+ "@instructure/shared-types": "11.0.2-snapshot-2",
40
+ "@instructure/ui-a11y-content": "11.0.2-snapshot-2",
41
+ "@instructure/ui-icons": "11.0.2-snapshot-2",
42
+ "@instructure/ui-react-utils": "11.0.2-snapshot-2",
43
+ "@instructure/ui-simple-select": "11.0.2-snapshot-2",
44
+ "@instructure/ui-utils": "11.0.2-snapshot-2",
45
+ "@instructure/ui-view": "11.0.2-snapshot-2"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "react": ">=18 <=19"
@@ -6,9 +6,9 @@ describes: Table
6
6
 
7
7
  In stacked layout, column header is rendered in each cell, but not in row header.
8
8
 
9
- > If you are using [TruncateText](#TruncateText) (or CSS ellipsis) in your Table, set the
9
+ > If you are using [TruncateText](TruncateText) (or CSS ellipsis) in your Table, set the
10
10
  > layout to `fixed` or `stacked`, or the text truncation will not work. To force long strings to break and not
11
- > exceed the bounds of the table cell, use `fixed` or `stacked`, together with the [Text](#Text) component:
11
+ > exceed the bounds of the table cell, use `fixed` or `stacked`, together with the [Text](Text) component:
12
12
  > `<Text wrap="break-word">[long string]</Text>`.
13
13
 
14
14
  ```js
@@ -220,7 +220,7 @@ render(
220
220
 
221
221
  ### A sortable table using our Responsive component
222
222
 
223
- Resize the window to see how column headers transition into a `Select` for sorting table content when the traditional Table Header is no longer clickable. The Table layout itself switches from the horizontal view to the stacked view allowing content to be viewed without horizontal scrolling. See [Responsive](#Responsive) for more examples.
223
+ Resize the window to see how column headers transition into a `Select` for sorting table content when the traditional Table Header is no longer clickable. The Table layout itself switches from the horizontal view to the stacked view allowing content to be viewed without horizontal scrolling. See [Responsive](Responsive) for more examples.
224
224
 
225
225
  By default, the options in the `Select` for sorting in stacked layout are generated from the `id` property of the `Table.ColHeader` components. If you want to display custom strings, use the `stackedSortByLabel` property.
226
226
 
@@ -515,10 +515,10 @@ const SelectableTable = ({
515
515
  }
516
516
  >
517
517
  <Table.Row>
518
- <Table.ColHeader id="select">
518
+ <Table.ColHeader id="select" aria-label="Select">
519
519
  <Checkbox
520
520
  label={
521
- <ScreenReaderContent>Select all</ScreenReaderContent>
521
+ <ScreenReaderContent>Select all rows</ScreenReaderContent>
522
522
  }
523
523
  onChange={() => handleSelectAll(allSelected)}
524
524
  checked={allSelected}
@@ -868,7 +868,7 @@ render(<Example />)
868
868
  If you want to use fully custom components you have to pay attention to the following:
869
869
 
870
870
  - Render them as the appropriate HTML Table tags (`tr`, `th`, ...)
871
- - Read the `hover` prop from [TableContext](#TableContext) to customize hover behaviour
871
+ - Read the `hover` prop from [TableContext](TableContext) to customize hover behaviour
872
872
  - A11y: Row header cells must have the `scope='row'` HTML attribute
873
873
  - A11y: Column header cells must have the `scope='col'` and `aria-sort` (if sortable) HTML attribute
874
874
 
@@ -973,13 +973,13 @@ render(<Example />)
973
973
 
974
974
  #### Fully custom components with `stacked` layout
975
975
 
976
- This layout for small screens displays the table as a list. To accomplish this the headers are passed down to cells (in [TableContext](#TableContext)), so they can display what column they are rendering.
976
+ This layout for small screens displays the table as a list. To accomplish this the headers are passed down to cells (in [TableContext](TableContext)), so they can display what column they are rendering.
977
977
  In this layout for accessibility not render HTML table tags, just plain DOM elements (e.g. `div`) and use the appropriate ARIA role to signify that it's actually a `Table` (e.g. [`cell`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/cell_role), [`row`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/row_role), [`rowheader`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/rowheader_role)).
978
978
  Also you need the following props on the components:
979
979
 
980
980
  ##### Table rows
981
981
 
982
- - It should read the `headers` array from [TableContext](#TableContext) and pass its nth element to its nth child (if they have such prop).
982
+ - It should read the `headers` array from [TableContext](TableContext) and pass its nth element to its nth child (if they have such prop).
983
983
 
984
984
  ##### The children of the first row in `Table.Head` (`Table.ColHeader` by default)
985
985
 
@@ -987,7 +987,7 @@ Also you need the following props on the components:
987
987
 
988
988
  ##### Table cells
989
989
 
990
- - It needs to have an optional `header` prop and should display its value so the user knows which column the cell's value belongs to (you can read whether the table is using `stacked` layout from [TableContext](#TableContext).
990
+ - It needs to have an optional `header` prop and should display its value so the user knows which column the cell's value belongs to (you can read whether the table is using `stacked` layout from [TableContext](TableContext).
991
991
 
992
992
  Custom table with `stacked` layout support:
993
993
 
@@ -1141,3 +1141,15 @@ type: embed
1141
1141
  </Figure>
1142
1142
  </Guidelines>
1143
1143
  ```
1144
+
1145
+ ```js
1146
+ ---
1147
+ type: embed
1148
+ ---
1149
+ <Guidelines>
1150
+ <Figure recommendation="a11y" title="Accessibility">
1151
+ <Figure.Item>In the case of a Table with selection, to prevent screenreaders from announcing the label of the select all checkbox when navigating in the rows, an aria-label should be added to the corresponding Table.Colheader like in our example above.
1152
+ </Figure.Item>
1153
+ </Figure>
1154
+ </Guidelines>
1155
+ ```