diff --git a/components/lib/dialog/Dialog.js b/components/lib/dialog/Dialog.js index b98194ee21..61a225332e 100644 --- a/components/lib/dialog/Dialog.js +++ b/components/lib/dialog/Dialog.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import PrimeReact, { PrimeReactContext, localeOption } from '../api/Api'; +import PrimeReact, { PrimeReactContext, ariaLabel } from '../api/Api'; import { useHandleStyle } from '../componentbase/ComponentBase'; import { CSSTransition } from '../csstransition/CSSTransition'; import FocusTrap from '../focustrap/FocusTrap'; @@ -430,7 +430,7 @@ export const Dialog = React.forwardRef((inProps, ref) => { const createCloseIcon = () => { if (props.closable) { - const ariaLabel = props.ariaCloseIconLabel || localeOption('close'); + const labelAria = props.ariaCloseIconLabel || ariaLabel('close'); const closeButtonIconProps = mergeProps( { @@ -448,7 +448,7 @@ export const Dialog = React.forwardRef((inProps, ref) => { ref: closeRef, type: 'button', className: cx('closeButton'), - 'aria-label': ariaLabel, + 'aria-label': labelAria, onClick: onClose, onKeyDown: (ev) => { if (ev.key !== 'Escape') {