About me
++ We are committed to making our website accessible to everyone. Your + feedback helps us improve and create a better experience for all + users. +
+
+ diff --git a/about.html b/about.html index 5adbad6..a383912 100644 --- a/about.html +++ b/about.html @@ -1,10 +1,63 @@ - -
- - -+ We are committed to making our website accessible to everyone. Your + feedback helps us improve and create a better experience for all + users. +
+
+ + We are committed to making our website accessible to everyone. Your + feedback helps us improve and create a better experience for all + users. +
+
+ Our website is fully compatible with screen readers.
++ All interactive elements are accesibible via keyboard + navigation. +
+This is the starting point.
- - - + + + + + +
+
+ + We value your feedback! Help us improve our website by sharing your + experience. +
+0 of 4 questions aswered
+${text}
`).join(''); + + resultsection.setAttribute('tabindex', '-1'); + resultsection.focus(); + announcer.textContent = 'Feedback submitted successfully!'; + }, 1500); // Simulate 1.5 second loading + }); + + + +}); + +document.querySelectorAll('fieldset').forEach((fieldset) => { + fieldset.addEventListener('keydown', (event) => { + const radios = Array.from(fieldset.querySelectorAll('input[type="radio"]')); + const currentIndex = radios.findIndex(radio => radio === document.activeElement); + + if (currentIndex === -1) return; // No radio is focused + + if (event.key === 'ArrowDown' || event.key === 'ArrowRight') { + event.preventDefault(); + const nextIndex = (currentIndex + 1) % radios.length; + radios[nextIndex].focus(); + } else if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') { + event.preventDefault(); + const prevIndex = (currentIndex - 1 + radios.length) % radios.length; + radios[prevIndex].focus(); + } + }); +}); \ No newline at end of file