Difference between revisions of "Modal dialog with ARIA"

From Level Access Web Labs
Jump to navigation Jump to search
(Remove aria-hidden on the sr-only text to mark the start and end of the modal dialog)
(move focus to first input in dialog, not to whole dialog)
Line 74: Line 74:
 
       setTimeout(function(){
 
       setTimeout(function(){
 
         focusStack.push(document.activeElement);
 
         focusStack.push(document.activeElement);
         document.getElementById("dialog1").focus();
+
      //  document.getElementById("dialog1").focus();
 +
         document.getElementById("i1").focus();
 
         document.getElementById("modalShadingOverlay").style.display = "block";
 
         document.getElementById("modalShadingOverlay").style.display = "block";
 
       //  document.getElementById("pageContent").className = "body-dimmed";
 
       //  document.getElementById("pageContent").className = "body-dimmed";

Revision as of 18:55, 15 December 2016

Example

Note - not implemented:

  • Constraining keyboard focus within the modal dialog


...

...