@@ -15,8 +15,10 @@ export interface ChatbotConversationHistoryDropdownProps extends Omit<DropdownPr
1515 menuItems : React . ReactNode ;
1616 /** Optional classname applied to conversation settings dropdown */
1717 menuClassName ?: string ;
18- /** Tooltip content and aria-label applied to conversation settings dropdown */
18+ /** Tooltip content applied to conversation settings dropdown */
1919 label ?: string ;
20+ /** Aria-label applied to conversation settings dropdown */
21+ 'aria-label' ?: string ;
2022 /** Callback for when user selects item. */
2123 onSelect ?: ( event ?: React . MouseEvent , value ?: string | number ) => void ;
2224 /** Id applied to dropdown menu toggle */
@@ -27,23 +29,24 @@ export const ChatbotConversationHistoryDropdown: FunctionComponent<ChatbotConver
2729 menuItems,
2830 menuClassName,
2931 onSelect,
30- label,
32+ label = 'Conversation options' ,
33+ 'aria-label' : ariaLabel ,
3134 id
3235} : ChatbotConversationHistoryDropdownProps ) => {
3336 const [ isOpen , setIsOpen ] = useState ( false ) ;
3437
3538 const toggle = ( toggleRef : Ref < MenuToggleElement > ) => (
3639 < Tooltip
3740 className = "pf-chatbot__tooltip"
38- content = { label ?? 'Conversation options' }
41+ content = { label }
3942 position = "bottom"
4043 // prevents VO announcements of both aria label and tooltip
4144 aria = "none"
4245 >
4346 < MenuToggle
4447 className = "pf-chatbot__history-actions"
4548 variant = "plain"
46- aria-label = { label ?? 'Conversation options' }
49+ aria-label = { ariaLabel ?? label }
4750 ref = { toggleRef }
4851 isExpanded = { isOpen }
4952 onClick = { ( ) => setIsOpen ( ! isOpen ) }
0 commit comments