Skip to main content

sites-conformes-rgaa

Rend les emojis décoratifs accessibles dans les textes riches sites-conformes, en les enveloppant dans le balisage recommandé par le DSFR :

<span role="img" aria-hidden="true">🔥</span>

aria-hidden="true" masque l'emoji aux lecteurs d'écran - il reste purement décoratif, le texte environnant porte déjà le sens.

Ce que fait ce package

  1. sites_conformes_rgaa.emoji_wrapping : le module central, testé indépendamment. wrap_emojis_in_html(html) transforme une chaîne HTML, wrap_emojis_in_streamfield_raw_data(raw_data) parcourt récursivement la structure JSON brute d'un StreamField.
  2. Commande wrap_emojis : parcourt toutes les pages (tous les RichTextField et StreamField détectés automatiquement via l'introspection des modèles Wagtail) et enveloppe les emojis trouvés.
  3. Hook before_publish_page : enveloppe automatiquement les emojis d'une page à chaque publication, pour que les nouvelles pages n'aient jamais besoin de la commande manuelle.

Idempotent : ré-exécuter la commande ou republier une page déjà enveloppée ne modifie rien (les spans déjà posés sont détectés et ignorés).

Installation

uv add sites-conformes-rgaa

Ajouter à INSTALLED_APPS (pas de contrainte d'ordre - ce package ne surcharge aucun template) :

INSTALLED_APPS += ["sites_conformes_rgaa"]

Utilisation

python manage.py wrap_emojis          # toutes les pages
python manage.py wrap_emojis --dry-run  # aperçu sans écrire

Les nouvelles publications sont couvertes automatiquement par le hook - la commande sert surtout au rattrapage du contenu existant, ou en CI/CD après une migration de contenu.

Limites connues

Le vérificateur d'accessibilité Wagtail (axe-core, intégré à l'éditeur) ne peut pas être étendu avec une règle personnalisée détectant les emojis non enveloppés : les fonctions evaluate des checks axe personnalisés sont figées dans le bundle JS compilé de Wagtail (wagtailadmin/js/userbar.js), et ne peuvent pas être injectées depuis une application Django. Voir la discussion dans UPSTREAM_SUGGESTIONS.md à la racine du monorepo.

Metadata

Release files for sites-conformes-rgaa 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sites-conformes-rgaa 0.1.0
File Size Uploaded Provenance Actions
sites_conformes_rgaa-0.1.0.tar.gz 8.0 kB With provenance Details for sites_conformes_rgaa-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sites-conformes-rgaa 0.1.0
File Interpreter ABI Platform Actions
sites_conformes_rgaa-0.1.0-py3-none-any.whl Python 3 none any Details for sites_conformes_rgaa-0.1.0-py3-none-any.whl

Total release size: 19.1 kB

Release files / sites_conformes_rgaa-0.1.0.tar.gz

Download URL sites_conformes_rgaa-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
979ff481c096b0c0405221843895055506997ff46de375018f3af7baabbf36db
BLAKE2b-256 checksum
How to use checksums
ae691ae8f462217632bfd2c3cfa910900abf9f52659fa4a2c1a73bcf79b3977f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / sites_conformes_rgaa-0.1.0-py3-none-any.whl

Download URL sites_conformes_rgaa-0.1.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5f09fc4338634ef00ab69a6934f346b66223b6017eb77c316f4942914c58302
BLAKE2b-256 checksum
How to use checksums
83b8fc462361648c4263da0f52ad4d66405f89d010831095ebeb6e5530fbcedc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for sites-conformes-rgaa 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sites_conformes_rgaa-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page