Skip to content

Commit 2878503

Browse files
authored
fix(v8 DatePicker): Add aria-required to required DatePickers (#33239)
1 parent 0b6257a commit 2878503

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix(v8 DatePicker): Add aria-required to required DatePickers",
4+
"packageName": "@fluentui/react",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/react/src/components/DatePicker/DatePicker.base.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ export const DatePickerBase: React.FunctionComponent<IDatePickerProps> = React.f
496496
role="combobox"
497497
label={label}
498498
aria-expanded={isCalendarShown}
499+
aria-required={isRequired}
499500
ariaLabel={ariaLabel}
500501
aria-haspopup="dialog"
501502
aria-controls={isCalendarShown ? calloutId : undefined}

packages/react/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ exports[`DatePicker renders DatePicker allowing text input correctly 1`] = `
9292
aria-expanded={false}
9393
aria-haspopup="dialog"
9494
aria-invalid={false}
95+
aria-required={false}
9596
className=
9697
ms-TextField-field
9798
{
@@ -322,6 +323,7 @@ exports[`DatePicker renders DatePicker with value correctly 1`] = `
322323
aria-expanded={false}
323324
aria-haspopup="dialog"
324325
aria-invalid={false}
326+
aria-required={false}
325327
className=
326328
ms-TextField-field
327329
{
@@ -553,6 +555,7 @@ exports[`DatePicker renders default DatePicker correctly 1`] = `
553555
aria-expanded={false}
554556
aria-haspopup="dialog"
555557
aria-invalid={false}
558+
aria-required={false}
556559
className=
557560
ms-TextField-field
558561
{

0 commit comments

Comments
 (0)