The templates for accessible Lightbox, Banner, Tooltip, and Popup controls provide scalable AccDC Object declarations to automate accessibility for screen reader and keyboard only users.
Module files:
The packaged file for this demo can be downloaded from WhatSock.com under Downloads.
Instructions:
Instructions:
Instructions:
Instructions:
// Using the ID property of each AccDC Object, such as 'lightbox'
$A.reg.lightbox.open();
// Or using the ID 'popup'
$A.reg.popup.close();
// Change the functionality of the Login lightbox to show a Registration lightbox instead
// First, change the role for screen reader users
$A.reg.lightbox.role = 'Register';
// Change the resource locator to point to another form container
$A.reg.lightbox.source = 'files/overlays.html #register1';
// Change the size and width to match the dimensions of the new lightbox
$A.reg.lightbox.cssObj.height = '400px';
$A.reg.lightbox.cssObj.width = '750px';
// Lastly, swap the runAfter function with another function so that event handlers can be properly registered when it opens
$A.reg.lightbox.runAfter = someOtherFunction;
// Now open the newly configured lightbox AccDC Object
$A.reg.lightbox.open();