holygrail5 1.0.25 → 1.0.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holygrail5",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Framework CSS generator con Node.js - Genera CSS optimizado con variables CSS desde un archivo JSON de configuración",
5
5
  "main": "generate-css.js",
6
6
  "style": "dist/output.css",
@@ -67,6 +67,20 @@ function generateLayoutHelpers(helpers, spacingMap, prefix, desktopBreakpoint, b
67
67
  css += `\n@media (min-width: ${breakpointInRem}) {\n${responsiveCSS}}\n`;
68
68
  }
69
69
 
70
+ // Helper de accesibilidad: oculta visualmente el contenido manteniéndolo
71
+ // accesible para lectores de pantalla. Se hace visible al recibir foco.
72
+ // Se usa :not(:focus):not(:active) por compatibilidad cross-browser.
73
+ css += `\n/* Accessibility Helpers */\n`;
74
+ css += `.${prefix}-sr-only:not(:focus):not(:active) {\n`;
75
+ css += ` clip: rect(0, 0, 0, 0);\n`;
76
+ css += ` clip-path: inset(50%);\n`;
77
+ css += ` height: 1px;\n`;
78
+ css += ` overflow: hidden;\n`;
79
+ css += ` position: absolute;\n`;
80
+ css += ` white-space: nowrap;\n`;
81
+ css += ` width: 1px;\n`;
82
+ css += `}\n`;
83
+
70
84
  return css;
71
85
  }
72
86