This issue was detected during accessibility audit on learner-facing pages in Workplace performed in August-September 2023 by AbleDocs.
Description from AbleDocs:
When keyboard focus leaves the pop-up calendar, the focus return to "Skip to main content" link instead of moving to the next element in the Filter dropdown menu
Comments from me (Marina):
This has been noticed in the reportbuilder filter form that contains the date range, we have it in appointments sessions filters in workplace. You can also reproduce it in vanilla LMS (although I can't think of any system reports in vanilla LMS available to students with a date filter):
- Login as a user who has access to custom reports
- Open profile menu and click "Reports" (make sure that you have at least one report in the list)
- Tab to the "Filters" button, then tab to the "Time created" filter and select a range and then enable "Date from"
- Now tab to the calendar icon next to the input field and press Enter
- Datepicker opens and it looks like this:
- Now try to tab to any elements in this datepicker
- You will see that the filter popup closes (***) but the datepicker modal stays open, and after couple of tabs the date picker also closes and the focus jumps to the "Skip to main contents" link on the top of the page
Note that there is a separate issue
MDL-80197 that you can not actually tab to any dates in the datepicker popup either. It affects any moodleform with the datepicker, when this issue is specifically about the "Filters" form in the reportbuilder. It looks like there is some workaround for the focus return in the general moodleforms because I can see that the "Skip to main content" link is also selected for a brief moment but then the focus moves back to the icon that opened the datepicker modal.
It is probably because the "filters" area is already closed (see *** above) and the calendar icon button that was used to open the datepicker popup is no longer visible.