I have come across a bug when adding some content to news item page.
It looks like Matrix pumps in ‘p’ tags by default in the body WYSIWYG Content Container.
Unfortunately, it fails basic html validation, and also we get marked on accessibility…
Any idea if the bug’s on ‘fix me’ bucket list and/or timescale?..
Interesting issue you have there. Try (not ideal though as you shouldn’t see empty or nested p tags ) adding a paint layout to your news items. In the default format add:
Thanks for a message. You are right, I am not sure about paint layouts there but certainly can have a crack on it…
Having said that, it looks to me like a bug. And it would be nice to have it fixed… I have also noticed Matrix pumps in a lot of unnecessary tags in different areas especially when editors add content in WYSIWYG… It seems like nothing but then when I have to run my Accessibility checks I end up with 1000+ pages and random tags all over the place e.g. type = ‘disc’ on ul (etc.)
Given that body will always be the result of a WYSIWYG area, it doesn’t make sense to wrap it in a <p> tag.
NickyP is right that a type customisation for the paint layout will let you work around it. A paint layout to replicate the default behaviour but without the p tag issues around body and summary would be roughly:
OK - I get the point. If that is a case, we will move away from news items, I guess . Also, it looks to me that creating a new and dedicated micro site hosting council’s news and public updates (in standard pages) is way forward for us.
Hi guys I am new here but have recently experienced same issue with double para tags.
So to fix that I just created a new paint layout and assigned it to my news item.
code example i used below, hope it helps someone else.