ckeditor_media_title
Allows editors to override the title attribute of embedded media (especially images) directly in CKEditor 5, without changing the original media entity. Improves accessibility and contextual tooltips.
Features
What is the basic functionality?
This module adds a button to the toolbar that appears when an embedded media entity (typically an image) is selected in CKEditor 5. Clicking the button opens a small form where editors can enter custom text for the HTML title attribute of the <drupal-media> tag or leave it blank to fall back to the media entity's default title.
What unique features does enabling this project add?
- Direct in-editor override of the
titleattribute on embedded media. - Uses a clean, native-style contextual balloon form with Save/Cancel buttons.
- The override is stored per content instance – the original media entity remains unchanged.
- Fully configurable per text format (can be enabled or disabled individually).
When and why would someone use this module?
Use it when:
- You need different tooltip text for the same image in different pieces of content.
- Accessibility requirements demand specific, context-appropriate title attributes.
- You want to avoid editing the media entity itself just to change a tooltip.
- Content editors frequently embed images and need quick control over tooltip text.
What use cases are there?
- News sites using the same photo in multiple articles with different contextual descriptions.
- Documentation sites where an image needs a more specific tooltip depending on the page.
- Multilingual or multi-context sites where the default media title isn't suitable everywhere.
- Improving screen-reader experience with more descriptive titles without altering library assets.
Post-Installation
After installing and enabling the module:
- Go to Configuration → Text formats and editors (
/admin/config/content/formats). - Edit the text format(s) where you want this feature available (usually "Full HTML" or a custom format that uses CKEditor 5).
- In the CKEditor 5 plugin settings section, find "Media Image Title Override".
- Check the box "Enable media image title override" and save the text format.
Once enabled:
- When editing content, insert or select an embedded media entity (via the Media button or Embed filter).
- A new button with a "T" icon will appear in the media's inline toolbar.
- Click it to open the override form, enter your custom title (or leave blank), and save.
No new content types, permissions, or additional configuration pages are created – everything is managed per text format.
Special consideration: The feature only works in text formats that use the Media Embed filter and CKEditor 5 as the editor.
Additional Requirements
- Drupal core 10 or 11
- CKEditor 5 (included in Drupal core)
- Media module (core)
- A text format using the Media Embed filter and CKEditor 5 as the editor
No external libraries or APIs are required.
Recommended modules/libraries
- Entity Embed + Embed module – if you also embed other entity types and want consistent behavior.
- Media Library – improves the overall media insertion experience in CKEditor 5.
- CKEditor 5 Premium Features or other CKEditor enhancements – work seamlessly alongside this module.
Similar projects
There are currently no other contributed modules that provide this exact functionality (in-editor per-instance title override for embedded media in CKEditor 5). Some older Drupal 8/9 modules offered caption or alt-text overrides for specific embed scenarios, but they are either incompatible with CKEditor 5 or modify different attributes. This module is specifically built for the modern CKEditor 5 + Drupal Media integration.
Supporting this Module
- Check out our sponsor, Dom Host Seo, who made this module possible with their support!
Community Documentation
This module is lightweight, focused, and fully integrated with Drupal’s CKEditor 5 architecture – perfect for sites that need fine-grained control over embedded media accessibility and tooltips.