From 402d7fc1e7cbda4ce5fe5f05793caded72c30de2 Mon Sep 17 00:00:00 2001 From: Lauri Eskola Date: Wed, 7 Sep 2022 10:09:29 +0300 Subject: [PATCH] Issue #3280343 by bnjmnm, pooja saraah, Wim Leers: Audit of CKEditor 5 @todo items (cherry picked from commit 3f094e0c29665850c4782e0938469e682d53c709) --- core/modules/ckeditor5/ckeditor5.module | 6 ++---- .../src/drupallinkmedia/drupallinkmediaediting.js | 2 +- core/modules/ckeditor5/src/SmartDefaultSettings.php | 2 +- .../tests/src/FunctionalJavascript/MediaTest.php | 12 +++++------- .../src/FunctionalJavascript/SourceEditingTest.php | 2 +- .../tests/src/Kernel/SmartDefaultSettingsTest.php | 2 -- .../tests/src/Unit/HTMLRestrictionsTest.php | 2 -- 7 files changed, 10 insertions(+), 18 deletions(-) diff --git a/core/modules/ckeditor5/ckeditor5.module b/core/modules/ckeditor5/ckeditor5.module index c292f015129..b968d9c8675 100644 --- a/core/modules/ckeditor5/ckeditor5.module +++ b/core/modules/ckeditor5/ckeditor5.module @@ -50,10 +50,8 @@ function ckeditor5_help($route_name, RouteMatchInterface $route_match) { $output .= '
' . t('Generating accessible content') . '
'; $output .= '
'; $output .= ''; diff --git a/core/modules/ckeditor5/js/ckeditor5_plugins/drupalMedia/src/drupallinkmedia/drupallinkmediaediting.js b/core/modules/ckeditor5/js/ckeditor5_plugins/drupalMedia/src/drupallinkmedia/drupallinkmediaediting.js index 04432fe8603..658e6ee66b9 100644 --- a/core/modules/ckeditor5/js/ckeditor5_plugins/drupalMedia/src/drupallinkmedia/drupallinkmediaediting.js +++ b/core/modules/ckeditor5/js/ckeditor5_plugins/drupalMedia/src/drupallinkmedia/drupallinkmediaediting.js @@ -160,7 +160,7 @@ function editingDowncastMediaLink() { // element which makes caused re-render of the media preview, making // the media preview flicker once when media is unlinked. // @todo ensure that this doesn't cause flickering after - // https://www.drupal.org/i/3246380 has been addressed. + // https://www.drupal.org/i/3304834 has been addressed. writer.move( writer.createRangeIn(linkInMedia), writer.createPositionAt(mediaContainer, 0), diff --git a/core/modules/ckeditor5/src/SmartDefaultSettings.php b/core/modules/ckeditor5/src/SmartDefaultSettings.php index f4fc33d0c38..e8bf8fa8309 100644 --- a/core/modules/ckeditor5/src/SmartDefaultSettings.php +++ b/core/modules/ckeditor5/src/SmartDefaultSettings.php @@ -122,7 +122,7 @@ final class SmartDefaultSettings { // Overwrite the Editor config entity object's $filterFormat property, to // prevent calls to Editor::hasAssociatedFilterFormat() and // Editor::getFilterFormat() from loading the FilterFormat from storage. - // @todo Remove in https://www.drupal.org/project/ckeditor5/issues/3218985. + // @todo Remove in https://www.drupal.org/project/ckeditor5/issues/3231347. $reflector = new \ReflectionObject($text_editor); $property = $reflector->getProperty('filterFormat'); $property->setAccessible(TRUE); diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php index d9b54fb41f7..6582a2e19bc 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php @@ -737,16 +737,14 @@ class MediaTest extends WebDriverTestBase { // Test that setting alt value to two double quotes will signal to the // MediaEmbed filter to unset the attribute on the media image field. - // We intentionally add a space space after the two double quotes to test - // the string is trimmed to two quotes. + // We intentionally add a space after the two double quotes to test that the + // string is trimmed to two quotes. $alt_override_input->setValue('"" '); $this->getBalloonButton('Save')->click(); // Verify that the two double quote empty alt indicator ('""') set in - // the dialog has successfully resulted in a media image field with the - // alt attribute present but without a value. - // @todo Uncomment this in https://www.drupal.org/project/ckeditor5/issues/3206522. - // @codingStandardsIgnoreLine -// $this->assertNotEmpty($assert_session->waitForElementVisible('css', 'drupal-media img[alt=""]')); + // the alt text form balloon has successfully resulted in a media image + // field with the alt attribute present but without a value. + $this->assertNotEmpty($assert_session->waitForElementVisible('css', '[data-media-embed-test-view-mode] img[alt=""]')); // Test that the downcast drupal-media element's alt attribute now has the // empty string indicator. diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php index db3d25864ed..d93a756d6d3 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php @@ -320,7 +320,7 @@ JS; ], // Edge case: `style`. - // @todo https://www.drupal.org/project/drupal/issues/3260857 + // @todo https://www.drupal.org/project/drupal/issues/3304832 // Edge case: `type` attribute on lists. // @todo Remove in https://www.drupal.org/project/drupal/issues/3274635. diff --git a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php index 8557a5d25df..5a3ec0bd614 100644 --- a/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php +++ b/core/modules/ckeditor5/tests/src/Kernel/SmartDefaultSettingsTest.php @@ -74,8 +74,6 @@ class SmartDefaultSettingsTest extends KernelTestBase { 'media', 'media_library', 'views', - // @todo Remove in https://www.drupal.org/project/drupal/issues/3263384 - 'ckeditor5_plugin_conditions_test', 'dblog', 'help', ]; diff --git a/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php b/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php index 41179261df8..2dea410170a 100644 --- a/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php +++ b/core/modules/ckeditor5/tests/src/Unit/HTMLRestrictionsTest.php @@ -125,8 +125,6 @@ class HTMLRestrictionsTest extends UnitTestCase { ['*' => ['foo' => ['a' => TRUE, 'b' => TRUE]]], NULL, ]; - // @todo Nothing in Drupal core uses this ability, and no custom/contrib - // module is known to use this. Therefore this is left for the future. yield 'VALID BUT NOT YET SUPPORTED: global attribute tag with attribute allowed, specific attribute values forbidden' => [ ['*' => ['foo' => ['a' => FALSE, 'b' => FALSE]]], 'The "*" HTML tag has attribute restriction "foo", but it is not an array of key-value pairs, with HTML tag attribute values as keys and TRUE as values.',