From 1547e9fbca8e0cd94bfccf1f5510206efc34bc3c Mon Sep 17 00:00:00 2001 From: Sereza7 Date: Fri, 12 Jan 2024 18:08:38 +0100 Subject: [PATCH 1/3] XWIKI-21773: Admin section: make the WYSIWYG section pass webstandard tests * Fixed the input labels Note: This change successfully passes webstandards for section=WYSIWYG. It's not the same fix as XWIKI-21523 because we can't rely on javascript enhancements of the form, and we need to provide the label for the input that gets hidden by javascript. --- .../src/main/resources/CKEditor/VelocityMacros.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/VelocityMacros.xml b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/VelocityMacros.xml index d934fdae1974..0128cbe10d00 100644 --- a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/VelocityMacros.xml +++ b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/VelocityMacros.xml @@ -218,7 +218,7 @@ #macro (displayCKEditorConfigProperty $configDoc $propName $action) <dt> - <label>$configDoc.displayPrettyName($propName)</label> + <label for="CKEditor.ConfigClass_0_${propName}">$configDoc.displayPrettyName($propName)</label> <span class="xHint">$escapetool.xml($services.localization.render("CKEditor.ConfigClass_${propName}.hint"))</span> </dt> <dd>#displayCKEditorConfigPropertyValue($configDoc $propName $action)</dd> From 849e535b4bc8949b04ceb1ebdcbbf449835936de Mon Sep 17 00:00:00 2001 From: Sereza7 Date: Tue, 16 Jan 2024 10:57:26 +0100 Subject: [PATCH 2/3] XWIKI-21773: Admin section: make the WYSIWYG section pass webstandard tests * Removed the comment from the test for WYSIWYG --- .../xwiki-platform-distribution-flavor-test/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/pom.xml b/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/pom.xml index f5a55a5f66c5..08a45b324857 100644 --- a/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/pom.xml +++ b/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/pom.xml @@ -284,8 +284,7 @@ /xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Delete /xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Editing - + /xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=WYSIWYG /xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Syntaxes From aaf80f38c062f74905cf2dce9cd0f0132255bfd3 Mon Sep 17 00:00:00 2001 From: Lucas C Date: Mon, 12 Feb 2024 15:43:47 +0100 Subject: [PATCH 3/3] XWIKI-21773: Admin section: make the WYSIWYG section pass webstandard tests * Replaced the hard coded number value with a more robust computed one. --- .../src/main/resources/CKEditor/VelocityMacros.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/VelocityMacros.xml b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/VelocityMacros.xml index 0128cbe10d00..b88229697122 100644 --- a/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/VelocityMacros.xml +++ b/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-ui/src/main/resources/CKEditor/VelocityMacros.xml @@ -218,7 +218,7 @@ #macro (displayCKEditorConfigProperty $configDoc $propName $action) <dt> - <label for="CKEditor.ConfigClass_0_${propName}">$configDoc.displayPrettyName($propName)</label> + <label for="CKEditor.ConfigClass_$escapetool.xml($configDoc.getObject("CKEditor.ConfigClass").getNumber())_${propName}">$configDoc.displayPrettyName($propName)</label> <span class="xHint">$escapetool.xml($services.localization.render("CKEditor.ConfigClass_${propName}.hint"))</span> </dt> <dd>#displayCKEditorConfigPropertyValue($configDoc $propName $action)</dd>