🎯
User Research Platform
Tools for conducting and analyzing UX research studies.
A fully accessible modal implementation with focus trap, keyboard navigation, and proper ARIA attributes. Try navigating with keyboard only!
Tools for conducting and analyzing UX research studies.
Real-time metrics visualization for web applications.
Secure, accessible login and registration system.
Tab key stays within the modal until closed
Focus returns to trigger button on close
Press Escape key to dismiss the modal
Screen readers announce modal content properly
class Modal {
open(trigger) {
// Store trigger for focus return
this.previouslyFocused = trigger;
// Show modal
this.modal.setAttribute('aria-hidden', 'false');
document.body.classList.add('modal-open');
// Setup focus trap & move focus
this.setupFocusTrap();
this.firstFocusable?.focus();
}
close() {
this.modal.setAttribute('aria-hidden', 'true');
document.body.classList.remove('modal-open');
// Return focus to trigger
this.previouslyFocused?.focus();
}
}