feat: implement comprehensive 501(c)(3), OFAC humanitarian exemption, privacy policy, and WCAG 2.1 AA accessibility compliance
This commit is contained in:
+46
@@ -362,6 +362,52 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}
|
||||
}
|
||||
|
||||
// Privacy & Compliance Modal Logic
|
||||
const privacyModal = document.getElementById('privacy-modal');
|
||||
const privacyModalClose = document.getElementById('privacy-modal-close');
|
||||
const privacyModalCloseBtn = document.getElementById('privacy-modal-close-btn');
|
||||
|
||||
function openPrivacyModal() {
|
||||
if (privacyModal) {
|
||||
privacyModal.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
}
|
||||
|
||||
function closePrivacyModal() {
|
||||
if (privacyModal) {
|
||||
privacyModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
}
|
||||
|
||||
document.querySelectorAll('.open-privacy-modal-btn').forEach(btn => {
|
||||
btn.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
openPrivacyModal();
|
||||
});
|
||||
});
|
||||
|
||||
if (privacyModalClose) privacyModalClose.addEventListener('click', closePrivacyModal);
|
||||
if (privacyModalCloseBtn) privacyModalCloseBtn.addEventListener('click', closePrivacyModal);
|
||||
if (privacyModal) {
|
||||
privacyModal.addEventListener('click', (e) => {
|
||||
if (e.target === privacyModal) closePrivacyModal();
|
||||
});
|
||||
}
|
||||
|
||||
// Global Escape Key Listener for Accessible Modal Dismissal (WCAG 2.1 AA)
|
||||
window.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' || e.key === 'Esc') {
|
||||
if (donateModal && donateModal.classList.contains('active')) closeModal();
|
||||
if (typeof prayerModal !== 'undefined' && prayerModal && prayerModal.classList.contains('active')) {
|
||||
prayerModal.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
if (privacyModal && privacyModal.classList.contains('active')) closePrivacyModal();
|
||||
}
|
||||
});
|
||||
|
||||
// Initial Language Load
|
||||
setLanguage(currentLang);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user