rf desafios+soluciones
This commit is contained in:
@@ -238,6 +238,14 @@ function initModals() {
|
||||
const modalId = trigger.getAttribute('data-open-modal');
|
||||
openModal(modalId);
|
||||
});
|
||||
|
||||
// Soporte de teclado para tarjetas con role="button"
|
||||
trigger.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter' || e.key === ' ' || e.key === 'Spacebar') {
|
||||
e.preventDefault();
|
||||
openModal(trigger.getAttribute('data-open-modal'));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user