Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React

Home Page:https://reactdatepicker.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calendar Aria Labels is not updating corresponding to it's purpose

balajis-qb opened this issue · comments

Describe the bug
The current implementation of the Calendar component fails to update aria labels according to the selection purpose, leading to accessibility issues. The aria labels remain static, displaying "Choose Date" regardless of the selection type like showTimeInput or showTimeSelect or showTimeSelectOnly.

The Problem
The lack of dynamic aria labels hinders user accessibility, as it fails to provide clear information about the selection options available.

Proposed Solution
Implement functionality to update aria-label dynamically based on the selection purpose (date or date and time, or time only) to enhance user experience and accessibility.

To Reproduce
Render DatePicker with any time-related props and check aria-label of the element with the class react-datepicker.