@instructure/ui-text-input 10.6.2-snapshot-9 → 10.7.0
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
|
-
|
|
6
|
+
# [10.7.0](https://github.com/instructure/instructure-ui/compare/v10.6.1...v10.7.0) (2024-12-03)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **many:** hide required asterisks from screenreaders ([78aec71](https://github.com/instructure/instructure-ui/commit/78aec71d1056df3a43ffd226d993c451a8fe9c1d))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
package/es/TextInput/index.js
CHANGED
|
@@ -250,8 +250,9 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
250
250
|
const renderBeforeOrAfter = !!beforeElement || !!afterElement;
|
|
251
251
|
const rawLabel = callRenderProp(renderLabel);
|
|
252
252
|
const label = hasVisibleChildren(rawLabel) ? jsx(React.Fragment, null, rawLabel, isRequired && jsx("span", {
|
|
253
|
-
css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {}
|
|
254
|
-
|
|
253
|
+
css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {},
|
|
254
|
+
"aria-hidden": true
|
|
255
|
+
}, ' ', "*")) : rawLabel;
|
|
255
256
|
return jsx(FormField, {
|
|
256
257
|
id: this.id,
|
|
257
258
|
label: label,
|
package/lib/TextInput/index.js
CHANGED
|
@@ -260,8 +260,9 @@ let TextInput = exports.TextInput = (_dec = (0, _withDeterministicId.withDetermi
|
|
|
260
260
|
const renderBeforeOrAfter = !!beforeElement || !!afterElement;
|
|
261
261
|
const rawLabel = (0, _callRenderProp.callRenderProp)(renderLabel);
|
|
262
262
|
const label = (0, _hasVisibleChildren.hasVisibleChildren)(rawLabel) ? (0, _emotion.jsx)(_react.default.Fragment, null, rawLabel, isRequired && (0, _emotion.jsx)("span", {
|
|
263
|
-
css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {}
|
|
264
|
-
|
|
263
|
+
css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {},
|
|
264
|
+
"aria-hidden": true
|
|
265
|
+
}, ' ', "*")) : rawLabel;
|
|
265
266
|
return (0, _emotion.jsx)(_FormField.FormField, {
|
|
266
267
|
id: this.id,
|
|
267
268
|
label: label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-text-input",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.7.0",
|
|
4
4
|
"description": "A styled HTML text input component.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "10.
|
|
27
|
-
"@instructure/ui-babel-preset": "10.
|
|
28
|
-
"@instructure/ui-badge": "10.
|
|
29
|
-
"@instructure/ui-color-utils": "10.
|
|
30
|
-
"@instructure/ui-test-utils": "10.
|
|
31
|
-
"@instructure/ui-themes": "10.
|
|
26
|
+
"@instructure/ui-axe-check": "10.7.0",
|
|
27
|
+
"@instructure/ui-babel-preset": "10.7.0",
|
|
28
|
+
"@instructure/ui-badge": "10.7.0",
|
|
29
|
+
"@instructure/ui-color-utils": "10.7.0",
|
|
30
|
+
"@instructure/ui-test-utils": "10.7.0",
|
|
31
|
+
"@instructure/ui-themes": "10.7.0",
|
|
32
32
|
"@testing-library/jest-dom": "^6.4.6",
|
|
33
33
|
"@testing-library/react": "^16.0.1",
|
|
34
34
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@babel/runtime": "^7.25.6",
|
|
39
|
-
"@instructure/emotion": "10.
|
|
40
|
-
"@instructure/shared-types": "10.
|
|
41
|
-
"@instructure/ui-dom-utils": "10.
|
|
42
|
-
"@instructure/ui-form-field": "10.
|
|
43
|
-
"@instructure/ui-icons": "10.
|
|
44
|
-
"@instructure/ui-prop-types": "10.
|
|
45
|
-
"@instructure/ui-react-utils": "10.
|
|
46
|
-
"@instructure/ui-tag": "10.
|
|
47
|
-
"@instructure/ui-testable": "10.
|
|
39
|
+
"@instructure/emotion": "10.7.0",
|
|
40
|
+
"@instructure/shared-types": "10.7.0",
|
|
41
|
+
"@instructure/ui-dom-utils": "10.7.0",
|
|
42
|
+
"@instructure/ui-form-field": "10.7.0",
|
|
43
|
+
"@instructure/ui-icons": "10.7.0",
|
|
44
|
+
"@instructure/ui-prop-types": "10.7.0",
|
|
45
|
+
"@instructure/ui-react-utils": "10.7.0",
|
|
46
|
+
"@instructure/ui-tag": "10.7.0",
|
|
47
|
+
"@instructure/ui-testable": "10.7.0",
|
|
48
48
|
"prop-types": "^15.8.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
package/src/TextInput/index.tsx
CHANGED
|
@@ -333,7 +333,13 @@ class TextInput extends Component<TextInputProps, TextInputState> {
|
|
|
333
333
|
<React.Fragment>
|
|
334
334
|
{rawLabel}
|
|
335
335
|
{isRequired && (
|
|
336
|
-
<span
|
|
336
|
+
<span
|
|
337
|
+
css={this.invalid ? styles?.requiredInvalid : {}}
|
|
338
|
+
aria-hidden={true}
|
|
339
|
+
>
|
|
340
|
+
{' '}
|
|
341
|
+
*
|
|
342
|
+
</span>
|
|
337
343
|
)}
|
|
338
344
|
</React.Fragment>
|
|
339
345
|
) : (
|