Skip to content

Commit 22d6b8d

Browse files
author
Kubit
committed
Enhance Calendar Accessibility and Usability
This commit focuses on improving the accessibility and usability of the calendar component within our application. Key accessibility enhancements include the addition of `ariaDisabled` and `ariaLabel` attributes to the `MonthSelector` and `YearSelector` components, significantly improving screen reader support. These attributes provide users with disabilities a more intuitive and navigable experience. On the usability front, the `inputDate` component has been updated to offer a more flexible date range selection. This was achieved by adjusting the `maxDate` and `minDate` properties within `inputDate.stories.tsx`, allowing users to select dates that better suit their needs. Together, these changes aim to create a more inclusive and user-friendly calendar component.
1 parent 0d7f443 commit 22d6b8d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/components/calendar/selector/monthSelector/monthSelector.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ export const MonthSelector = (props: IMonthSelector): JSX.Element => {
6868
styles={props.styles}
6969
>
7070
<ItemRove
71+
ariaDisabled={setDisabledMonths(index)}
72+
ariaLabel={month.charAt(0).toUpperCase() + month.slice(1)}
7173
asElement={MonthElementStyled}
7274
focus={focus === index}
7375
index={index}

src/components/calendar/selector/yearSelector/yearSelector.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export const YearSelector = (props: IYearSelector): JSX.Element => {
5959
return (
6060
<YearListStyled key={index} state={state} styles={props.styles}>
6161
<ItemRove
62+
ariaLabel={String(year)}
6263
asElement={YearElementStyled}
6364
focus={focus === index}
6465
index={index}

0 commit comments

Comments
 (0)