Linux 软件免费装
Banner图

DevLab Image Alt

开发者 devlab33
更新时间 2026年11月11日 22:25
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

seo images accessibility alt text alt attribute

下载

0.1.1

详情介绍:

Images without alt text are bad for people who use screen readers and a missed chance for image search. DevLab Image Alt fills in the gaps automatically, at the moment the page is displayed. Your media library and your posts are not edited, so there is nothing to undo. What it does What it does not do Light and quiet The plugin only filters output. It never writes alt text to your database: it stores one small settings option and, per user, a flag that remembers a dismissed notice. It does not touch .htaccess, does not store any cache, does not crawl your site and loads no file on your public pages. Only the <img> tags that need an alt are edited; the rest of your HTML is left exactly as it was. For developers Use the devlab_alt_text filter to change the text before it is used, or return an empty string to leave an image without alt text: add_filter( 'devlab_alt_text', function ( $text, $attachment_id, $source ) { return $text; }, 10, 3 ); Privacy This plugin collects no data, sends no data to anyone, contacts no external service and needs no account or API key. It does not set cookies. It does not provide legal advice and does not guarantee that your site meets any accessibility standard or law; it fills in one missing attribute. About DevLab DevLab builds plugins and themes for WordPress. The plugin adds a DevLab menu with its settings screen. That screen has a small box with a link to the DevLab Store (devlab.ia.br/store) and one dismissible notice. Nothing promotional is added anywhere else in your dashboard or to your public pages (the only change there is the missing alt attribute), and the plugin never adds a credit link to your site.

安装:

  1. Upload the devlab-image-alt folder to the /wp-content/plugins/ directory, or install the plugin from the Plugins screen in WordPress.
  2. Activate the plugin through the Plugins screen. Missing alt text is now filled in, using the attachment title.
  3. To change the source or where it applies, go to DevLab > Image Alt, adjust the options and click Save Changes.

屏幕截图:

  • The "Meet DevLab" box with a link to the DevLab Store.

升级注意事项:

0.1.1 First public release.

常见问题:

Where do I find the settings?

In the WordPress dashboard, under DevLab > Image Alt. There is also a Settings link on the Plugins screen.

Does it change my media library or my posts?

No. The alt text is added only in the HTML that visitors receive. Nothing is written to your media library or your posts; the plugin only stores its own settings option and a per-user flag for its dismissed notice.

Will it overwrite alt text I already wrote?

No. Only empty or missing alt attributes are filled in.

An image is decorative and should have an empty alt.

An empty alt is the right choice for purely decorative images. The plugin leaves alone images marked with role="presentation", role="none" or aria-hidden="true". For any other image with an empty alt it cannot tell whether the emptiness was intentional, so it fills it. If you need an exception, use the devlab_alt_text filter to return an empty string for that attachment.

Why is the alt text of some image just its file name?

When the source you chose (for example the caption) is empty for an image, the plugin uses the cleaned-up file name instead. Titles are filled by WordPress from the file name when you upload, so the default source gives similar results. If the file name says nothing (IMG_4032), no alt text is added. For the best results, write real alt text in the media library.

Why did nothing change on my site?

If you use a page cache or a performance plugin, clear its cache after you save the settings. Also check that the image is a file from your media library: images from other websites are not changed.

Does it work with page builders and the block editor?

It works on the HTML that WordPress prints for post content and on images printed with the standard WordPress image functions. A builder that prints its own <img> tags outside of the post content, or that builds images without WordPress functions, is outside of what the plugin can see.

Does it make my site accessible or compliant with any law?

No. It fills in one missing attribute. Please check the accessibility rules that apply to you for everything else your site does.

What happens when I delete the plugin?

The plugin's option and the "notice dismissed" flag are removed. Your media library, posts and other settings are not touched, because the plugin never changed them.

更新日志:

0.1.1