Add 2 files
Browse files- README.md +7 -5
- index.html +580 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: ham3d
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: pink
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,580 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Accessibility Widget</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
theme: {
|
| 12 |
+
extend: {
|
| 13 |
+
colors: {
|
| 14 |
+
primary: '#3b82f6',
|
| 15 |
+
secondary: '#1e40af',
|
| 16 |
+
dark: '#1e293b',
|
| 17 |
+
light: '#f8fafc',
|
| 18 |
+
highcontrast: {
|
| 19 |
+
text: '#000000',
|
| 20 |
+
bg: '#FFFFFF',
|
| 21 |
+
accent: '#FF0000'
|
| 22 |
+
}
|
| 23 |
+
},
|
| 24 |
+
fontFamily: {
|
| 25 |
+
dyslexic: ['OpenDyslexic', 'Comic Sans MS', 'sans-serif']
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
</script>
|
| 31 |
+
<style>
|
| 32 |
+
/* Custom styles for accessibility features */
|
| 33 |
+
.dyslexic-font {
|
| 34 |
+
font-family: 'Comic Sans MS', sans-serif !important;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.high-contrast {
|
| 38 |
+
background-color: #FFFFFF !important;
|
| 39 |
+
color: #000000 !important;
|
| 40 |
+
border-color: #000000 !important;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.high-contrast * {
|
| 44 |
+
background-color: #FFFFFF !important;
|
| 45 |
+
color: #000000 !important;
|
| 46 |
+
border-color: #000000 !important;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.high-contrast-accent {
|
| 50 |
+
color: #FF0000 !important;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.large-cursor * {
|
| 54 |
+
cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='12' fill='none' stroke='%23000' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='2' fill='%23000'/%3E%3C/svg%3E") 16 16, pointer !important;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.reduced-motion * {
|
| 58 |
+
transition: none !important;
|
| 59 |
+
animation: none !important;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.highlight-text p, .highlight-text a {
|
| 63 |
+
background-color: rgba(255, 255, 0, 0.3) !important;
|
| 64 |
+
padding: 2px 4px !important;
|
| 65 |
+
border-radius: 2px !important;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
/* Keyframes for widget button pulse */
|
| 69 |
+
@keyframes pulse {
|
| 70 |
+
0% { transform: scale(1); }
|
| 71 |
+
50% { transform: scale(1.1); }
|
| 72 |
+
100% { transform: scale(1); }
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.pulse-animation {
|
| 76 |
+
animation: pulse 2s infinite;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
/* Transition for panel */
|
| 80 |
+
.accessibility-panel {
|
| 81 |
+
transition: all 0.3s ease;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
/* Focus styles */
|
| 85 |
+
:focus-visible {
|
| 86 |
+
outline: 3px solid #3b82f6 !important;
|
| 87 |
+
outline-offset: 2px !important;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.high-contrast :focus-visible {
|
| 91 |
+
outline: 3px solid #FF0000 !important;
|
| 92 |
+
}
|
| 93 |
+
</style>
|
| 94 |
+
</head>
|
| 95 |
+
<body class="bg-gray-50 text-gray-900 min-h-screen transition-colors duration-300">
|
| 96 |
+
<!-- Skip to content link (hidden until focused) -->
|
| 97 |
+
<a href="#main-content" class="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:bg-white focus:text-black focus:px-4 focus:py-2 focus:z-50 focus:rounded focus:font-bold">
|
| 98 |
+
Skip to content
|
| 99 |
+
</a>
|
| 100 |
+
|
| 101 |
+
<!-- Main content area -->
|
| 102 |
+
<main id="main-content" class="container mx-auto px-4 py-8">
|
| 103 |
+
<h1 class="text-3xl font-bold mb-6">Website Content</h1>
|
| 104 |
+
<article class="prose max-w-none">
|
| 105 |
+
<p class="mb-4">This is a demonstration of the accessibility widget functionality. The widget provides various tools to make the website more accessible to all users.</p>
|
| 106 |
+
|
| 107 |
+
<h2 class="text-2xl font-semibold mt-6 mb-4">About Accessibility</h2>
|
| 108 |
+
<p class="mb-4">Web accessibility means that websites, tools, and technologies are designed and developed so that people with disabilities can use them. More specifically, people can:</p>
|
| 109 |
+
<ul class="list-disc pl-6 mb-4">
|
| 110 |
+
<li class="mb-2">Perceive, understand, navigate, and interact with the web</li>
|
| 111 |
+
<li class="mb-2">Contribute to the web</li>
|
| 112 |
+
<li class="mb-2">Have equal access and equal opportunity to information</li>
|
| 113 |
+
</ul>
|
| 114 |
+
|
| 115 |
+
<h2 class="text-2xl font-semibold mt-6 mb-4">Why It Matters</h2>
|
| 116 |
+
<p class="mb-4">Accessibility is essential for developers and organizations that want to create high-quality websites and web tools, and not exclude people from using their products and services.</p>
|
| 117 |
+
|
| 118 |
+
<p class="mb-4">Try out the accessibility widget by clicking the button in the bottom right corner of the screen. You can adjust text size, contrast, and other settings to suit your needs.</p>
|
| 119 |
+
|
| 120 |
+
<h3 class="text-xl font-semibold mt-6 mb-4">Sample Interactive Elements</h3>
|
| 121 |
+
<button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded mr-4 mb-4 transition-colors">
|
| 122 |
+
Example Button
|
| 123 |
+
</button>
|
| 124 |
+
<a href="#" class="text-blue-600 hover:text-blue-800 underline mr-4 mb-4 inline-block">Example Link</a>
|
| 125 |
+
<input type="text" placeholder="Example input" class="border px-3 py-2 rounded mb-4">
|
| 126 |
+
</article>
|
| 127 |
+
</main>
|
| 128 |
+
|
| 129 |
+
<!-- Accessibility Widget -->
|
| 130 |
+
<div class="fixed bottom-6 right-6 z-40">
|
| 131 |
+
<!-- Toggle Button -->
|
| 132 |
+
<button id="accessibility-toggle"
|
| 133 |
+
aria-label="Open accessibility panel"
|
| 134 |
+
aria-expanded="false"
|
| 135 |
+
class="bg-blue-600 text-white w-14 h-14 rounded-full shadow-lg flex items-center justify-center hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 pulse-animation transition-all">
|
| 136 |
+
<i class="fas fa-universal-access text-2xl"></i>
|
| 137 |
+
</button>
|
| 138 |
+
|
| 139 |
+
<!-- Panel -->
|
| 140 |
+
<div id="accessibility-panel"
|
| 141 |
+
role="dialog"
|
| 142 |
+
aria-labelledby="accessibility-panel-title"
|
| 143 |
+
aria-modal="true"
|
| 144 |
+
class="accessibility-panel hidden bg-white rounded-lg shadow-xl w-80 max-h-[90vh] overflow-y-auto absolute bottom-20 right-0 border border-gray-200">
|
| 145 |
+
<div class="p-4">
|
| 146 |
+
<div class="flex justify-between items-center mb-4">
|
| 147 |
+
<h2 id="accessibility-panel-title" class="text-xl font-bold">Accessibility Settings</h2>
|
| 148 |
+
<button id="close-panel" aria-label="Close accessibility panel" class="text-gray-500 hover:text-gray-700">
|
| 149 |
+
<i class="fas fa-times"></i>
|
| 150 |
+
</button>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<div class="space-y-6">
|
| 154 |
+
<!-- Text Size -->
|
| 155 |
+
<section>
|
| 156 |
+
<h3 class="font-semibold mb-2">Text Size</h3>
|
| 157 |
+
<div class="flex items-center space-x-2">
|
| 158 |
+
<button id="decrease-text" aria-label="Decrease text size" class="bg-gray-200 hover:bg-gray-300 rounded-full w-8 h-8 flex items-center justify-center">
|
| 159 |
+
<i class="fas fa-minus"></i>
|
| 160 |
+
</button>
|
| 161 |
+
<div class="flex-1 bg-gray-100 rounded-full h-2">
|
| 162 |
+
<div id="text-size-indicator" class="bg-blue-500 h-2 rounded-full w-1/2"></div>
|
| 163 |
+
</div>
|
| 164 |
+
<button id="increase-text" aria-label="Increase text size" class="bg-gray-200 hover:bg-gray-300 rounded-full w-8 h-8 flex items-center justify-center">
|
| 165 |
+
<i class="fas fa-plus"></i>
|
| 166 |
+
</button>
|
| 167 |
+
</div>
|
| 168 |
+
</section>
|
| 169 |
+
|
| 170 |
+
<!-- Font Style -->
|
| 171 |
+
<section>
|
| 172 |
+
<h3 class="font-semibold mb-2">Font Style</h3>
|
| 173 |
+
<button id="toggle-dyslexic" aria-pressed="false" class="flex items-center space-x-2 px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded">
|
| 174 |
+
<i class="fas fa-font"></i>
|
| 175 |
+
<span>Dyslexia-Friendly Font</span>
|
| 176 |
+
<span id="dyslexic-status" class="ml-auto text-sm text-gray-500">Off</span>
|
| 177 |
+
</button>
|
| 178 |
+
</section>
|
| 179 |
+
|
| 180 |
+
<!-- Color Contrast -->
|
| 181 |
+
<section>
|
| 182 |
+
<h3 class="font-semibold mb-2">Color & Contrast</h3>
|
| 183 |
+
<div class="space-y-2">
|
| 184 |
+
<button id="toggle-contrast" aria-pressed="false" class="w-full flex items-center space-x-2 px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded">
|
| 185 |
+
<i class="fas fa-adjust"></i>
|
| 186 |
+
<span>High Contrast Mode</span>
|
| 187 |
+
<span id="contrast-status" class="ml-auto text-sm text-gray-500">Off</span>
|
| 188 |
+
</button>
|
| 189 |
+
</div>
|
| 190 |
+
</section>
|
| 191 |
+
|
| 192 |
+
<!-- Visual Aids -->
|
| 193 |
+
<section>
|
| 194 |
+
<h3 class="font-semibold mb-2">Visual Aids</h3>
|
| 195 |
+
<div class="space-y-2">
|
| 196 |
+
<button id="toggle-cursor" aria-pressed="false" class="w-full flex items-center space-x-2 px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded">
|
| 197 |
+
<i class="fas fa-mouse-pointer"></i>
|
| 198 |
+
<span>Large Cursor</span>
|
| 199 |
+
<span id="cursor-status" class="ml-auto text-sm text-gray-500">Off</span>
|
| 200 |
+
</button>
|
| 201 |
+
<button id="toggle-highlight" aria-pressed="false" class="w-full flex items-center space-x-2 px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded">
|
| 202 |
+
<i class="fas fa-highlighter"></i>
|
| 203 |
+
<span>Text Highlighting</span>
|
| 204 |
+
<span id="highlight-status" class="ml-auto text-sm text-gray-500">Off</span>
|
| 205 |
+
</button>
|
| 206 |
+
</div>
|
| 207 |
+
</section>
|
| 208 |
+
|
| 209 |
+
<!-- Motion -->
|
| 210 |
+
<section>
|
| 211 |
+
<h3 class="font-semibold mb-2">Motion</h3>
|
| 212 |
+
<button id="toggle-motion" aria-pressed="false" class="w-full flex items-center space-x-2 px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded">
|
| 213 |
+
<i class="fas fa-running"></i>
|
| 214 |
+
<span>Reduce Motion</span>
|
| 215 |
+
<span id="motion-status" class="ml-auto text-sm text-gray-500">Off</span>
|
| 216 |
+
</button>
|
| 217 |
+
</section>
|
| 218 |
+
|
| 219 |
+
<!-- Screen Reader Helper -->
|
| 220 |
+
<section>
|
| 221 |
+
<h3 class="font-semibold mb-2">Screen Reader</h3>
|
| 222 |
+
<button id="screen-reader-helper" class="w-full flex items-center space-x-2 px-3 py-2 bg-blue-100 hover:bg-blue-200 rounded text-blue-800">
|
| 223 |
+
<i class="fas fa-assistive-listening-systems"></i>
|
| 224 |
+
<span>Read Important Content</span>
|
| 225 |
+
</button>
|
| 226 |
+
</section>
|
| 227 |
+
|
| 228 |
+
<!-- Reset & Close -->
|
| 229 |
+
<section class="pt-2 border-t border-gray-200">
|
| 230 |
+
<div class="flex space-x-2">
|
| 231 |
+
<button id="reset-settings" class="flex-1 px-3 py-2 bg-gray-100 hover:bg-gray-200 rounded">
|
| 232 |
+
Reset Settings
|
| 233 |
+
</button>
|
| 234 |
+
</div>
|
| 235 |
+
</section>
|
| 236 |
+
</div>
|
| 237 |
+
</div>
|
| 238 |
+
</div>
|
| 239 |
+
</div>
|
| 240 |
+
|
| 241 |
+
<!-- ARIA Live Region for screen reader announcements -->
|
| 242 |
+
<div id="aria-live-region" aria-live="polite" class="sr-only"></div>
|
| 243 |
+
|
| 244 |
+
<script>
|
| 245 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 246 |
+
// DOM Elements
|
| 247 |
+
const toggleBtn = document.getElementById('accessibility-toggle');
|
| 248 |
+
const panel = document.getElementById('accessibility-panel');
|
| 249 |
+
const closeBtn = document.getElementById('close-panel');
|
| 250 |
+
const increaseTextBtn = document.getElementById('increase-text');
|
| 251 |
+
const decreaseTextBtn = document.getElementById('decrease-text');
|
| 252 |
+
const textSizeIndicator = document.getElementById('text-size-indicator');
|
| 253 |
+
const toggleDyslexicBtn = document.getElementById('toggle-dyslexic');
|
| 254 |
+
const dyslexicStatus = document.getElementById('dyslexic-status');
|
| 255 |
+
const toggleContrastBtn = document.getElementById('toggle-contrast');
|
| 256 |
+
const contrastStatus = document.getElementById('contrast-status');
|
| 257 |
+
const toggleCursorBtn = document.getElementById('toggle-cursor');
|
| 258 |
+
const cursorStatus = document.getElementById('cursor-status');
|
| 259 |
+
const toggleHighlightBtn = document.getElementById('toggle-highlight');
|
| 260 |
+
const highlightStatus = document.getElementById('highlight-status');
|
| 261 |
+
const toggleMotionBtn = document.getElementById('toggle-motion');
|
| 262 |
+
const motionStatus = document.getElementById('motion-status');
|
| 263 |
+
const screenReaderHelper = document.getElementById('screen-reader-helper');
|
| 264 |
+
const resetBtn = document.getElementById('reset-settings');
|
| 265 |
+
const ariaLiveRegion = document.getElementById('aria-live-region');
|
| 266 |
+
|
| 267 |
+
// State variables
|
| 268 |
+
let textSize = 1; // 1 is default (100%), range 0.8 to 1.6
|
| 269 |
+
let isDyslexicFont = false;
|
| 270 |
+
let isHighContrast = false;
|
| 271 |
+
let isLargeCursor = false;
|
| 272 |
+
let isHighlightText = false;
|
| 273 |
+
let isReducedMotion = false;
|
| 274 |
+
let isPanelOpen = false;
|
| 275 |
+
|
| 276 |
+
// Initialize from localStorage
|
| 277 |
+
function loadSettings() {
|
| 278 |
+
// Text size
|
| 279 |
+
const savedTextSize = localStorage.getItem('accessibilityTextSize');
|
| 280 |
+
if (savedTextSize) {
|
| 281 |
+
textSize = parseFloat(savedTextSize);
|
| 282 |
+
updateTextSize();
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
// Dyslexic font
|
| 286 |
+
if (localStorage.getItem('accessibilityDyslexicFont') === 'true') {
|
| 287 |
+
isDyslexicFont = true;
|
| 288 |
+
document.documentElement.classList.add('dyslexic-font');
|
| 289 |
+
dyslexicStatus.textContent = 'On';
|
| 290 |
+
toggleDyslexicBtn.setAttribute('aria-pressed', 'true');
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// High contrast
|
| 294 |
+
if (localStorage.getItem('accessibilityHighContrast') === 'true') {
|
| 295 |
+
isHighContrast = true;
|
| 296 |
+
document.documentElement.classList.add('high-contrast');
|
| 297 |
+
contrastStatus.textContent = 'On';
|
| 298 |
+
toggleContrastBtn.setAttribute('aria-pressed', 'true');
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
// Large cursor
|
| 302 |
+
if (localStorage.getItem('accessibilityLargeCursor') === 'true') {
|
| 303 |
+
isLargeCursor = true;
|
| 304 |
+
document.documentElement.classList.add('large-cursor');
|
| 305 |
+
cursorStatus.textContent = 'On';
|
| 306 |
+
toggleCursorBtn.setAttribute('aria-pressed', 'true');
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
// Text highlighting
|
| 310 |
+
if (localStorage.getItem('accessibilityHighlightText') === 'true') {
|
| 311 |
+
isHighlightText = true;
|
| 312 |
+
document.documentElement.classList.add('highlight-text');
|
| 313 |
+
highlightStatus.textContent = 'On';
|
| 314 |
+
toggleHighlightBtn.setAttribute('aria-pressed', 'true');
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
// Reduced motion
|
| 318 |
+
if (localStorage.getItem('accessibilityReducedMotion') === 'true') {
|
| 319 |
+
isReducedMotion = true;
|
| 320 |
+
document.documentElement.classList.add('reduced-motion');
|
| 321 |
+
motionStatus.textContent = 'On';
|
| 322 |
+
toggleMotionBtn.setAttribute('aria-pressed', 'true');
|
| 323 |
+
}
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
// Update text size
|
| 327 |
+
function updateTextSize() {
|
| 328 |
+
document.documentElement.style.fontSize = `${textSize * 100}%`;
|
| 329 |
+
const percentage = ((textSize - 0.8) / 0.8) * 100;
|
| 330 |
+
textSizeIndicator.style.width = `${percentage}%`;
|
| 331 |
+
localStorage.setItem('accessibilityTextSize', textSize.toString());
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
// Toggle panel
|
| 335 |
+
function togglePanel() {
|
| 336 |
+
isPanelOpen = !isPanelOpen;
|
| 337 |
+
if (isPanelOpen) {
|
| 338 |
+
panel.classList.remove('hidden');
|
| 339 |
+
toggleBtn.setAttribute('aria-expanded', 'true');
|
| 340 |
+
toggleBtn.classList.remove('pulse-animation');
|
| 341 |
+
// Focus first interactive element in panel
|
| 342 |
+
setTimeout(() => closeBtn.focus(), 100);
|
| 343 |
+
} else {
|
| 344 |
+
panel.classList.add('hidden');
|
| 345 |
+
toggleBtn.setAttribute('aria-expanded', 'false');
|
| 346 |
+
toggleBtn.classList.add('pulse-animation');
|
| 347 |
+
}
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
// Announce to screen readers
|
| 351 |
+
function announce(message) {
|
| 352 |
+
ariaLiveRegion.textContent = message;
|
| 353 |
+
// Clear after a short delay so the same message can be announced again
|
| 354 |
+
setTimeout(() => {
|
| 355 |
+
ariaLiveRegion.textContent = '';
|
| 356 |
+
}, 1000);
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
// Event Listeners
|
| 360 |
+
toggleBtn.addEventListener('click', togglePanel);
|
| 361 |
+
|
| 362 |
+
closeBtn.addEventListener('click', togglePanel);
|
| 363 |
+
|
| 364 |
+
// Increase text size
|
| 365 |
+
increaseTextBtn.addEventListener('click', () => {
|
| 366 |
+
if (textSize < 1.6) {
|
| 367 |
+
textSize += 0.1;
|
| 368 |
+
textSize = Math.round(textSize * 10) / 10; // Fix floating point precision
|
| 369 |
+
updateTextSize();
|
| 370 |
+
announce(`Text size increased to ${Math.round(textSize * 100)}%`);
|
| 371 |
+
}
|
| 372 |
+
});
|
| 373 |
+
|
| 374 |
+
// Decrease text size
|
| 375 |
+
decreaseTextBtn.addEventListener('click', () => {
|
| 376 |
+
if (textSize > 0.8) {
|
| 377 |
+
textSize -= 0.1;
|
| 378 |
+
textSize = Math.round(textSize * 10) / 10; // Fix floating point precision
|
| 379 |
+
updateTextSize();
|
| 380 |
+
announce(`Text size decreased to ${Math.round(textSize * 100)}%`);
|
| 381 |
+
}
|
| 382 |
+
});
|
| 383 |
+
|
| 384 |
+
// Toggle dyslexic font
|
| 385 |
+
toggleDyslexicBtn.addEventListener('click', () => {
|
| 386 |
+
isDyslexicFont = !isDyslexicFont;
|
| 387 |
+
if (isDyslexicFont) {
|
| 388 |
+
document.documentElement.classList.add('dyslexic-font');
|
| 389 |
+
dyslexicStatus.textContent = 'On';
|
| 390 |
+
toggleDyslexicBtn.setAttribute('aria-pressed', 'true');
|
| 391 |
+
localStorage.setItem('accessibilityDyslexicFont', 'true');
|
| 392 |
+
announce('Dyslexia-friendly font enabled');
|
| 393 |
+
} else {
|
| 394 |
+
document.documentElement.classList.remove('dyslexic-font');
|
| 395 |
+
dyslexicStatus.textContent = 'Off';
|
| 396 |
+
toggleDyslexicBtn.setAttribute('aria-pressed', 'false');
|
| 397 |
+
localStorage.setItem('accessibilityDyslexicFont', 'false');
|
| 398 |
+
announce('Dyslexia-friendly font disabled');
|
| 399 |
+
}
|
| 400 |
+
});
|
| 401 |
+
|
| 402 |
+
// Toggle high contrast
|
| 403 |
+
toggleContrastBtn.addEventListener('click', () => {
|
| 404 |
+
isHighContrast = !isHighContrast;
|
| 405 |
+
if (isHighContrast) {
|
| 406 |
+
document.documentElement.classList.add('high-contrast');
|
| 407 |
+
contrastStatus.textContent = 'On';
|
| 408 |
+
toggleContrastBtn.setAttribute('aria-pressed', 'true');
|
| 409 |
+
localStorage.setItem('accessibilityHighContrast', 'true');
|
| 410 |
+
announce('High contrast mode enabled');
|
| 411 |
+
} else {
|
| 412 |
+
document.documentElement.classList.remove('high-contrast');
|
| 413 |
+
contrastStatus.textContent = 'Off';
|
| 414 |
+
toggleContrastBtn.setAttribute('aria-pressed', 'false');
|
| 415 |
+
localStorage.setItem('accessibilityHighContrast', 'false');
|
| 416 |
+
announce('High contrast mode disabled');
|
| 417 |
+
}
|
| 418 |
+
});
|
| 419 |
+
|
| 420 |
+
// Toggle large cursor
|
| 421 |
+
toggleCursorBtn.addEventListener('click', () => {
|
| 422 |
+
isLargeCursor = !isLargeCursor;
|
| 423 |
+
if (isLargeCursor) {
|
| 424 |
+
document.documentElement.classList.add('large-cursor');
|
| 425 |
+
cursorStatus.textContent = 'On';
|
| 426 |
+
toggleCursorBtn.setAttribute('aria-pressed', 'true');
|
| 427 |
+
localStorage.setItem('accessibilityLargeCursor', 'true');
|
| 428 |
+
announce('Large cursor enabled');
|
| 429 |
+
} else {
|
| 430 |
+
document.documentElement.classList.remove('large-cursor');
|
| 431 |
+
cursorStatus.textContent = 'Off';
|
| 432 |
+
toggleCursorBtn.setAttribute('aria-pressed', 'false');
|
| 433 |
+
localStorage.setItem('accessibilityLargeCursor', 'false');
|
| 434 |
+
announce('Large cursor disabled');
|
| 435 |
+
}
|
| 436 |
+
});
|
| 437 |
+
|
| 438 |
+
// Toggle text highlighting
|
| 439 |
+
toggleHighlightBtn.addEventListener('click', () => {
|
| 440 |
+
isHighlightText = !isHighlightText;
|
| 441 |
+
if (isHighlightText) {
|
| 442 |
+
document.documentElement.classList.add('highlight-text');
|
| 443 |
+
highlightStatus.textContent = 'On';
|
| 444 |
+
toggleHighlightBtn.setAttribute('aria-pressed', 'true');
|
| 445 |
+
localStorage.setItem('accessibilityHighlightText', 'true');
|
| 446 |
+
announce('Text highlighting enabled');
|
| 447 |
+
} else {
|
| 448 |
+
document.documentElement.classList.remove('highlight-text');
|
| 449 |
+
highlightStatus.textContent = 'Off';
|
| 450 |
+
toggleHighlightBtn.setAttribute('aria-pressed', 'false');
|
| 451 |
+
localStorage.setItem('accessibilityHighlightText', 'false');
|
| 452 |
+
announce('Text highlighting disabled');
|
| 453 |
+
}
|
| 454 |
+
});
|
| 455 |
+
|
| 456 |
+
// Toggle reduced motion
|
| 457 |
+
toggleMotionBtn.addEventListener('click', () => {
|
| 458 |
+
isReducedMotion = !isReducedMotion;
|
| 459 |
+
if (isReducedMotion) {
|
| 460 |
+
document.documentElement.classList.add('reduced-motion');
|
| 461 |
+
motionStatus.textContent = 'On';
|
| 462 |
+
toggleMotionBtn.setAttribute('aria-pressed', 'true');
|
| 463 |
+
localStorage.setItem('accessibilityReducedMotion', 'true');
|
| 464 |
+
announce('Reduced motion enabled');
|
| 465 |
+
} else {
|
| 466 |
+
document.documentElement.classList.remove('reduced-motion');
|
| 467 |
+
motionStatus.textContent = 'Off';
|
| 468 |
+
toggleMotionBtn.setAttribute('aria-pressed', 'false');
|
| 469 |
+
localStorage.setItem('accessibilityReducedMotion', 'false');
|
| 470 |
+
announce('Reduced motion disabled');
|
| 471 |
+
}
|
| 472 |
+
});
|
| 473 |
+
|
| 474 |
+
// Screen reader helper
|
| 475 |
+
screenReaderHelper.addEventListener('click', () => {
|
| 476 |
+
const importantContent = document.querySelector('main').textContent.substring(0, 200) + '...';
|
| 477 |
+
announce(`Important content: ${importantContent}`);
|
| 478 |
+
});
|
| 479 |
+
|
| 480 |
+
// Reset settings
|
| 481 |
+
resetBtn.addEventListener('click', () => {
|
| 482 |
+
// Reset text size
|
| 483 |
+
textSize = 1;
|
| 484 |
+
updateTextSize();
|
| 485 |
+
|
| 486 |
+
// Reset dyslexic font
|
| 487 |
+
if (isDyslexicFont) {
|
| 488 |
+
document.documentElement.classList.remove('dyslexic-font');
|
| 489 |
+
dyslexicStatus.textContent = 'Off';
|
| 490 |
+
toggleDyslexicBtn.setAttribute('aria-pressed', 'false');
|
| 491 |
+
localStorage.setItem('accessibilityDyslexicFont', 'false');
|
| 492 |
+
isDyslexicFont = false;
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
// Reset high contrast
|
| 496 |
+
if (isHighContrast) {
|
| 497 |
+
document.documentElement.classList.remove('high-contrast');
|
| 498 |
+
contrastStatus.textContent = 'Off';
|
| 499 |
+
toggleContrastBtn.setAttribute('aria-pressed', 'false');
|
| 500 |
+
localStorage.setItem('accessibilityHighContrast', 'false');
|
| 501 |
+
isHighContrast = false;
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
+
// Reset large cursor
|
| 505 |
+
if (isLargeCursor) {
|
| 506 |
+
document.documentElement.classList.remove('large-cursor');
|
| 507 |
+
cursorStatus.textContent = 'Off';
|
| 508 |
+
toggleCursorBtn.setAttribute('aria-pressed', 'false');
|
| 509 |
+
localStorage.setItem('accessibilityLargeCursor', 'false');
|
| 510 |
+
isLargeCursor = false;
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
// Reset text highlighting
|
| 514 |
+
if (isHighlightText) {
|
| 515 |
+
document.documentElement.classList.remove('highlight-text');
|
| 516 |
+
highlightStatus.textContent = 'Off';
|
| 517 |
+
toggleHighlightBtn.setAttribute('aria-pressed', 'false');
|
| 518 |
+
localStorage.setItem('accessibilityHighlightText', 'false');
|
| 519 |
+
isHighlightText = false;
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
// Reset reduced motion
|
| 523 |
+
if (isReducedMotion) {
|
| 524 |
+
document.documentElement.classList.remove('reduced-motion');
|
| 525 |
+
motionStatus.textContent = 'Off';
|
| 526 |
+
toggleMotionBtn.setAttribute('aria-pressed', 'false');
|
| 527 |
+
localStorage.setItem('accessibilityReducedMotion', 'false');
|
| 528 |
+
isReducedMotion = false;
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
announce('All accessibility settings have been reset to default');
|
| 532 |
+
});
|
| 533 |
+
|
| 534 |
+
// Keyboard shortcuts
|
| 535 |
+
document.addEventListener('keydown', (e) => {
|
| 536 |
+
// Alt + A to toggle panel
|
| 537 |
+
if (e.altKey && e.key.toLowerCase() === 'a') {
|
| 538 |
+
e.preventDefault();
|
| 539 |
+
togglePanel();
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
// Trap focus inside panel when open
|
| 543 |
+
if (isPanelOpen && e.key === 'Tab') {
|
| 544 |
+
const focusableElements = panel.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
| 545 |
+
const firstElement = focusableElements[0];
|
| 546 |
+
const lastElement = focusableElements[focusableElements.length - 1];
|
| 547 |
+
|
| 548 |
+
if (e.shiftKey) {
|
| 549 |
+
if (document.activeElement === firstElement) {
|
| 550 |
+
lastElement.focus();
|
| 551 |
+
e.preventDefault();
|
| 552 |
+
}
|
| 553 |
+
} else {
|
| 554 |
+
if (document.activeElement === lastElement) {
|
| 555 |
+
firstElement.focus();
|
| 556 |
+
e.preventDefault();
|
| 557 |
+
}
|
| 558 |
+
}
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
// Escape to close panel
|
| 562 |
+
if (isPanelOpen && e.key === 'Escape') {
|
| 563 |
+
togglePanel();
|
| 564 |
+
toggleBtn.focus();
|
| 565 |
+
}
|
| 566 |
+
});
|
| 567 |
+
|
| 568 |
+
// Close panel when clicking outside
|
| 569 |
+
document.addEventListener('click', (e) => {
|
| 570 |
+
if (isPanelOpen && !panel.contains(e.target) && e.target !== toggleBtn) {
|
| 571 |
+
togglePanel();
|
| 572 |
+
}
|
| 573 |
+
});
|
| 574 |
+
|
| 575 |
+
// Initialize
|
| 576 |
+
loadSettings();
|
| 577 |
+
});
|
| 578 |
+
</script>
|
| 579 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=ham3dco/ham3d" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 580 |
+
</html>
|