Skip to content

Commit

Permalink
Fix #5637: Sidebar aria-label close (#5638)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Dec 22, 2023
1 parent eaef7dd commit 90c3134
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/lib/sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ export const Sidebar = React.forwardRef((inProps, ref) => {
});

const createCloseIcon = () => {
const ariaLabel = props.ariaCloseLabel || localeOption('close');

const closeButtonProps = mergeProps(
{
type: 'button',
Expand All @@ -179,7 +181,6 @@ export const Sidebar = React.forwardRef((inProps, ref) => {

const icon = props.closeIcon || <TimesIcon {...closeIconProps} />;
const closeIcon = IconUtils.getJSXIcon(icon, { ...closeIconProps }, { props });
const ariaLabel = props.ariaCloseLabel || localeOption('close');

if (props.showCloseIcon) {
return (
Expand Down

0 comments on commit 90c3134

Please sign in to comment.