77import React from 'react'
88import PropTypes from 'prop-types'
99import { Box , Text } from '@salesforce/retail-react-app/app/components/shared/ui'
10- import { FormattedMessage } from 'react-intl'
10+ import { FormattedMessage , useIntl } from 'react-intl'
1111import { SparkleIcon , ChevronRightIcon } from '@salesforce/retail-react-app/app/components/icons'
1212
1313const AskAssistantBanner = ( { onClick, styles} ) => {
14+ const intl = useIntl ( )
15+ const title = intl . formatMessage ( {
16+ id : 'search.suggestions.askAssistant.title' ,
17+ defaultMessage : 'Ask Shopping Agent'
18+ } )
19+ const description = intl . formatMessage ( {
20+ id : 'search.suggestions.askAssistant.description' ,
21+ defaultMessage : 'Discover, compare, and shop smarter with your personal Shopping Agent.'
22+ } )
23+ const ariaLabel = `${ title } - ${ description } `
24+
1425 const handleInteraction = ( e ) => {
1526 e . preventDefault ( )
1627 e . stopPropagation ( )
@@ -25,7 +36,7 @@ const AskAssistantBanner = ({onClick, styles}) => {
2536 textAlign = "left"
2637 onMouseDown = { handleInteraction }
2738 onClick = { handleInteraction }
28- aria-label = "Ask Shopping Agent - Discover, compare and shop smarter with your personal shopping assistant"
39+ aria-label = { ariaLabel }
2940 >
3041 < Box { ...styles . askAssistantBannerIcon } >
3142 < SparkleIcon boxSize = { 5 } color = "gray.800" />
0 commit comments