Logo di Progressive Enhancement

Progressive Enhancement

Community
mgifford
progressive-enhancement

Carica questa skill quando realizzi una funzionalità web, esamini decisioni architetturali o valuti dipendenze JavaScript. In nessun caso realizzare funzionalità che smettano completamente di funzionare se JavaScript non è disponibile o non funziona. Parti sempre dall'HTML semantico, aggiungi miglioramenti CSS e usa JavaScript solo come ultimo livello, facoltativo. Dai priorità alla resilienza e all'accessibilità universale rispetto alle funzionalità all'avanguardia.

Add to TypingMind

Panoramica

Pubblicato damgifford
Repositoryaccessibility-skills
Nome della skillprogressive-enhancement
Stelle
57
Fork
5
File inclusi
1
LicenzaAGPL-3.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 1

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da mgifford su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Progressive Enhancement in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/mgifford/accessibility-skills/tree/main/skills/progressive-enhancement
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mgifford/accessibility-skills.git /tmp/accessibility-skills
mkdir -p .claude/skills
cp -r /tmp/accessibility-skills/skills/progressive-enhancement .claude/skills/progressive-enhancement
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Progressive Enhancement in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Progressive Enhancement non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Progressive Enhancement non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Progressive Enhancement Accessibility Skill

Canonical source: examples/PROGRESSIVE_ENHANCEMENT_BEST_PRACTICES.md in mgifford/ACCESSIBILITY.md This skill is derived from that file. When in doubt, the example is authoritative.

Apply these rules when building any web feature or reviewing architecture decisions.


Core Mandate

Start with a solid foundation that works for every user, then layer enhancements. Every user — regardless of browser capability, network speed, assistive technology, or JavaScript availability — must be able to access core content and complete core tasks.

Progressive enhancement is also a sustainability practice. Pages that work without JavaScript are dramatically lighter: fewer bytes transferred, less CPU spent on parsing and executing scripts, and less energy consumed per page view. See SUSTAINABILITY.md and the Web Sustainability Guidelines.


Severity Scale (this skill)

LevelMeaning
CriticalCore content or task inaccessible without JS/CSS
SeriousCore content accessible but significantly degraded without JS/CSS
ModerateEnhancement degrades gracefully but with friction
MinorBest-practice gap; marginal impact

The Three Layers

Layer 1 — Semantic HTML (always required)

Failure here is Critical.

  • All core content readable in plain HTML — no CSS or JS required
  • Forms submittable with native browser behaviour
  • Navigation functions as standard links
  • Headings, lists, tables, and landmarks accurately reflect document structure

Layer 2 — CSS (enhance presentation)

Failure here is Moderate to Serious.

  • External stylesheets that can be disabled without losing content
  • Respect user preferences: prefers-reduced-motion, prefers-color-scheme, prefers-contrast, forced-colors
  • Page remains usable if stylesheets fail to load

Layer 3 — JavaScript (enhance interactivity)

JS that gates core content or tasks is Critical.

  • JS enhances; it does not gate access to core content or tasks
  • Apply JS-dependent classes/behaviours from scripts, not static markup
  • Handle script failure gracefully — the HTML layer must still work
  • Use feature detection, not browser detection:
js
if ('fetch' in window && 'querySelector' in document) {
  // apply enhanced experience
}

Layer 3 extension — Service Workers (offline capability)

Service Workers are a Layer 3 enhancement: they require JavaScript, are registered by a script, and must degrade gracefully when unavailable (private browsing, unsupported browsers, HTTPS not available).

When implemented, they extend both accessibility and sustainability:

  • Accessibility: users on unreliable connections (common in rural areas, low-income households, and developing regions) can continue to access previously loaded content offline
  • Sustainability: cached responses eliminate repeat network requests, reducing data transfer and server energy per page view
js
// Register Service Worker only if supported — classic PE feature detection
if ('serviceWorker' in navigator) {
  navigator.serviceWorker.register('/sw.js').catch((err) => {
    // Registration failure: page continues to work normally without it
    console.warn('Service Worker registration failed:', err);
  });
}

Offline fallback pattern:

js
// sw.js — cache-first with network fallback
const CACHE_NAME = 'v1';
const OFFLINE_URL = '/offline.html';

self.addEventListener('install', (event) => {
  event.waitUntil(
    caches.open(CACHE_NAME).then((cache) =>
      cache.addAll([OFFLINE_URL, '/', '/styles.css'])
    )
  );
});

self.addEventListener('fetch', (event) => {
  if (event.request.mode === 'navigate') {
    event.respondWith(
      fetch(event.request).catch(() => caches.match(OFFLINE_URL))
    );
  }
});

The offline fallback page (/offline.html) must itself be a valid Layer 1 HTML document — semantic, readable without CSS or JS.

Service Worker caching strategies (cache-first, network-first, stale-while- revalidate) should be chosen based on content update frequency. Avoid caching strategies that serve stale content for content that changes frequently without a cache-invalidation plan.


Critical: Core Content Must Not Require JavaScript

Rendering page content exclusively in JavaScript is Critical — users with JS disabled, AT users encountering compatibility issues, and low-bandwidth users are completely excluded.

  • Deliver complete HTML from the server; hydrate interactivity in the browser
  • Core content must be in the initial HTML response
  • When using React/Vue/Angular/Svelte: configure SSR or static generation
  • Avoid SPA patterns that require JS to render any visible content

Every byte of JavaScript that is not needed to access core content is unnecessary energy consumption. Prefer server rendering — it transfers HTML once; a JS bundle transfers code that must then be parsed, compiled, and executed on every visit.


Critical: Forms Must Work Without JavaScript

html
<!-- Layer 1: works without JS -->
<form action="/search" method="get">
  <label for="query">Search</label>
  <input id="query" name="q" type="search">
  <button type="submit">Search</button>
</form>

Enhance with JS for instant results, autocomplete, or inline validation — while keeping the server-processed form as fallback.

A form that cannot be submitted without JS is Critical.


Critical: Navigation Must Work Without JavaScript

html
<!-- Layer 1: plain links always work -->
<nav aria-label="Main">
  <ul>
    <li><a href="/about">About</a></li>
    <li><a href="/contact">Contact</a></li>
  </ul>
</nav>

Enhance with JS for dropdowns or animated transitions.


Serious: Dynamic Content Must Have a Fallback Route

js
if ('fetch' in window) {
  loadContentAsync(url);
} else {
  // Standard link navigation works automatically
}

Use aria-live regions only after confirming the base content is accessible without them.


Moderate: CSS User Preferences Must Be Respected

prefers-reduced-motion, prefers-color-scheme, prefers-contrast, and forced-colors are Layer 2 responsibilities. Ignoring them is Moderate at minimum; ignoring prefers-reduced-motion for fast or flashing animations can reach Serious.


What to Avoid

  • Rendering page content exclusively in JavaScript — Critical
  • display:none / visibility:hidden on content required at the HTML layer — Critical
  • Requiring JS to navigate between pages without a server-rendered fallback — Critical
  • user-scalable=no — Serious (prevents zoom for low-vision users)
  • Assuming scripts will execute — always handle failure states
  • Polyfills as a substitute for progressive enhancement (they patch features; PE builds around their absence)
  • Shipping large JS bundles for functionality that could be server-rendered — this is both an accessibility risk and a sustainability cost

Definition of Done Checklist

  • Core content readable with JavaScript disabled
  • Core tasks completable with JavaScript disabled
  • Forms submit via native browser behaviour
  • Navigation works as standard HTML links
  • CSS respects prefers-reduced-motion, prefers-color-scheme, prefers-contrast
  • Script failure handled gracefully
  • Feature detection used (not browser detection)
  • SSR or static generation configured for JS frameworks
  • Service Worker registered with feature detection and silent failure handling
  • Offline fallback page is valid Layer 1 HTML
  • Caching strategy documented and matched to content update frequency
  • Tested: disable JS → verify core content; disable CSS → verify logical reading order

Key WCAG Criteria

  • 2.1.1 Keyboard (A) — native elements have built-in keyboard support
  • 4.1.2 Name, Role, Value (A)

Note: WCAG 4.1.1 Parsing was removed in WCAG 2.2 (August 2023). Modern browsers handle parsing errors uniformly. Valid semantic HTML remains important as a progressive enhancement foundation, but it is no longer a testable WCAG criterion. Do not cite it in audits or compliance statements.


References

Standards horizon: WCAG 3.0 is in development. No breaking changes to progressive enhancement principles are anticipated. Monitor: https://www.w3.org/TR/wcag-3.0/

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Progressive Enhancement?

Carica questa skill quando realizzi una funzionalità web, esamini decisioni architetturali o valuti dipendenze JavaScript. In nessun caso realizzare funzionalità che smettano completamente di funzionare se JavaScript non è disponibile o non funziona. Parti sempre dall'HTML semantico, aggiungi miglioramenti CSS e usa JavaScript solo come ultimo livello, facoltativo. Dai priorità alla resilienza e all'accessibilità universale rispetto alle funzionalità all'avanguardia.

Perché usare Progressive Enhancement su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Progressive Enhancement è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Progressive Enhancement in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/mgifford/accessibility-skills/tree/main/skills/progressive-enhancement. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Progressive Enhancement?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Progressive Enhancement?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Progressive Enhancement: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Progressive Enhancement è gratuita?

Sì. È pubblicata su GitHub da mgifford con licenza AGPL-3.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇