@@ -22,7 +22,7 @@ import PickerPanel, {
2222} from './PickerPanel' ;
2323import PickerTrigger from './PickerTrigger' ;
2424import { isEqual } from './utils/dateUtil' ;
25- import { toArray } from './utils/miscUtil' ;
25+ import getDataOrAriaProps , { toArray } from './utils/miscUtil' ;
2626import PanelContext , { ContextOperationRefProps } from './PanelContext' ;
2727import { PickerMode } from './interface' ;
2828import {
@@ -31,7 +31,7 @@ import {
3131 addGlobalMouseDownEvent ,
3232} from './utils/uiUtil' ;
3333
34- export interface PickerSharedProps < DateType > {
34+ export interface PickerSharedProps < DateType > extends React . AriaAttributes {
3535 dropdownClassName ?: string ;
3636 dropdownAlign ?: AlignType ;
3737 popupStyle ?: React . CSSProperties ;
@@ -65,6 +65,9 @@ export interface PickerSharedProps<DateType> {
6565 // Internal
6666 /** @private Internal usage, do not use in production mode!!! */
6767 inputRef ?: React . Ref < HTMLInputElement > ;
68+
69+ // WAI-ARIA
70+ role ?: string ;
6871}
6972
7073export interface PickerBaseProps < DateType >
@@ -481,6 +484,7 @@ function InnerPicker<DateType>(props: PickerProps<DateType>) {
481484 placeholder = { placeholder }
482485 ref = { inputRef }
483486 size = { getInputSize ( picker , formatList [ 0 ] ) }
487+ { ...getDataOrAriaProps ( props ) }
484488 />
485489 { suffixNode }
486490 { clearNode }
0 commit comments