From 6abdbf336fcd4d7f109695370c321a57683147b9 Mon Sep 17 00:00:00 2001 From: Taylor Jones Date: Tue, 26 Jul 2022 16:17:47 -0500 Subject: [PATCH] fix(Datepicker): change role on calendar container to 'application' (#11570) (#11838) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: D.A. Kahn <40970507+dakahn@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/react/src/components/DatePicker/DatePicker.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/react/src/components/DatePicker/DatePicker.js b/packages/react/src/components/DatePicker/DatePicker.js index 889aefd17330..c1caa7abecb8 100644 --- a/packages/react/src/components/DatePicker/DatePicker.js +++ b/packages/react/src/components/DatePicker/DatePicker.js @@ -467,14 +467,12 @@ export default class DatePicker extends Component { } }; - /** - * Flatpickr's calendar dialog is not rendered in a landmark causing an - * error with IBM Equal Access Accessibility Checker so we add an aria - * role to the container div. - */ + // Flatpickr's calendar dialog is not rendered in a landmark causing an + // error with IBM Equal Access Accessibility Checker so we add an aria + // role to the container div. addRoleAttributeToDialog = () => { if (this.inputField) { - this.cal.calendarContainer.setAttribute('role', 'region'); + this.cal.calendarContainer.setAttribute('role', 'application'); // IBM EAAC requires an aria-label on a role='region' this.cal.calendarContainer.setAttribute( 'aria-label',