? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
7 Jan 2022

Pull Request for pr #27712.

Summary of Changes

The accessible media form field doesn't support the class property. This pr fixes it.

Testing Instructions

  • Create a media custom field
  • In the options of the field set the "Field Class" attribute to testclass
  • Save the field
  • Edit an article
  • Inspect the joomla-field-media element of the custom field in the dev tools of the browser

Actual result BEFORE applying this Pull Request

No testclass is added to the element.

Expected result AFTER applying this Pull Request

testclass is added to the element.

avatar laoneo laoneo - open - 7 Jan 2022
avatar laoneo laoneo - change - 7 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Jan 2022
Category Layout Libraries
avatar laoneo
laoneo - comment - 7 Jan 2022

@astridx can you have a look here if all is correct?

8c9e506 7 Jan 2022 avatar laoneo cs
avatar laoneo laoneo - change - 7 Jan 2022
Labels Added: ?
avatar alikon
alikon - comment - 9 Jan 2022

I have tested this item successfully on e4f4e2d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36593.

avatar alikon alikon - test_item - 9 Jan 2022 - Tested successfully
avatar BPBlueprint
BPBlueprint - comment - 10 Jan 2022

I have tested this item successfully on 87ab096

Tested successfully.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36593.

avatar BPBlueprint BPBlueprint - test_item - 10 Jan 2022 - Tested successfully
avatar alikon alikon - alter_testresult - 10 Jan 2022 - alikon: Tested successfully
avatar alikon alikon - change - 10 Jan 2022
Status Pending Ready to Commit
avatar alikon
alikon - comment - 10 Jan 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36593.

avatar laoneo laoneo - change - 22 Jan 2022
Labels Added: ?
avatar wilsonge
wilsonge - comment - 23 Jan 2022

This looks kinda weird because the class is already being set on the input element within the custom form field. Does it really make sense to have it in both places?

avatar laoneo
laoneo - comment - 24 Jan 2022

Did you actually test it? The class is not set, as it is not passed into the subform group. It is not rendered at all in any of the elements.

avatar wilsonge
wilsonge - comment - 28 Jan 2022

Yes I understand that the FormField layout is clearly correct. I'm asking specifically about the JLayout change as the class is also used here https://github.com/joomla/joomla-cms/pull/36593/files#diff-ffc48fe23d772f6461955e77801148ec01945822ae6574126b6cece7f7bccd26R54 and you're now adding it again on the custom element.

avatar laoneo
laoneo - comment - 29 Jan 2022

The class is only added to the custom element and nowhere else. The class is delegated to the element from the Formfield but never used there as you can see here https://github.com/joomla/joomla-cms/blob/4.1-dev/layouts/joomla/form/field/media/accessiblemedia.php. So where should then the class being used in your opinion?

avatar laoneo laoneo - change - 31 Jan 2022
Labels Added: ?
Removed: ?
avatar richard67 richard67 - change - 31 Jan 2022
Title
[4.0] Support class attribute in media custom field
[4.1] Support class attribute in media custom field
avatar richard67 richard67 - edited - 31 Jan 2022
avatar laoneo laoneo - change - 23 Feb 2022
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2022-02-23 05:00:14
Closed_By laoneo
avatar laoneo
laoneo - comment - 23 Feb 2022

Made another test and indeed you are right, the class is used on the input. So it would be wrong to render it two times.

avatar laoneo laoneo - close - 23 Feb 2022

Add a Comment

Login with GitHub to post a comment