Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
ckeditor5.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2022 at 17:38 UTC
Updated:
16 Sep 2022 at 13:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersComment #3
wim leersThis is irrelevant because:
\Drupal\media\Form\EditorMediaDialog.ckeditor5_drupalMediaCaptionCKE5 plugin literally only loads if thefilter_captionfilter is enabled, same formedia_mediaAlignandfilter_align.… the one exception is … that the
alt_fieldsetting on "image" media is not respected yet 😬☹️ That's this piece of the CKE4 test coverage:Even if one disables that (for example, for purely decorative images that do not need descriptions, however farfetched that might be), CKE5 will continue to show the alt override UI in its media toolbar.
So … converting this task into a bug 😬
Comment #4
wim leersHere's a test.
Comment #5
wim leersAnd here's the fix.
Comment #7
bnjmnmMost of the feedback I thought I was going to provide was addressed by remembering that
\Drupal\Tests\ckeditor5\FunctionalJavascript\MediaTest::testAltalready does what I wanted done (it's just not in the patch because it already exists).What remains is just doc nits:
May be clearer to move the comment above the conditional and make it cooperate with the
if()such as "Check if the alt field is enabled"s/Tests the/Tests that the
(this bumps it over the char limit, so it'll probably require something additional)
Comment #8
wim leersComment #9
wim leersWhat do you think?
Comment #10
bnjmnmThat looks good to me!
Comment #15
lauriiiI like this fix! 🤩
Committed 76486e0 and pushed to 10.1.x. Also cherry-picked to 10.0.x, 9.5.x, and 9.4.x. Thanks!