Skip to content

Commit

Permalink
fix(Datepicker): change role on calendar container to 'application' (#…
Browse files Browse the repository at this point in the history
…11570) (#11838)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

Co-authored-by: D.A. Kahn <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 26, 2022
1 parent 5d99117 commit 6abdbf3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/react/src/components/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 6abdbf3

Please sign in to comment.