Skip to content

Commit 98e9d3c

Browse files
author
Hector Arce De Las Heras
committed
Correct Application of aria-label through Sorted Props
This commit ensures the correct application of the aria-label attribute by sorting the props. This change enhances the accessibility of the components and ensures that screen readers interpret the aria-label as intended.
1 parent 52d2aa5 commit 98e9d3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/calendar/selector/selector.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ export const Selector = (props: ISelector): JSX.Element => {
126126
<SelectorStyled isDaySelector={isDaySelector} styles={props.styles}>
127127
<IconAndBackTextStyled styles={props.styles} onClick={handleOnClickBack}>
128128
<ElementOrIcon
129+
color={iconArrowDisabled(props.minDate) ? props.styles?.colorArrowDisabled : undefined}
130+
customIconStyles={props.styles?.leftArrow}
131+
disabled={iconArrowDisabled(props.minDate)}
132+
{...leftArrowIcon}
129133
aria-label={
130134
showCustomSelector
131135
? props.configAccesibility?.backToMonthAriaLabel
132136
: leftArrowIcon['aria-label']
133137
}
134-
color={iconArrowDisabled(props.minDate) ? props.styles?.colorArrowDisabled : undefined}
135-
customIconStyles={props.styles?.leftArrow}
136-
disabled={iconArrowDisabled(props.minDate)}
137-
{...leftArrowIcon}
138138
onClick={handleOnClickLeftIcon}
139139
/>
140140
{showCustomSelector && (

0 commit comments

Comments
 (0)