@instructure/ui-checkbox 11.7.4 → 11.7.5-pr-snapshot-1787571141446
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,6 +3,18 @@
|
|
|
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-pr-snapshot-1787571141446](https://github.com/instructure/instructure-ui/compare/v11.7.4...v11.7.5-pr-snapshot-1787571141446) (2026-08-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui-checkbox:** announce the toggle variant as a toggle button ([c713660](https://github.com/instructure/instructure-ui/commit/c7136606d91ef7dd59c7479a6d65565b24dea972))
|
|
12
|
+
* **ui-checkbox:** fix message indentation ([dfaa13a](https://github.com/instructure/instructure-ui/commit/dfaa13ad61ca4f53bd445211e661fae6cd9a02e1))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [11.7.4](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4) (2026-07-24)
|
|
7
19
|
|
|
8
20
|
|
package/es/Checkbox/v2/index.js
CHANGED
|
@@ -232,7 +232,7 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle
|
|
|
232
232
|
return messages && messages.length > 0 ? _jsx(View, {
|
|
233
233
|
display: "block",
|
|
234
234
|
margin: "small 0 0",
|
|
235
|
-
css:
|
|
235
|
+
css: variant === 'toggle' ? styles?.indentedToggleError : styles?.indentedError,
|
|
236
236
|
children: _jsx(FormFieldMessages, {
|
|
237
237
|
id: this._messagesId,
|
|
238
238
|
messages: messages
|
|
@@ -278,6 +278,8 @@ let Checkbox = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle
|
|
|
278
278
|
readOnly: readOnly,
|
|
279
279
|
"aria-readonly": readOnly ? true : undefined,
|
|
280
280
|
"aria-checked": indeterminate ? 'mixed' : undefined,
|
|
281
|
+
role: variant === 'toggle' ? 'button' : undefined,
|
|
282
|
+
"aria-pressed": variant === 'toggle' ? this.checked : undefined,
|
|
281
283
|
"aria-invalid": this.invalid ? 'true' : undefined
|
|
282
284
|
// Keep messages in the description so the accessible name contains only the label.
|
|
283
285
|
,
|
package/lib/Checkbox/v2/index.js
CHANGED
|
@@ -252,7 +252,7 @@ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDetermini
|
|
|
252
252
|
return messages && messages.length > 0 ? (0, _jsxRuntime.jsx)(_latest2.View, {
|
|
253
253
|
display: "block",
|
|
254
254
|
margin: "small 0 0",
|
|
255
|
-
css:
|
|
255
|
+
css: variant === 'toggle' ? styles?.indentedToggleError : styles?.indentedError,
|
|
256
256
|
children: (0, _jsxRuntime.jsx)(_latest.FormFieldMessages, {
|
|
257
257
|
id: this._messagesId,
|
|
258
258
|
messages: messages
|
|
@@ -298,6 +298,8 @@ let Checkbox = exports.Checkbox = (_dec = (0, _withDeterministicId.withDetermini
|
|
|
298
298
|
readOnly: readOnly,
|
|
299
299
|
"aria-readonly": readOnly ? true : undefined,
|
|
300
300
|
"aria-checked": indeterminate ? 'mixed' : undefined,
|
|
301
|
+
role: variant === 'toggle' ? 'button' : undefined,
|
|
302
|
+
"aria-pressed": variant === 'toggle' ? this.checked : undefined,
|
|
301
303
|
"aria-invalid": this.invalid ? 'true' : undefined
|
|
302
304
|
// Keep messages in the description so the accessible name contains only the label.
|
|
303
305
|
,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-checkbox",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.5-pr-snapshot-1787571141446",
|
|
4
4
|
"description": " styled HTML input type='checkbox' component.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
18
|
"keycode": "^2",
|
|
19
|
-
"@instructure/console": "11.7.
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/ui-
|
|
23
|
-
"@instructure/
|
|
24
|
-
"@instructure/ui-icons": "11.7.
|
|
25
|
-
"@instructure/ui-react-utils": "11.7.
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/ui-themes": "11.7.
|
|
28
|
-
"@instructure/ui-view": "11.7.
|
|
29
|
-
"@instructure/
|
|
30
|
-
"@instructure/
|
|
19
|
+
"@instructure/console": "11.7.5-pr-snapshot-1787571141446",
|
|
20
|
+
"@instructure/shared-types": "11.7.5-pr-snapshot-1787571141446",
|
|
21
|
+
"@instructure/emotion": "11.7.5-pr-snapshot-1787571141446",
|
|
22
|
+
"@instructure/ui-dom-utils": "11.7.5-pr-snapshot-1787571141446",
|
|
23
|
+
"@instructure/ui-form-field": "11.7.5-pr-snapshot-1787571141446",
|
|
24
|
+
"@instructure/ui-icons": "11.7.5-pr-snapshot-1787571141446",
|
|
25
|
+
"@instructure/ui-react-utils": "11.7.5-pr-snapshot-1787571141446",
|
|
26
|
+
"@instructure/ui-utils": "11.7.5-pr-snapshot-1787571141446",
|
|
27
|
+
"@instructure/ui-themes": "11.7.5-pr-snapshot-1787571141446",
|
|
28
|
+
"@instructure/ui-view": "11.7.5-pr-snapshot-1787571141446",
|
|
29
|
+
"@instructure/ui-svg-images": "11.7.5-pr-snapshot-1787571141446",
|
|
30
|
+
"@instructure/uid": "11.7.5-pr-snapshot-1787571141446"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^6.9.1",
|
|
34
34
|
"@testing-library/react": "16.3.2",
|
|
35
35
|
"@testing-library/user-event": "^14.6.1",
|
|
36
36
|
"vitest": "^4.1.9",
|
|
37
|
-
"@instructure/ui-
|
|
38
|
-
"@instructure/ui-
|
|
39
|
-
"@instructure/ui-
|
|
37
|
+
"@instructure/ui-axe-check": "11.7.5-pr-snapshot-1787571141446",
|
|
38
|
+
"@instructure/ui-babel-preset": "11.7.5-pr-snapshot-1787571141446",
|
|
39
|
+
"@instructure/ui-color-utils": "11.7.5-pr-snapshot-1787571141446"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=18 <=19"
|
|
@@ -286,10 +286,9 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
286
286
|
display="block"
|
|
287
287
|
margin="small 0 0"
|
|
288
288
|
css={
|
|
289
|
-
|
|
290
|
-
(variant === 'toggle'
|
|
289
|
+
variant === 'toggle'
|
|
291
290
|
? styles?.indentedToggleError
|
|
292
|
-
: styles?.indentedError
|
|
291
|
+
: styles?.indentedError
|
|
293
292
|
}
|
|
294
293
|
>
|
|
295
294
|
<FormFieldMessages id={this._messagesId} messages={messages} />
|
|
@@ -343,6 +342,8 @@ class Checkbox extends Component<CheckboxProps, CheckboxState> {
|
|
|
343
342
|
readOnly={readOnly}
|
|
344
343
|
aria-readonly={readOnly ? true : undefined}
|
|
345
344
|
aria-checked={indeterminate ? 'mixed' : undefined}
|
|
345
|
+
role={variant === 'toggle' ? 'button' : undefined}
|
|
346
|
+
aria-pressed={variant === 'toggle' ? this.checked : undefined}
|
|
346
347
|
aria-invalid={this.invalid ? 'true' : undefined}
|
|
347
348
|
// Keep messages in the description so the accessible name contains only the label.
|
|
348
349
|
aria-labelledby={
|