Skip to content

Commit 3c10789

Browse files
authored
Fix aria-expanded to use direct boolean values (#5166)
1 parent 1b17b55 commit 3c10789

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@react-aria/datepicker/src/useDatePicker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export function useDatePicker<T extends DateValue>(props: AriaDatePickerProps<T>
142142
'aria-label': stringFormatter.format('calendar'),
143143
'aria-labelledby': `${buttonId} ${labelledBy}`,
144144
'aria-describedby': ariaDescribedBy,
145-
'aria-expanded': state.isOpen || undefined,
145+
'aria-expanded': state.isOpen,
146146
onPress: () => state.setOpen(true)
147147
},
148148
dialogProps: {

packages/@react-aria/datepicker/src/useDateRangePicker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function useDateRangePicker<T extends DateValue>(props: AriaDateRangePick
152152
'aria-label': stringFormatter.format('calendar'),
153153
'aria-labelledby': `${buttonId} ${labelledBy}`,
154154
'aria-describedby': ariaDescribedBy,
155-
'aria-expanded': state.isOpen || undefined,
155+
'aria-expanded': state.isOpen,
156156
onPress: () => state.setOpen(true)
157157
},
158158
dialogProps: {

0 commit comments

Comments
 (0)