Skip to content

Use the Markdown title for inline image title attributes - #4667

Closed
shainaraskas wants to merge 1 commit into
mainfrom
fix/inline-image-title
Closed

shainaraskas wants to merge 1 commit into
mainfrom
fix/inline-image-title

Conversation

@shainaraskas

@shainaraskas shainaraskas commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Inline images now use the Markdown title as the title attribute and the alt text as alt. If no title is given, the alt text is used for both, as before.
  • Updates docs/syntax/images.md and the affected test expectations.

Fixes #3045

Why

#1656 made alt text always override the Markdown title for inline images, on the basis that most titles in migrated content weren't useful. That drops titles that authors write on purpose. For example, the Elasticsearch enrich settings page uses ![logo cloud](...svg "Supported on Elastic Cloud Hosted"), and the tooltip rendered "logo cloud" instead. This change reverses that decision. An explicit title is used, and alt is the fallback.

🤖 Generated with Claude Code

The inline image renderer wrote the title attribute from the alt text and
never read the Markdown title, so an explicit title was always dropped.
Use the Markdown title when provided and fall back to the alt text.

Fixes #3045

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs-builder not respecting explicit image titles

1 participant