Skip to content

Consistent image titles on mouseover

The information that appears when moving the mouse pointer over an image has been standardized. This still meets the accessibility requirements and the necessary display of copyright details.

In OpenCms, a title and a description can be stored for an image. Both pieces of information serve different purposes. The description is primarily used as alternative text so that, for example, screen readers can convey the content of the image. If no description is available, the image title is used instead.

For purely decorative images, the alternative text remains empty. This allows screen readers to recognize that the image does not contain any content-relevant information.

Neonlicht mit dem Schriftzug 'Pop' in Rot-Gelb auf einer bunten Glasscheibe. Neonlicht mit dem Schriftzug 'Pop' in Rot-Gelb auf einer bunten Glasscheibe.

An image can display text when the mouse pointer is moved over it. This so-called tooltip was previously not generated consistently across all content types. In some cases, the image title appeared, while in other elements the alternative image description was shown.

Mercury now prefers the image title stored in OpenCms for this tooltip. If no image title is available, the description continues to be used. This ensures that the expected title of the image is displayed uniformly during mouseover.

If a copyright is stored, it is displayed either directly on the image or in the tooltip. This is particularly relevant when the element setting "Show image copyright" suppresses the visible output on the page. In this case, the copyright notice is appended to the tooltip, unless its output has been explicitly disabled.

Note: If the alt text and tooltip are identical, the additional tooltip is omitted. This avoids unnecessary repetitions.

Porträt eines Mannes mittleren Alters mit kurzen grauen Haaren, schwarzer Brille und kleinem Kinnbart vor hellgrauem Hintergrund. Porträt eines Mannes mittleren Alters mit kurzen grauen Haaren, schwarzer Brille und kleinem Kinnbart vor hellgrauem Hintergrund.

Dr. Max Mitte Mustermann Sen.

Head of Support Department
OpenCms Support
An der Wachsfabrik 13
Building Krämer 2nd floor
50996 Köln
NRW DE
Beispiel für eine Person, ausgegeben mit dem Formatter "Person Detailansicht".