[xwiki-contrib/documentation] df223c: OP#126: {{image}} macro declares an "alt" paramete...
Branch: refs/heads/op126 Home: https://github.com/xwiki-contrib/documentation Commit: df223c4fe7dd32fa1b63ad8eecd0b9b7ff602ed4 https://github.com/xwiki-contrib/documentation/commit/df223c4fe7dd32fa1b63ad... Author: Vincent Massol <[email protected]> Date: 2026-09-04 (Fri, 04 Sep 2026) Changed paths: M documentation-test/documentation-test-docker/src/test/it/org/xwiki/contrib/documentation/test/docker/DocumentationIT.java M documentation-test/documentation-test-pageobjects/src/main/java/org/xwiki/contrib/documentation/test/po/DocumentationViewPage.java M documentation-ui/src/main/resources/DocApp/Code/ImageMacro.xml Log Message: ----------- OP#126: {{image}} macro declares an "alt" parameter but never uses it — rendered images fall back to file name (WCAG 2.2 SC 1.1.1) * The Image macro now passes its declared "alt" parameter on to the image syntax it generates. It is escaped for the generated syntax with $services.rendering.escape: the alt text becomes a quoted image parameter, so an unescaped double quote or closing square bracket in it would end that parameter and silently truncate the text. * An absent or empty alt emits no parameter at all, so nothing changes for a page that sets none (the renderer keeps falling back to the file name, which ImageMacroAltCheck already reports). * DocumentationIT gains a regression guard on the rendered alt attribute, its fixture carrying both characters that need escaping, and DocumentationViewPage a getContentImageAlt() accessor. * Verified: documentation-ui builds (xar:format/xar:verify clean) and DocumentationIT is 9/9 green; reverting only the macro makes the new test fail with alt "foo.png", which is the reported bug. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki-contrib/documentation/settings/notifications
participants (1)
-
XWiki Notifications