@instructure/ui-date-input 11.7.8-snapshot-10 → 11.7.8-snapshot-12

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,12 +3,11 @@
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.8-snapshot-10](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8-snapshot-10) (2026-10-02)
7
-
8
- **Note:** Version bump only for package @instructure/ui-date-input
9
-
6
+ ## [11.7.8-snapshot-12](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8-snapshot-12) (2026-10-02)
10
7
 
8
+ ### Bug Fixes
11
9
 
10
+ * **ui-date-input,ui-text-input:** label the input with aria-labelledby ([5e30958](https://github.com/instructure/instructure-ui/commit/5e30958230751e2f2f5dedb3d0b05c2a37341303))
12
11
 
13
12
 
14
13
  ## [11.7.7](https://github.com/instructure/instructure-ui/compare/v11.7.6...v11.7.7) (2026-09-23)
@@ -28,7 +28,7 @@ import { IconButton } from '@instructure/ui-buttons/latest';
28
28
  import { CalendarInstUIIcon, ChevronLeftInstUIIcon, ChevronRightInstUIIcon } from '@instructure/ui-icons';
29
29
  import { Popover } from '@instructure/ui-popover/latest';
30
30
  import { TextInput } from '@instructure/ui-text-input/latest';
31
- import { callRenderProp, passthroughProps } from '@instructure/ui-react-utils';
31
+ import { callRenderProp, passthroughProps, useDeterministicId } from '@instructure/ui-react-utils';
32
32
  import { getLocale, getTimezone } from '@instructure/ui-i18n';
33
33
  import { jsx as _jsx } from "@emotion/react/jsx-runtime";
34
34
  function parseLocaleDate(dateString = '', locale, timeZone) {
@@ -211,12 +211,14 @@ const DateInput = /*#__PURE__*/forwardRef(({
211
211
  onBlur?.(e, value || '', utcIsoDate);
212
212
  };
213
213
  const selectedDate = parseDate(value)[1];
214
+ const labelId = useDeterministicId('TextInput-label')();
214
215
  return _jsx(TextInput, {
215
216
  ...passthroughProps(rest),
216
217
  ref: ref,
217
218
  inputRef: inputRef,
218
219
  renderLabel: renderLabel,
219
- "aria-label": callRenderProp(renderLabel),
220
+ labelId: labelId,
221
+ "aria-labelledby": labelId,
220
222
  onChange: handleInputChange,
221
223
  onBlur: handleBlur,
222
224
  isRequired: isRequired,
@@ -12,6 +12,7 @@ var _latest3 = require("@instructure/ui-popover/latest");
12
12
  var _latest4 = require("@instructure/ui-text-input/latest");
13
13
  var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
14
14
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
15
+ var _useDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/useDeterministicId.js");
15
16
  var _getLocale = require("@instructure/ui-i18n/lib/getLocale.js");
16
17
  var _getTimezone = require("@instructure/ui-i18n/lib/getTimezone.js");
17
18
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
@@ -219,12 +220,14 @@ const DateInput = exports.DateInput = /*#__PURE__*/(0, _react.forwardRef)(({
219
220
  onBlur?.(e, value || '', utcIsoDate);
220
221
  };
221
222
  const selectedDate = parseDate(value)[1];
223
+ const labelId = (0, _useDeterministicId.useDeterministicId)('TextInput-label')();
222
224
  return (0, _jsxRuntime.jsx)(_latest4.TextInput, {
223
225
  ...(0, _passthroughProps.passthroughProps)(rest),
224
226
  ref: ref,
225
227
  inputRef: inputRef,
226
228
  renderLabel: renderLabel,
227
- "aria-label": (0, _callRenderProp.callRenderProp)(renderLabel),
229
+ labelId: labelId,
230
+ "aria-labelledby": labelId,
228
231
  onChange: handleInputChange,
229
232
  onBlur: handleBlur,
230
233
  isRequired: isRequired,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-date-input",
3
- "version": "11.7.8-snapshot-10",
3
+ "version": "11.7.8-snapshot-12",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -15,24 +15,24 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.29.7",
18
- "@instructure/emotion": "11.7.8-snapshot-10",
19
- "@instructure/ui-buttons": "11.7.8-snapshot-10",
20
- "@instructure/shared-types": "11.7.8-snapshot-10",
21
- "@instructure/ui-calendar": "11.7.8-snapshot-10",
22
- "@instructure/ui-form-field": "11.7.8-snapshot-10",
23
- "@instructure/ui-i18n": "11.7.8-snapshot-10",
24
- "@instructure/ui-popover": "11.7.8-snapshot-10",
25
- "@instructure/ui-icons": "11.7.8-snapshot-10",
26
- "@instructure/ui-position": "11.7.8-snapshot-10",
27
- "@instructure/ui-react-utils": "11.7.8-snapshot-10",
28
- "@instructure/ui-selectable": "11.7.8-snapshot-10",
29
- "@instructure/ui-text-input": "11.7.8-snapshot-10",
30
- "@instructure/ui-utils": "11.7.8-snapshot-10"
18
+ "@instructure/emotion": "11.7.8-snapshot-12",
19
+ "@instructure/ui-buttons": "11.7.8-snapshot-12",
20
+ "@instructure/ui-calendar": "11.7.8-snapshot-12",
21
+ "@instructure/ui-form-field": "11.7.8-snapshot-12",
22
+ "@instructure/ui-i18n": "11.7.8-snapshot-12",
23
+ "@instructure/shared-types": "11.7.8-snapshot-12",
24
+ "@instructure/ui-icons": "11.7.8-snapshot-12",
25
+ "@instructure/ui-popover": "11.7.8-snapshot-12",
26
+ "@instructure/ui-position": "11.7.8-snapshot-12",
27
+ "@instructure/ui-selectable": "11.7.8-snapshot-12",
28
+ "@instructure/ui-text-input": "11.7.8-snapshot-12",
29
+ "@instructure/ui-utils": "11.7.8-snapshot-12",
30
+ "@instructure/ui-react-utils": "11.7.8-snapshot-12"
31
31
  },
32
32
  "devDependencies": {
33
33
  "vitest": "^5.0.0",
34
- "@instructure/ui-babel-preset": "11.7.8-snapshot-10",
35
- "@instructure/ui-scripts": "11.7.8-snapshot-10"
34
+ "@instructure/ui-babel-preset": "11.7.8-snapshot-12",
35
+ "@instructure/ui-scripts": "11.7.8-snapshot-12"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "react": ">=18 <=19"
@@ -33,7 +33,11 @@ import {
33
33
  } from '@instructure/ui-icons'
34
34
  import { Popover } from '@instructure/ui-popover/latest'
35
35
  import { TextInput } from '@instructure/ui-text-input/latest'
36
- import { callRenderProp, passthroughProps } from '@instructure/ui-react-utils'
36
+ import {
37
+ callRenderProp,
38
+ passthroughProps,
39
+ useDeterministicId
40
+ } from '@instructure/ui-react-utils'
37
41
  import { getLocale, getTimezone } from '@instructure/ui-i18n'
38
42
 
39
43
  import type { DateInputProps } from './props'
@@ -258,6 +262,7 @@ const DateInput = forwardRef(
258
262
  }
259
263
 
260
264
  const selectedDate = parseDate(value)[1]
265
+ const labelId = useDeterministicId('TextInput-label')()
261
266
 
262
267
  return (
263
268
  <TextInput
@@ -265,7 +270,8 @@ const DateInput = forwardRef(
265
270
  ref={ref}
266
271
  inputRef={inputRef}
267
272
  renderLabel={renderLabel}
268
- aria-label={callRenderProp(renderLabel)}
273
+ labelId={labelId}
274
+ aria-labelledby={labelId}
269
275
  onChange={handleInputChange}
270
276
  onBlur={handleBlur}
271
277
  isRequired={isRequired}