Description
Current images inserted in HTML Fields, when provided with a caption, are wrapped in a <div> and the text rendered in a <p>. More accessible options are available in the form of <figure> and <figcaption> elements. The current config automatically strips these elements out, so I've submitted a config change to allow them.
These newer elements provide a semantic link to eachother, which provides additional support for screen readers and more context for SEO.
PRs
Additional context or points of discussion
This goes along with an additional change submitted to the silverstripe-htmleditor-tinymce module found here, which includes opt-in changes to allow for automatically wrapping images in the new elements.
Validations
Description
Current images inserted in HTML Fields, when provided with a caption, are wrapped in a
<div>and the text rendered in a<p>. More accessible options are available in the form of<figure>and<figcaption>elements. The current config automatically strips these elements out, so I've submitted a config change to allow them.These newer elements provide a semantic link to eachother, which provides additional support for screen readers and more context for SEO.
PRs
Additional context or points of discussion
This goes along with an additional change submitted to the silverstripe-htmleditor-tinymce module found here, which includes opt-in changes to allow for automatically wrapping images in the new elements.
Validations