🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Compte Get it free
mtwdev Custom HTML Attributes for Blocks icon
Activement maintenu Testé avec WP 7.1

mtwdev Custom HTML Attributes for Blocks

Easily add custom HTML attributes (data-*, aria-*, boolean, and key-value pairs) to any Gutenberg block with active security and native rendering.

Installations actives<10Nouveau
Téléchargements · 30D304• 0% vs prév. 30j
Évaluation—0 avis
Score de santé64/100Bon
Téléchargements de tous les temps296Depuis novembre 2026
Support résolu—Aucun fil de discussion récent
A besoin deWP 6.6PHP 7.4+
Téléchargements · 7j42▼ -31.1% week over week
Notre verdict

Choix solide

mtwdev Custom HTML Attributes f… is a solid plugin choice in 2026, with a few things worth checking first. Was last updated 1 week ago, and scores 64/100 on our health check.

  • Développé activement — Dernière mise à jour il y a 1 semaine
  • Testé avec le dernier WordPress (7.1)
  • Petite base d'utilisateurs (<10 installations actives)
  • Très peu de critiques jusqu'à présent

Comment s'accumule-t-il ?

Côte à côte sur les installations, les mises à jour, les évaluations et le support

Téléchargements quotidiens

153045Nov 11Nov 22Dec 3
Hier4
Moyenne quotidienne (1 ans)13
Jour de pointe6011 Novembre 2026
12 Derniers mois304

Les pics de téléchargement suivent généralement une nouvelle version - chaque site qui met à jour automatiquement compte comme un téléchargement.

Classements

Where mtwdev Custom HTML Attribut… stands today

WordPress.org Classements de recherche

Position en direct dans la recherche de plugins, Top 100
Mot-cléPositionPlugins concurrentsCatégorie
accessibilité >100 4,058 Meilleurs plugins d'accessibilité →
attributes >100 10,000 Best attributes plugins →
data attributes >100 7,459 Best data attributes plugins →
Gutenberg >100 8,566 Meilleurs plugins Gutenberg →
html >100 10,000 Best html plugins →

About mtwdev Custom HTML Attributes for Blocks

À partir du Lisez-moi officiel · v1.1.3

Description

Custom HTML Attributes for Blocks is a lightweight extension for the WordPress Block Editor (Gutenberg) that allows site editors and developers to inject standard and custom HTML attributes into any supported block.

Whether you need to add custom attributes for analytics tracking (data-track-event="click"), improve accessibility (aria-label, aria-describedby, role), or use modern HTML5 boolean attributes (download, inert), this plugin provides an intuitive, high-performance interface directly within the native Gutenberg Advanced panel.

Principales caractéristiques

  • Native Block Inspector Integration: Seamlessly placed in the block settings sidebar (Advanced panel) without intrusive floating buttons or separate inspectors.
  • Quick Presets Bar: One-click shortcuts for commonly used attributes (data-*, aria-label, title, download, role, tabindex, inert).
  • Clean Boolean Attribute Support: True HTML5 boolean attributes rendered cleanly without empty quotes or values (download, inert).
  • Allow-List Validation: Only data-*, aria-*, and a documented set of standard attributes (role, title, tabindex, lang, dir, inert, hidden, download, rel, target, name, for, autocomplete, xml:lang) are injected. URL-bearing and namespace attributes (href, src, xmlns:*, xlink:*) are always refused.
  • Multi-Layer Security Hardening:
    • Automatic blocking of inline JavaScript event handlers (any name starting with on, see the FAQ).
    • Deep validation against dangerous pseudo-protocols (javascript:, vbscript:, data:text/html).
    • Blocked modification of reserved layout and style attributes (class, id, style).
    • Capability check (unfiltered_html, fully customizable via filter) enforced on save for every post type and editor through parse_blocks()/serialize_blocks().
  • Zero Frontend Bloat: Enqueues zero extra CSS or JS files on the frontend. Attribute injection is handled dynamically at render time via WordPress core’s native WP_HTML_Tag_Processor.
  • Zero Block Invalidation: Attributes are stored safely in block metadata. Disabling the plugin will never break or invalidate your blocks.
  • Translatable: Every string uses the plugin text domain and is ready for the community translations published as language packs on translate.wordpress.org. A .pot template ships in languages/.
  • Fully Extensible: Customizable via PHP filters for developers and agencies.

Code source

The plugin ships with its compiled assets (build/). The human-readable source of every compiled file is available in the public repository: https://github.com/mtwdeveloper/mtwdev-custom-attributes. It is also included in the distributed ZIP (src/), together with the build configuration (package.json).

Developer Extensibility & Hooks

  • mtwdev_custom_attributes_capability: Customize the required user capability (default: unfiltered_html).
  • mtwdev_custom_attributes_allowed: Extend the allowed attribute names and prefixes.
  • mtwdev_custom_attributes_unsupported_blocks: Add or remove block slugs that should not allow custom attributes.
  • mtwdev_custom_attributes_disallowed: Extend the additional disallowed HTML attribute blacklist.

Installation

  1. Upload the mtwdev-custom-html-attributes-for-blocks directory to your /wp-content/plugins/ directory, or install directly through the WordPress plugin installer.
  2. Activate the plugin via the Plugins menu in WordPress.
  3. Edit any post, page, or template in the Block Editor, select a block, and expand the Advanced panel in the right sidebar to configure your attributes.

Journal de modifications

1.1.3

  • Fix: Extracted the editor controls into a dedicated CustomAttributesPanel component so useState hooks are never called conditionally inside withCustomAttributesControls (React Rules of Hooks compliance).
  • Accessibility: Added aria-label attributes to the attribute-key input and remove button, replaced the unassociated BaseControl label with a heading, and used a proper ellipsis character in the placeholder text.
  • Code Quality: Enforced pure immutable updates in handleUpdateValue and handleToggleBoolean, updated Button props (variant, size), and moved the permission notice spacing into editor.scss.
  • Compatibility: Tested up to WordPress 7.2.

1.1.2

  • Fix: Unified text domain across JavaScript and PHP to match the plugin slug for GlotPress language packs compatibility.
  • i18n: Added Spanish translation support and refreshed the translation template.

1.1.1

  • Name and slug changed to mtwdev-custom-html-attributes-for-blocks.

1.1.0

  • Security: attribute validation is now an allow list instead of a deny list; xmlns:*, xlink:*, href, src and unknown names no longer reach the markup.
  • Security: unauthorized saves are sanitized with parse_blocks()/serialize_blocks() on content_save_pre, replacing the pre_kses regex that corrupted the block JSON when a value contained ].
  • Security: the save-time check covers every post type and every editor path (block editor REST, classic editor, XML-RPC, imports), not just posts over REST.
  • Editor: the dead blocks.registerBlockTypeAttributes filter was replaced by the real blocks.registerBlockType, so blocks registered only in JavaScript keep their attributes.
  • Editor: the data-*/aria-* presets now report an incomplete name instead of creating a valueless attribute.
  • Editor: block editor data is passed with wp_add_inline_script() + wp_json_encode() instead of wp_localize_script().
  • i18n: translations are delivered as language packs from translate.wordpress.org; bundled .po, .mo and script .json files were removed and load_plugin_textdomain() is no longer needed.
  • Docs: corrected changelog, screenshots section, allow-list documentation and the development/release workflow.
  • Compatibility: Requires at least: 6.6 (the compiled editor bundle loads react-jsx-runtime), Tested up to: 7.1.
  • Tests: 11 JavaScript tests and 77 PHP tests.

1.0.0

  • Version initiale.
  • Optimized injection using native WordPress core WP_HTML_Tag_Processor with early bailouts.
  • Seamless integration into Gutenberg’s native Advanced panel.
  • Quick presets bar and full boolean attribute support.
  • Full internationalization support with English source strings.

Journal des modifications complet sur WordPress.org →

Captures d'écran

The Custom HTML Attributes control inside the native Advanced panel of the block settings sidebar.
The Custom HTML Attributes control inside the native Advanced panel of the block settings…
A block with key-value attributes (data-track, aria-label) and boolean attributes (download) configured.
A block with key-value attributes (data-track, aria-label) and boolean attributes…
The rendered front-end markup with the attributes injected into the block's opening tag.
The rendered front-end markup with the attributes injected into the block's opening tag.

Pour les développeurs

Est-ce votre plugin ? Montrez les chiffres.

Ajoutez un badge en direct à votre site, docs ou github readme. Il se met à jour par lui-même - aucun compte n'est nécessaire.

Badge d'installations actives Badge Badge de score de santé

Best mtwdev Custom HTML Attributes… alternatives

Tous les plugins d'accessibilité →
Alternatives
Rang Plugin Installations actives Évaluation Mise à jour Santé
1 Accessibilité Web (anciennement connue sous le nom d'Ally) - Numérisation WCAG, corrections guidées, widget d'utilisabilité Accessibilité Web (formément connue sous le nom d'Ally) Web Accessibility (anciennement connu sous le nom de Ally) est un plugin gratuit, puissant et convivial… par Elementor 500K+ ★★★★★★★★★★ 2.9 (163) Il y a 3 mois 57
2 Attributs d'image automatiques à partir du nom de fichier avec le mise à jour en bloc (ajout de texte alternatif, titre d'image pour l'image SEO) Attributs d'image automatique à partir du nom de fichier avec mise à jour en bloc (ajout… Ajoutez automatiquement le texte, le titre, la légende et la description du nom de fichier. Mise à jour groupée… par Arun Basil Lal 100K+ ★★★★★★★★★★ 4.8 (93) Il y a 3 mois 85
3 Accessibilité par Userway Accessibilité par Userway Le widget d'accessibilité d'Userway crée une expérience de navigation plus simple et plus accessible… par Userway 80K+ ★★★★★★★★★★ 4 (57) il y a 12 mois 59
4 Menu réactif – Menu mobile et constructeur de menus hamburgers Menu réactif – Menu mobile et constructeur de menus hamburgers Menu mobile et constructeur de menus hamburgers pour WordPress. Accessible, compatible avec les claviers et fonctionne… Par les systèmes ExpressTech 70K+ ★★★★★★★★★★ 4.5 (576) il y a 1 mois 74
5 Accessibilité WP Accessibilité WP WP Accessibility corrige les problèmes courants d'accessibilité sur votre site WordPress. Par Joe Dolson 60K+ ★★★★★★★★★★ 4.8 (68) il y a 1 mois 90
6 Accessibility Widget by OneTap – Easy One-Click Accessibility Toolbar Accessibility Widget by OneTap Accessibility toolbar for WordPress in 44 languages: one-click setup, statement generator… by OneTap 60K+ ★★★★★★★★★★ 4.9 (81) il y a 6 jours 95
7 Infinity23 (anciennement Tag Manager) - Un plugin qui remplace tout le reste Infinity23 (anciennement Tag Manager) Plugin WordPress - Accessibilité, Tag Manager, Notes, Boutons de contact flottants… par YYDéveloppement 20K+ ★★★★★★★★★★ 4.7 (54) il y a 1 semaine 78
8 Alt Text Ai – Générer automatiquement le texte ALT de l'image pour SEO et l'accessibilité Alt texte ai Définit automatiquement le texte alternatif descriptif de vos images. Augmente votre SEO et… par alttextai 20K+ ★★★★★★★★★★ 4.7 (35) il y a 1 mois 85
9 Mon calendrier – Gestionnaire d'événements accessible Mon calendrier – Gestionnaire d'événements accessible Accessible WordPress Plugin du calendrier des événements. Gérer les événements uniques ou récurrents, les événements… Par Joe Dolson 20K+ ★★★★★★★★★★ 4.7 (159) il y a 5 jours 84
10 Mode sombre – Améliorez l'accessibilité avec le thème sombre alimenté par l'IA Mode sombre – Améliorez l'accessibilité avec le thème sombre alimenté par l'IA Activez le mode sombre sur WordPress sans aucun codage. Améliorez l'accessibilité du site avec un… par wppool 20K+ ★★★★★★★★★★ 4.5 (392) il y a 1 mois 88

FAQ

mtwdev Custom HTML Attributes for B…: quick answers

Réponses directes, extraites des données en direct WordPress.org.

Source : WordPress.org

Is mtwdev Custom HTML Attributes f… free?

Yes. mtwdev Custom HTML Attributes f… is free to download and use from the official WordPress.org plugin directory.

Is mtwdev Custom HTML Attributes f… safe to use in 2026?

mtwdev Custom HTML Attributes f… is a solid plugin choice in 2026, with a few things worth checking first. Was last updated 1 week ago, and scores 64/100 on our health check.

How many websites use mtwdev Custom HTML Attributes f…?

mtwdev Custom HTML Attributes f… is active on <10 WordPress websites and has been downloaded 296 times since it launched in November 2026. It was downloaded 304 times in the last 30 days.

Does mtwdev Custom HTML Attributes f… work with WordPress 7.1?

Yes. The developer has tested mtwdev Custom HTML Attributes f… up to WordPress 7.2, the latest release. It requires WordPress 6.6 or newer.

What PHP version does mtwdev Custom HTML Attributes f… need?

mtwdev Custom HTML Attributes f… requires PHP 7.4 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was mtwdev Custom HTML Attributes f… last updated?

The latest version, 1.1.3, was released on November 26, 2026 (1 week ago).

Who makes mtwdev Custom HTML Attributes f…?

mtwdev Custom HTML Attributes f… is developed and maintained by mtwdev.

What are the best alternatives to mtwdev Custom HTML Attributes f…?

The most popular alternatives to mtwdev Custom HTML Attributes f… are Web Accessibility (formally… (500K+ installs), Auto Image Attributes From… (100K+ installs) and Accessibility by UserWay (80K+ installs).

Propulsé par PageForge

Un modèle et une feuille de calcul. Une vraie page pour chaque recherche.

PageForge transforme chaque ligne d'un CSV en une page WordPress avec son propre titre, URL, SEO et schéma, construit sur la mise en page que vous Déjà conçu. Gratuit sur WordPress.org.

  • CSV et XLSX, plus Google Sheets sur les professionnels et les entreprises
  • Son propre titre, URL, SEO champs et schéma pour chaque page
  • Fonctionne avec l'éditeur de blocs, Elementor, Divi et Avada
  • Gratuit sur WordPress.org, pas de carte de crédit

↑↓ bouger↵ ouvrir