@react-aria/label 3.7.7 → 3.7.9
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/dist/useField.main.js +3 -3
- package/dist/useField.mjs +4 -4
- package/dist/useField.module.js +3 -3
- package/dist/useLabel.main.js +5 -5
- package/dist/useLabel.mjs +6 -6
- package/dist/useLabel.module.js +5 -5
- package/package.json +5 -5
package/dist/useField.main.js
CHANGED
|
@@ -35,12 +35,12 @@ function $50e2f39368b9c636$export$294aa081a6c6f55d(props) {
|
|
|
35
35
|
validationState
|
|
36
36
|
]);
|
|
37
37
|
fieldProps = (0, $iujgQ$reactariautils.mergeProps)(fieldProps, {
|
|
38
|
-
|
|
38
|
+
'aria-describedby': [
|
|
39
39
|
descriptionId,
|
|
40
40
|
// Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
|
|
41
41
|
errorMessageId,
|
|
42
|
-
props[
|
|
43
|
-
].filter(Boolean).join(
|
|
42
|
+
props['aria-describedby']
|
|
43
|
+
].filter(Boolean).join(' ') || undefined
|
|
44
44
|
});
|
|
45
45
|
return {
|
|
46
46
|
labelProps: labelProps,
|
package/dist/useField.mjs
CHANGED
|
@@ -29,12 +29,12 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
|
29
29
|
validationState
|
|
30
30
|
]);
|
|
31
31
|
fieldProps = (0, $2kC82$mergeProps)(fieldProps, {
|
|
32
|
-
|
|
32
|
+
'aria-describedby': [
|
|
33
33
|
descriptionId,
|
|
34
34
|
// Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
|
|
35
35
|
errorMessageId,
|
|
36
|
-
props[
|
|
37
|
-
].filter(Boolean).join(
|
|
36
|
+
props['aria-describedby']
|
|
37
|
+
].filter(Boolean).join(' ') || undefined
|
|
38
38
|
});
|
|
39
39
|
return {
|
|
40
40
|
labelProps: labelProps,
|
|
@@ -50,4 +50,4 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
export {$2baaea4c71418dea$export$294aa081a6c6f55d as useField};
|
|
53
|
-
//# sourceMappingURL=useField.
|
|
53
|
+
//# sourceMappingURL=useField.module.js.map
|
package/dist/useField.module.js
CHANGED
|
@@ -29,12 +29,12 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
|
29
29
|
validationState
|
|
30
30
|
]);
|
|
31
31
|
fieldProps = (0, $2kC82$mergeProps)(fieldProps, {
|
|
32
|
-
|
|
32
|
+
'aria-describedby': [
|
|
33
33
|
descriptionId,
|
|
34
34
|
// Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
|
|
35
35
|
errorMessageId,
|
|
36
|
-
props[
|
|
37
|
-
].filter(Boolean).join(
|
|
36
|
+
props['aria-describedby']
|
|
37
|
+
].filter(Boolean).join(' ') || undefined
|
|
38
38
|
});
|
|
39
39
|
return {
|
|
40
40
|
labelProps: labelProps,
|
package/dist/useLabel.main.js
CHANGED
|
@@ -18,7 +18,7 @@ $parcel$export(module.exports, "useLabel", () => $ce7359c25a7dec1c$export$846735
|
|
|
18
18
|
* governing permissions and limitations under the License.
|
|
19
19
|
*/
|
|
20
20
|
function $ce7359c25a7dec1c$export$8467354a121f1b9f(props) {
|
|
21
|
-
let { id: id, label: label,
|
|
21
|
+
let { id: id, label: label, 'aria-labelledby': ariaLabelledby, 'aria-label': ariaLabel, labelElementType: labelElementType = 'label' } = props;
|
|
22
22
|
id = (0, $eXjoL$reactariautils.useId)(id);
|
|
23
23
|
let labelId = (0, $eXjoL$reactariautils.useId)();
|
|
24
24
|
let labelProps = {};
|
|
@@ -26,13 +26,13 @@ function $ce7359c25a7dec1c$export$8467354a121f1b9f(props) {
|
|
|
26
26
|
ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
|
|
27
27
|
labelProps = {
|
|
28
28
|
id: labelId,
|
|
29
|
-
htmlFor: labelElementType ===
|
|
29
|
+
htmlFor: labelElementType === 'label' ? id : undefined
|
|
30
30
|
};
|
|
31
|
-
} else if (!ariaLabelledby && !ariaLabel) console.warn(
|
|
31
|
+
} else if (!ariaLabelledby && !ariaLabel) console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
32
32
|
let fieldProps = (0, $eXjoL$reactariautils.useLabels)({
|
|
33
33
|
id: id,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
'aria-label': ariaLabel,
|
|
35
|
+
'aria-labelledby': ariaLabelledby
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
38
|
labelProps: labelProps,
|
package/dist/useLabel.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import {useId as $83Elw$useId, useLabels as $83Elw$useLabels} from "@react-aria/
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
15
|
-
let { id: id, label: label,
|
|
15
|
+
let { id: id, label: label, 'aria-labelledby': ariaLabelledby, 'aria-label': ariaLabel, labelElementType: labelElementType = 'label' } = props;
|
|
16
16
|
id = (0, $83Elw$useId)(id);
|
|
17
17
|
let labelId = (0, $83Elw$useId)();
|
|
18
18
|
let labelProps = {};
|
|
@@ -20,13 +20,13 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
20
20
|
ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
|
|
21
21
|
labelProps = {
|
|
22
22
|
id: labelId,
|
|
23
|
-
htmlFor: labelElementType ===
|
|
23
|
+
htmlFor: labelElementType === 'label' ? id : undefined
|
|
24
24
|
};
|
|
25
|
-
} else if (!ariaLabelledby && !ariaLabel) console.warn(
|
|
25
|
+
} else if (!ariaLabelledby && !ariaLabel) console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
26
26
|
let fieldProps = (0, $83Elw$useLabels)({
|
|
27
27
|
id: id,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
'aria-label': ariaLabel,
|
|
29
|
+
'aria-labelledby': ariaLabelledby
|
|
30
30
|
});
|
|
31
31
|
return {
|
|
32
32
|
labelProps: labelProps,
|
|
@@ -36,4 +36,4 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
export {$d191a55c9702f145$export$8467354a121f1b9f as useLabel};
|
|
39
|
-
//# sourceMappingURL=useLabel.
|
|
39
|
+
//# sourceMappingURL=useLabel.module.js.map
|
package/dist/useLabel.module.js
CHANGED
|
@@ -12,7 +12,7 @@ import {useId as $83Elw$useId, useLabels as $83Elw$useLabels} from "@react-aria/
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
15
|
-
let { id: id, label: label,
|
|
15
|
+
let { id: id, label: label, 'aria-labelledby': ariaLabelledby, 'aria-label': ariaLabel, labelElementType: labelElementType = 'label' } = props;
|
|
16
16
|
id = (0, $83Elw$useId)(id);
|
|
17
17
|
let labelId = (0, $83Elw$useId)();
|
|
18
18
|
let labelProps = {};
|
|
@@ -20,13 +20,13 @@ function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
|
20
20
|
ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
|
|
21
21
|
labelProps = {
|
|
22
22
|
id: labelId,
|
|
23
|
-
htmlFor: labelElementType ===
|
|
23
|
+
htmlFor: labelElementType === 'label' ? id : undefined
|
|
24
24
|
};
|
|
25
|
-
} else if (!ariaLabelledby && !ariaLabel) console.warn(
|
|
25
|
+
} else if (!ariaLabelledby && !ariaLabel) console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
26
26
|
let fieldProps = (0, $83Elw$useLabels)({
|
|
27
27
|
id: id,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
'aria-label': ariaLabel,
|
|
29
|
+
'aria-labelledby': ariaLabelledby
|
|
30
30
|
});
|
|
31
31
|
return {
|
|
32
32
|
labelProps: labelProps,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/label",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.9",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-aria/utils": "^3.
|
|
26
|
-
"@react-types/shared": "^3.
|
|
25
|
+
"@react-aria/utils": "^3.25.0",
|
|
26
|
+
"@react-types/shared": "^3.24.0",
|
|
27
27
|
"@swc/helpers": "^0.5.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
30
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "86d80e3216bc32e75108831cf3a5a720bc849206"
|
|
36
36
|
}
|