I hope someone can let me know if my current solution to an accessibility 'problem' is good.
I'm trying to setup the content-type of my pages to make the following possible:
I want to render content that has a title and multiple (theoretically unlimited) paragraphs. Each paragraph should have an optional title and obligatory content. To adhere to accessibility guidelines (SEO -wise) I need to render the heading/title of a paragraph as an HTML header (e.g. h2 or h3). Also I do not want to let the user deal with the complexity of HTML headers.
I cannot create a content-type with only 1 body, because then for each paragraph a user would have to manually type those HTML headers above each paragraph.
For my current solution I found the "field collection" module with which I created a collection-field named "paragraph" that has a title and body, then added this collection-field to my content type and allowed it to have an unlimited amount of paragraphs.
I *think* that I should be able to render these paragraphs in a custom theme with a h2 now (I haven't created a theme yet, so I am unsure of this).
I am wondering if this is this the way to go.
Are there better ways to deal with this, perhaps other modules or configurations I should take a look at?
I would appreciate if someone give me some feedback on this and/or nudge me towards information/documentation for better or alternative solutions.
I am just starting with Drupal, so please ... be gentle :).