diff --git a/accessibility.css b/accessibility.css new file mode 100644 index 0000000..2ee7520 --- /dev/null +++ b/accessibility.css @@ -0,0 +1,98 @@ +.accessible main, +.accessible footer { + font-size: 25px; + font-family: Helvetica, Arial, sans-serif, Verdana, Tahoma; + line-height: 1.6; + letter-spacing: 0.5px; + word-spacing: 2px; +} + +.accessible ol, +.accessible ul { + margin-left: 30px; + padding-left: 20px; +} + +.accessible li { + margin-bottom: 10px; +} + +.accessible tr { + border-bottom: 1px solid black; +} + +.accessible td { + padding: 10px; +} + +.accessible a, +.accessible button, +.accessible input, +.accessible textarea, +.accessible select { + outline: 3px solid #005fcc; + outline-offset: 2px; +} + +.accessible a:focus, +.accessible button:focus, +.accessible input:focus, +.accessible textarea:focus, +.accessible select:focus { + outline: 3px solid #005fcc; + background-color: #e0f0ff; +} + +.accessible a { + color: #005fcc; + text-decoration: underline; +} + + +.accessible main, +.accessible footer { + font-size: 25px; + font-family: Helvetica, Arial, sans-serif ! important; +} + +.accessible ol, +.accessible ul { + padding-left: 20px; +} + +.accessible li { + margin-bottom: 10px; + border-bottom: 1px solid black; +} + +.accessible tr { + border-bottom: 1px solid black; +} + +.accessible td { + padding: 10px; +} +.accessible a:hover, +.accessible a:focus { + text-decoration: none; +} + +.accessible body { + color: #000; + background-color: #fff; +} + +.accessible html { + font-size: 100%; +} + +@media (max-width: 768px) { + .accessible main, + .accessible footer { + font-size: 1.5rem; + } +} + +.accessible #versionSwitch { + display: none; +} \ No newline at end of file diff --git a/accessibility.js b/accessibility.js new file mode 100644 index 0000000..9abf4f6 --- /dev/null +++ b/accessibility.js @@ -0,0 +1,31 @@ + +var accessibleToggle = document.getElementById('accessibleToggle'); +let currentAccessibilityState = localStorage.getItem('accessible'); +var documentBackground = document.body.style.backgroundColor; + +function yesAccessible() { + accessibleToggle.innerHTML = "Regular View"; + document.location.hash = "force:no"; + document.body.style.background = "white"; + localStorage.setItem('accessible', 'true'); +} + +function noAccessible() { + accessibleToggle.innerHTML = "Accessible Mode"; + document.body.style.background = documentBackground; + localStorage.setItem('accessible', 'false'); +} + +accessibleToggle.addEventListener('click', function () { + document.body.classList.toggle('accessible'); + if (document.body.classList.contains('accessible')) { + yesAccessible(); + } else { + noAccessible(); + } +}); + +if(currentAccessibilityState === 'true') { + document.body.classList.add('accessible'); + yesAccessible(); +} diff --git a/alternatePortraitVersions/index.html b/alternatePortraitVersions/index.html index bdc63cf..a2577e8 100644 --- a/alternatePortraitVersions/index.html +++ b/alternatePortraitVersions/index.html @@ -5,6 +5,7 @@ +