Skip to content

Commit

Permalink
fix(Datepicker): aria-popup on the wrong element (#18838)
Browse files Browse the repository at this point in the history
* fix datepicker aria-haspopup location

* update snapshots

* Change files
  • Loading branch information
smhigley authored Jul 7, 2021
1 parent 6b7dca3 commit bc44a88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Datepicker: move aria-haspopup to the correct element",
"packageName": "@fluentui/react",
"email": "sarah.higley@microsoft.com",
"dependentChangeType": "patch"
}
8 changes: 2 additions & 6 deletions packages/react/src/components/DatePicker/DatePicker.base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,17 +431,13 @@ export const DatePickerBase: React.FunctionComponent<IDatePickerProps> = React.f

return (
<div {...nativeProps} className={classNames.root} ref={forwardedRef}>
<div
ref={datePickerDiv}
aria-haspopup="true"
aria-owns={isCalendarShown ? calloutId : undefined}
className={classNames.wrapper}
>
<div ref={datePickerDiv} aria-owns={isCalendarShown ? calloutId : undefined} className={classNames.wrapper}>
<TextField
role="combobox"
label={label}
aria-expanded={isCalendarShown}
ariaLabel={ariaLabel}
aria-haspopup="dialog"
aria-controls={isCalendarShown ? calloutId : undefined}
required={isRequired}
disabled={disabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ exports[`DatePicker renders default DatePicker correctly 1`] = `
padding-top: 0px;
}
>
<div
aria-haspopup="true"
>
<div>
<div
className=
ms-TextField
Expand Down Expand Up @@ -92,6 +90,7 @@ exports[`DatePicker renders default DatePicker correctly 1`] = `
<input
aria-describedby="TextFieldDescription3"
aria-expanded={false}
aria-haspopup="dialog"
aria-invalid={false}
className=
ms-TextField-field
Expand Down

0 comments on commit bc44a88

Please sign in to comment.