diff --git a/packages/terra-date-picker/CHANGELOG.md b/packages/terra-date-picker/CHANGELOG.md index a4072104bfa..a84d3bd1c8d 100644 --- a/packages/terra-date-picker/CHANGELOG.md +++ b/packages/terra-date-picker/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +* Changed + * Updated screen reader response not to announce name attribute. + ## 4.95.0 - (December 18, 2023) * Changed diff --git a/packages/terra-date-picker/src/DateInput.jsx b/packages/terra-date-picker/src/DateInput.jsx index ef84b4c922b..2abd0ba0baa 100644 --- a/packages/terra-date-picker/src/DateInput.jsx +++ b/packages/terra-date-picker/src/DateInput.jsx @@ -229,7 +229,6 @@ const DatePickerInput = (props) => { const additionalInputProps = { ...customProps, ...inputAttributes }; const momentDateFormat = useMemo(() => DateUtil.getFormatByLocale(intl.locale), [intl.locale]); - const nameLabelId = `name-label-${uuidv4()}`; const dateValue = useMemo(() => (DateUtil.convertToISO8601(value, momentDateFormat)), [momentDateFormat, value]); const dateFormatOrder = DateUtil.getDateFormatOrder(momentDateFormat); const separator = DateUtil.getDateSeparator(intl.locale); @@ -734,7 +733,7 @@ const DatePickerInput = (props) => { pattern="\d*" aria-required={required} aria-label={intl.formatMessage({ id: 'Terra.datePicker.dayLabel' })} - aria-describedby={dateFormatOrder === DateUtil.dateOrder.DMY ? `${nameLabelId} ${ariaDescriptionIds}` : ariaDescriptionIds} + aria-describedby={ariaDescriptionIds} id={dayInputId} /> ); @@ -765,7 +764,7 @@ const DatePickerInput = (props) => { pattern="\d*" aria-required={required} aria-label={intl.formatMessage({ id: 'Terra.datePicker.monthLabel' })} - aria-describedby={dateFormatOrder === DateUtil.dateOrder.MDY ? `${nameLabelId} ${ariaDescriptionIds}` : ariaDescriptionIds} + aria-describedby={ariaDescriptionIds} id={monthInputId} /> ); @@ -796,7 +795,7 @@ const DatePickerInput = (props) => { pattern="\d*" aria-required={required} aria-label={intl.formatMessage({ id: 'Terra.datePicker.yearLabel' })} - aria-describedby={dateFormatOrder === DateUtil.dateOrder.YMD ? `${nameLabelId} ${ariaDescriptionIds}` : ariaDescriptionIds} + aria-describedby={ariaDescriptionIds} id={yearInputId} /> ); @@ -852,7 +851,6 @@ const DatePickerInput = (props) => { value={dateValue} /> - - - - - - - Terra.datePicker.date - Terra.datePicker.date - Terra.datePicker.date - - - - date-input - - - - - date-input - - - - - test-date-picker - - - - - test-date-picker - - - - - test-date-picker - -