From 1fc0893693067ba30a2daee1d2f6f45511ced498 Mon Sep 17 00:00:00 2001 From: balajis-qb Date: Wed, 28 Jan 2026 17:50:46 +0530 Subject: [PATCH 1/2] =?UTF-8?q?=E2=99=BF=EF=B8=8F=20Add=20accessibility=20?= =?UTF-8?q?for=20month=20dropdown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #6223 --- src/month_dropdown.tsx | 16 ++++++- src/month_dropdown_options.tsx | 1 + src/test/month_dropdown_test.test.tsx | 60 +++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 2 deletions(-) diff --git a/src/month_dropdown.tsx b/src/month_dropdown.tsx index 9efd3c7279..02b996e65f 100644 --- a/src/month_dropdown.tsx +++ b/src/month_dropdown.tsx @@ -36,7 +36,12 @@ export default class MonthDropdown extends Component< renderSelectOptions = (monthNames: string[]): React.ReactElement[] => monthNames.map( (m: string, i: number): React.ReactElement => ( - ), @@ -47,6 +52,7 @@ export default class MonthDropdown extends Component< value={this.props.month} className="react-datepicker__month-select" onChange={(e) => this.onChange(parseInt(e.target.value))} + aria-label="Select Month" > {this.renderSelectOptions(monthNames)} @@ -62,8 +68,14 @@ export default class MonthDropdown extends Component< style={{ visibility: visible ? "visible" : "hidden" }} className="react-datepicker__month-read-view" onClick={this.toggleDropdown} + aria-label="Select Month" + aria-expanded={this.state.dropdownVisible} + aria-haspopup="listbox" > - +