WCAG tweaks
-
I’m trying to complete an accessibility audit and there were a few issues with the plugin. I need help with #1-2 and give you my solutions for #3-4:
1. Do not allow Tab or Shift Tab to move focus outside of this modal. WCAG 2.4.3 Serious.
2. Return focus to the invoking element within the parent document when the modal is closed. WCAG 2.4.7 Critical.
— I tried doing this in my theme’s js but I get “closeAlert is not a function” (also, I’m not great with jquery beyond the basics):
$(‘.exitNotifierLink’).click(function() {
var exitlinkclicked = $(this);
});
$(‘.jAlert’).closeAlert(function() {
$(exitlinkclicked).focus();
});3. Give the <div> containing the modal a role=”region” and aria-label=”You are leaving [sitename]”.
— I made this change on line 436 of jAlert-v3.js4. Mark close up as a button.
— I changed div to button on line 442 (and assigned a pre-existing class to fix appearance)
- The topic ‘WCAG tweaks’ is closed to new replies.