=== Jeet ALT Context Helper ===
Contributors: jeetsanwal
Tags: alt text, accessibility, images, editorial
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Review saved images in context, distinguish missing and intentionally empty ALT, and change one occurrence with a preview.

== Description ==

The same photograph can need different alternative text on two pages. A decorative image may need an intentionally empty ALT instead. Editing the Media Library ALT does not reliably update existing saved occurrences.

Jeet ALT Context Helper adds Tools > ALT Context Helper. Choose a post or page and review its saved images alongside nearby text and captions. Missing ALT, empty ALT and existing text are separate review states. The tool does not declare every empty ALT an error.

For a supported occurrence, choose descriptive text or intentionally empty text. Preview the current and proposed values, then confirm that single change. Media Library metadata and other occurrences are not updated by this plugin. WordPress's normal content-save hooks and sanitization still run.

Features:

* Search posts and pages, with 20 results per page.
* Review 25 image occurrences per page with nearby saved text and captions.
* Deliberate per-occurrence corrections, with preview before saving.
* Preserve existing block delimiters, JSON attributes, and unrelated markup during the proposed edit.
* Warn about images inside links, where an accessible link name still matters.
* Check administrator and edit-post permissions, a POST nonce, content version and another editor's post lock.
* Use normal WordPress saving and enabled revisions.
* No frontend assets, ads, telemetry, account, AI text generation or remote scanning service.

Supported editing in version 1.0:

* Ordinary core Image blocks, including modern galleries whose children are Image blocks.
* Supported core wrappers: Group, Columns, Column, Gallery and Details.
* Classic saved HTML, Classic blocks and Custom HTML blocks.

Conservative limits:

* Saved post_content only; posts and pages only. It does not render blocks, shortcodes, content filters or builder output while reviewing.
* Custom/dynamic block images, Cover/Media & Text images, legacy gallery markup, bound ALT and separately saved decorative settings are read-only. Change those in their original editor.
* Synced patterns, templates, CSS background images, featured images and images generated by themes/plugins are outside the review. Builder metadata is not read or changed.
* Shortcode-like content makes occurrences read-only, because generated output may differ.
* The tool checks up to 1 MB and the first 1,000 saved images per post. An incomplete review or unusual block syntax disables edits. A 20,000-token / 100-block-depth guard bounds parsing work.
* Nearby text is an excerpt, not a rendered page or a complete accessible-name calculation. A person must decide whether ALT is appropriate.
* Automatic thumbnails load only same-origin raster image URLs under the site's uploads URL, without a query string. External/CDN images remain listed as text, with no automatic preview.
* Save-version checks reject an already-saved change; a small race with another WordPress save outside the plugin can still exist. Avoid editing the same post in two places simultaneously. Plugin writes themselves are serialized.

No accessibility score, WCAG certification, image recognition or blanket Media Library ALT replacement is provided. Review the page and its editor after saving.

== Installation ==

1. Upload the jeet-alt-context-helper folder to wp-content/plugins, or install its ZIP through Plugins > Add New > Upload Plugin.
2. Activate Jeet ALT Context Helper.
3. Open Tools > ALT Context Helper as an administrator.
4. Choose a post or page, review an occurrence, preview a change and confirm it.
5. Check the page preview and block editor after saving. Revisions are available when enabled for that content type.

== Frequently Asked Questions ==

= Does it fill every missing ALT automatically? =

No. Context and purpose matter. You deliberately choose descriptive text or intentionally empty text for one saved occurrence.

= Is every empty ALT a problem? =

No. Empty ALT can be correct for decorative or redundant images. Linked images also need an understandable accessible link name. The screen helps a person review this; it does not infer intent.

= Does it update Media Library ALT or all uses of a photo? =

No. Only the selected saved occurrence is changed by the plugin. Other plugins and normal WordPress save hooks may apply their usual processing.

= Will it fix Elementor, Cover blocks or theme-generated images? =

No. Builder metadata, generated images, custom/dynamic blocks and additional ALT settings must be reviewed in their original editor. The screen reports saved IMG tags only, and unsupported block shapes are read-only.

= Where is information sent? =

The plugin has no remote service or telemetry and does not make HTTP scan requests. Its admin screen can display ordinary same-origin uploaded raster thumbnails using the browser. It does not automatically load external image sources.

= Who can use it? =

Administrators with manage_options and permission to edit the selected post. It uses the site's existing permissions; it does not grant new capabilities.

= What happens when I delete the plugin? =

Saved ALT changes remain in post content. The plugin creates no permanent report database. Temporary per-post save locks normally disappear immediately and expire for reuse after two minutes if an interrupted save leaves one behind. Deleting the plugin removes interrupted-save locks for the current site.

= How do updates work? =

This is a self-hosted ZIP release. Download an update from jeetsanwal.in and replace the installed plugin through WordPress. No automatic updater or license key is included.

== Changelog ==

= 1.0.1 =
* Make simultaneous save-lock claims atomic and release only the exact lock owned by that request.

= 1.0.0 =
* Initial release: contextual saved-image review, deliberate occurrence changes, preview, permissions and save-version checks.
