Skip to content

Commit

Permalink
Reference correct translation key for the aria-label attribute with…
Browse files Browse the repository at this point in the history
…in UIMessage's Close Icon (primefaces#7365)
  • Loading branch information
zaguiini authored Oct 22, 2024
1 parent c31fd7d commit 3dec07f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/lib/messages/UIMessage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { localeOption } from '../api/Api';
import { ariaLabel } from '../api/Api';
import { useTimeout } from '../hooks/Hooks';
import { CheckIcon } from '../icons/check';
import { ExclamationTriangleIcon } from '../icons/exclamationtriangle';
Expand Down Expand Up @@ -53,8 +53,6 @@ export const UIMessage = React.memo(

const createCloseIcon = () => {
if (closable !== false) {
const ariaLabel = localeOption('close');

const buttonIconProps = mergeProps(
{
className: cx('uimessage.buttonicon')
Expand All @@ -70,7 +68,7 @@ export const UIMessage = React.memo(
{
type: 'button',
className: cx('uimessage.button'),
'aria-label': ariaLabel,
'aria-label': ariaLabel('close'),
onClick: onClose
},
getPTOptions('button', parentParams),
Expand Down

0 comments on commit 3dec07f

Please sign in to comment.