-
Notifications
You must be signed in to change notification settings - Fork 72
[date-time-picker]Fix for space and label issues #1969
Changes from 16 commits
65c0f17
1489e76
22f4ca4
e975486
5723e35
74ba754
6b1ef69
88b5455
a0d1b13
a084abb
a6bea96
b0a2fd1
0591fd4
c2ebbfa
0aba7ac
01010dd
3e1ae7b
921f8d4
34bca0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -734,7 +734,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={`${nameLabelId} ${ariaDescriptionIds}`} | ||||||
id={dayInputId} | ||||||
/> | ||||||
); | ||||||
|
@@ -765,7 +765,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={`${nameLabelId} ${ariaDescriptionIds}`} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The utilization of commas in this context may lead to suboptimal behavior with assistive technologies -as per the MDN websites |
||||||
id={monthInputId} | ||||||
/> | ||||||
); | ||||||
|
@@ -796,7 +796,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={`${nameLabelId} ${ariaDescriptionIds}`} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The utilization of commas in this context may lead to suboptimal behavior with assistive technologies -as per the MDN websites |
||||||
id={yearInputId} | ||||||
/> | ||||||
); | ||||||
|
@@ -851,8 +851,7 @@ const DatePickerInput = (props) => { | |||||
name={name} | ||||||
value={dateValue} | ||||||
/> | ||||||
<VisuallyHiddenText text={value ? `${label}, ${getLocalizedDateForScreenReader(DateUtil.createSafeDate(dateValue, initialTimeZone), { intl, locale: intl.locale })}` : label} /> | ||||||
<VisuallyHiddenText id={nameLabelId} text={name} /> | ||||||
<VisuallyHiddenText id={nameLabelId} text={value ? `${label}, ${getLocalizedDateForScreenReader(DateUtil.createSafeDate(dateValue, initialTimeZone), { intl, locale: intl.locale })}` : label} /> | ||||||
<VisuallyHiddenText | ||||||
refCallback={setVisuallyHiddenComponent} | ||||||
aria-atomic="true" | ||||||
|
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The utilization of commas in this context may lead to suboptimal behavior with assistive technologies -as per the MDN websites