accessibility-widgets 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/widget.js +9 -107
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accessibility-widgets",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A comprehensive, lightweight accessibility widget that enhances web accessibility for all users. Provides multiple accessibility features including screen reader support, voice control, high contrast mode, and more.",
5
5
  "main": "widget.js",
6
6
  "scripts": {
package/widget.js CHANGED
@@ -209,7 +209,7 @@ const styles = `
209
209
  width: ${WIDGET_CONFIG.widgetWidth};
210
210
  height: 100vh;
211
211
  overflow-y: auto;
212
- background-color: ${WIDGET_CONFIG.colors.secondary};
212
+ background-color: #e2e2e2;
213
213
  padding: 0;
214
214
  display: none;
215
215
  font-family: ${WIDGET_CONFIG.typography.fontFamily};
@@ -222,25 +222,25 @@ const styles = `
222
222
  align-items: center;
223
223
  padding: ${WIDGET_CONFIG.menu.optionPadding};
224
224
  width: 100%;
225
- background-color: ${WIDGET_CONFIG.colors.border};
226
- color: ${WIDGET_CONFIG.colors.text};
227
- border: none;
225
+ background-color: #ffffff;
226
+ color: ${WIDGET_CONFIG.colors.primary};
227
+ border: 2px solid #ffffff;
228
228
  cursor: pointer;
229
229
  border-radius: ${WIDGET_CONFIG.menu.borderRadius};
230
- transition: background-color ${WIDGET_CONFIG.animation.transition};
230
+ transition: background-color ${WIDGET_CONFIG.animation.transition}, border-color ${WIDGET_CONFIG.animation.transition};
231
231
  line-height: ${WIDGET_CONFIG.typography.lineHeight} !important;
232
232
  }
233
233
  .snn-accessibility-option:hover {
234
- background-color: ${WIDGET_CONFIG.colors.borderHover};
234
+ border-color: ${WIDGET_CONFIG.colors.primary};
235
235
  }
236
236
  .snn-accessibility-option.active {
237
- background-color: ${WIDGET_CONFIG.colors.primary};
238
- color: ${WIDGET_CONFIG.colors.textLight};
237
+ border-color: ${WIDGET_CONFIG.colors.primary};
239
238
  }
240
239
  .snn-icon {
241
240
  margin-right: 12px;
242
241
  width: ${WIDGET_CONFIG.button.iconSize};
243
242
  height: ${WIDGET_CONFIG.button.iconSize};
243
+ fill: ${WIDGET_CONFIG.colors.primary};
244
244
  }
245
245
  .snn-icon svg {
246
246
  width: 100%;
@@ -280,7 +280,7 @@ const styles = `
280
280
  align-items: center;
281
281
  margin-bottom: 20px;
282
282
  padding: 10px;
283
- background: #000000;
283
+ background: ${WIDGET_CONFIG.colors.primary};
284
284
  height: ${WIDGET_CONFIG.menu.headerHeight};
285
285
  position: sticky;
286
286
  top: 0;
@@ -1517,101 +1517,3 @@ if (document.readyState === 'loading') {
1517
1517
  initAccessibilityWidget();
1518
1518
  }
1519
1519
 
1520
- /*
1521
- ===========================================
1522
- WIDGET FEATURES SUMMARY:
1523
-
1524
- Core Features:
1525
- - High contrast mode
1526
- - Text size adjustment
1527
- - Text spacing modification
1528
- - Animation pausing
1529
- - Image hiding
1530
- - Dyslexia-friendly font
1531
- - Cursor size adjustment
1532
- - Line height adjustment
1533
- - Text alignment
1534
-
1535
- Advanced Features:
1536
- - Screen reader with speech synthesis
1537
- - Voice control with speech recognition
1538
- - Reading mode
1539
- - Enhanced focus indicators
1540
- - Reduced motion mode
1541
- - Font selection (Arial, Times, Verdana)
1542
- - Color blindness filters (Protanopia, Deuteranopia, Tritanopia, Grayscale)
1543
-
1544
- Technical Features:
1545
- - Persistent settings via localStorage
1546
- - Full keyboard navigation
1547
- - ARIA compliance
1548
- - Error handling for browser compatibility
1549
- - Performance optimization with DOM caching
1550
- - Single file deployment
1551
-
1552
- Configuration Options:
1553
- - Customizable language/text strings
1554
- - Customizable voice command strings
1555
- - Configurable grid layout (columns and gap)
1556
- - All widget styling and positioning options
1557
- - Feature enable/disable toggles
1558
-
1559
- ===========================================
1560
-
1561
- CONFIGURATION EXAMPLE:
1562
-
1563
- To customize the widget, define window.ACCESSIBILITY_WIDGET_CONFIG
1564
- before loading the widget script:
1565
-
1566
- <script>
1567
- window.ACCESSIBILITY_WIDGET_CONFIG = {
1568
- // Customize language/text strings
1569
- lang: {
1570
- accessibilityMenu: 'Menu de Accesibilidad',
1571
- screenReader: 'Lector de Pantalla',
1572
- biggerText: 'Texto Más Grande',
1573
- highContrast: 'Alto Contraste',
1574
- // ... customize any text string
1575
- },
1576
-
1577
- // Customize voice commands for different languages
1578
- voiceCommands: {
1579
- showMenu: ['mostrar menú', 'abrir menú', 'menú de accesibilidad'],
1580
- highContrast: ['alto contraste'],
1581
- biggerText: ['texto más grande', 'texto grande'],
1582
- textSpacing: ['espaciado de texto'],
1583
- pauseAnimations: ['pausar animaciones', 'detener animaciones'],
1584
- hideImages: ['ocultar imágenes'],
1585
- dyslexiaFont: ['fuente para dislexia', 'fuente dislexia'],
1586
- biggerCursor: ['cursor más grande', 'cursor grande'],
1587
- lineHeight: ['altura de línea'],
1588
- textAlign: ['alinear texto', 'alineación de texto'],
1589
- screenReader: ['lector de pantalla'],
1590
- voiceControl: ['comando de voz', 'control de voz'],
1591
- resetAll: ['reiniciar todo', 'resetear todo']
1592
- },
1593
-
1594
- // Customize grid layout
1595
- gridLayout: {
1596
- columns: '1fr 1fr 1fr', // 3-column layout
1597
- gap: '15px' // Custom gap between buttons
1598
- },
1599
-
1600
- // Other customizable options
1601
- widgetWidth: '500px',
1602
- widgetPosition: {
1603
- side: 'left',
1604
- left: '30px',
1605
- bottom: '30px'
1606
- },
1607
- colors: {
1608
- primary: '#2196F3',
1609
- primaryHover: '#1976D2',
1610
- // ... customize any color
1611
- }
1612
- };
1613
- </script>
1614
- <script src="widget.js"></script>
1615
-
1616
- ===========================================
1617
- */