User tests: Successful: Unsuccessful:
small and strong are no longer presentational elements and should not be used in this context. They are emphatic elements used to 'voice' to elements and should not be used for stylistic purposes.
If we want to make things smaller or larger that should be done with css.
As I removed strong the additional <br/ is no longer needed, as a div is a block level element.
I did a quick search and found some inappropriate strongs and smalls in other components too, added a couple more commits to include these.
Whilst I agree with the change, there are impacts. I'm thinking it would be good to also include the corresponding css changes in the shipped templates. Are you able to indicate whether the is a recently introduced problem, or whether its in the current lts?
Hi Peter,
Thanks for taking a look at this. I can totally see where you are coming from, but I think these are simply omissions. If I recall correctly, there were many other such instances of bad markup like this in more ‘popular’ component views, e.g. com_content which were removed by @elinw some time around 3 alpha/beta.
It's worth noting also that the classes assigned to these items correctly share an class with items in other views, .createdby for example, so styling these in isolation would be undesirable as it would either affect all other selectors in use, or involve undesirable levels of specificity.
If I wanted to style .createdby in components/com_content/views/archive/tmpl/default_items.php, for example, to make it smaller it would either affect all other views in com_content or I would have to force styling with #archive-items .createdby {}. The second option makes a non-sense of using the .createdby class in the first place. If we don't want it to look like the .createdby in every other view it shouldn't be using that class.
I could of course style all these elements in css to ensure there were no visual changes, but I don't believe that is the correct thing to do.
As I say, I believe @elinw may have already made a number of these fixes so hopefully she can shed some light, and provide guidance here too.
Forgot to mention, these elements do not appear in the current LTS, and while I don't find the markup in earlier versions to be optimal (IMO) it is certainly not strictly incorrect either.
Patch: https://github.com/joomla/joomla-cms/pull/1079.diff
Result: Success
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30777