跳到内容

Manly Fix

v1.5.5

DimitriAus · 2026年5月19日 上架

HTML validator errors fix in WordPress and WooCommerce.

正在使用
10 以下
评分
暂无
累计下载
503
最近更新
2026年10月19日
需要 WordPress 6.2+已测试到 7.1.5PHP 7.4+

贡献者

Applies configurable HTML fixes to WordPress and WooCommerce page output. Each fix can be individually enabled or disabled via Settings Manly Fix.

WordPress & HTML Fixes

  • Remove trailing slashes – Removes XHTML-style trailing slashes (/>) from void elements (<meta>, <link>, <img>, <input>, etc.) for clean HTML5 output.
    Validator: “Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.”

  • Remove intrinsic size CSS – Removes the contain-intrinsic-size CSS rule injected by WordPress for auto-sized images.
    Validator: “CSS: contain-intrinsic-size: Property contain-intrinsic-size doesn’t exist.”

  • Remove redundant aria-hidden – Removes aria-hidden="true" from elements that already carry the hidden attribute.
    Validator: “Attribute aria-hidden is unnecessary for elements that have attribute hidden.”

  • Move router style to <head> – Moves the WordPress Interactivity Router animations inline <style> tag from <body> to <head>.
    Validator: “Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)”

  • Remove invalid as from prefetch links – Removes the invalid as attribute from <link rel="prefetch"> elements emitted by WooCommerce.
    Validator: “A link element with an as attribute must have a rel attribute that contains the value preload or the value modulepreload.”

  • Remove oEmbed discovery links – Removes the oEmbed discovery <link> elements from the page head.

  • Normalize Button block width CSS – Expands the core Button block width calc() formula in inline styles into an equivalent formula accepted by the HTML validator.

WooCommerce Fixes

These fixes are only shown when WooCommerce is active.

  • Mini-cart role=”dialog” – Adds missing role="dialog" to the WooCommerce mini-cart drawer div.
    Validator: “Element div is missing one or more of the following attributes: role.”

  • Add placeholder src to Interactivity API images – Adds a transparent placeholder src and an empty alt="" to <img> elements that use the WordPress Interactivity API but have no static attributes. Real values are set by JavaScript at runtime.
    Validator: “Element img is missing one or more of the following attributes: src, srcset.” / “An img element must have an alt attribute.”

  • Correct gallery SVG attributes – Renames the invalid fillrule and cliprule attributes on product gallery SVG paths to fill-rule and clip-rule.

  • Remove redundant gallery dialog role – Removes the redundant role="dialog" from the product gallery <dialog> element.

  • Remove invalid current-page span label – Removes aria-label from the role-less current-page <span> in pagination.

Support

For issues, feature requests, or contributions, please contact Manly Electronics.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums