@kinti/a11y-toolkit 5.25.0 → 5.25.2

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.
@@ -306,6 +306,32 @@ def autofix(html_text, lang=None, title=None, url='(html)', form_errors=True):
306
306
  return {'fixed_html': fixed, 'applied': applied, 'not_applied': not_applied}
307
307
 
308
308
 
309
+ def _star_nudge_once():
310
+ """Thank the operator once per machine after a real fix lands — never in
311
+ CI, never blocking, silence with A11Y_NO_STAR_NUDGE=1. The marker lives in
312
+ the system temp dir (never the user's home: the filesystem-boundary pin in
313
+ test_solido applies), so a cleaned tmp dir may show it again — that is the
314
+ honest maximum without telemetry."""
315
+ import os
316
+ if os.environ.get('A11Y_NO_STAR_NUDGE'):
317
+ return
318
+ if any(os.environ.get(k) for k in ('CI', 'GITHUB_ACTIONS', 'GITLAB_CI',
319
+ 'CONTINUOUS_INTEGRATION', 'TF_BUILD')):
320
+ return
321
+ import tempfile
322
+ marker = os.path.join(tempfile.gettempdir(), 'a11y-toolkit-star-nudge')
323
+ try:
324
+ if os.path.exists(marker):
325
+ return
326
+ with open(marker, 'w', encoding='utf-8') as fh:
327
+ fh.write('thanked\n')
328
+ except OSError:
329
+ return
330
+ print('If a11y-toolkit saved you time, a star helps other auditors find '
331
+ 'it: github.com/kinti/a11y-toolkit (shown once; '
332
+ 'A11Y_NO_STAR_NUDGE=1 silences)', file=sys.stderr)
333
+
334
+
309
335
  def main(argv):
310
336
  ap = argparse.ArgumentParser(description=__doc__)
311
337
  ap.add_argument('--file', required=True)
@@ -321,6 +347,9 @@ def main(argv):
321
347
  f.write(res['fixed_html'])
322
348
  print(json.dumps({'file': a.out, 'applied': res['applied'],
323
349
  'not_applied': res['not_applied']}, ensure_ascii=False, indent=1))
350
+ # human-facing thank-you goes to stderr AFTER the JSON: piped stdout
351
+ # stays machine-parseable, and only a real fix (a file written) asks
352
+ _star_nudge_once()
324
353
  else:
325
354
  print(res['fixed_html'])
326
355
  return 0
@@ -87,7 +87,7 @@ try:
87
87
  except ImportError:
88
88
  ARIALIVE_JS = None # repo checkout: read the file
89
89
 
90
- VERSION = '5.25.0'
90
+ VERSION = '5.25.2'
91
91
 
92
92
  # Params renombrados a inglés en 5.11.0; se aceptan los nombres previos.
93
93
  PARAM_ALIASES = {
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@kinti/a11y-toolkit",
3
- "version": "5.25.0",
3
+ "version": "5.25.2",
4
+ "mcpName": "io.github.kinti/a11y-toolkit",
4
5
  "description": "Zero-dependency WCAG 2.2 accessibility engine (34 MCP tools + CLI): audits, contrast fixing, SHA-256-sealed evidence packs, SARIF, EARL/ACT, CI ratchet. Self-contained: the pure-stdlib Python engine ships inside and runs via python3 \u2014 no downloads, no installs.",
5
6
  "license": "MIT",
6
7
  "repository": {