General developer forum

AMD Modals and Custom Events

 
Picture of Hana Kim
AMD Modals and Custom Events
 

I'm trying to make a modal popup that allows keyboard navigation. I've looked at and tried using the code in calendar/amd/src/calendar.js, lib/amd/src/addblockmodal.js, and output/popup/amd/src/message_popover_controller.js. 

I've been able to add a working modal popup, however, it does not work with keyboard navigation. I've looked into using CustomEvents to add keyboard navigation. How do I use the CustomEvents library? I noticed that calendar.js does not use CustomEvents.events.activate, but I am able to use keyboard navigation to open the modal window (the functionality I want for my modal popup).

 
Average of ratings: -
Picture of Rex Lorenzo
Re: AMD Modals and Custom Events
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Plugins guardiansGroup Testers

Does anyone have any insight to share? We are hoping to implement the Custom Events improvement for accessibility that Damyon suggested in https://tracker.moodle.org/browse/MDL-59653

We are at a roadblock on how to do this type of improvement.

 
Average of ratings: -