ensures quick fact content is inside a <p> tag #617
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #607
What does this change?
Our template "nearly" puts the text of a quick fact into
p
tags, but since we render{{ content.localgov_fact }}
the render array produces adiv
which in turn means we render an emptyp
tag followed by the content.This PR sorts that so that we render
{{ content.localgov_fact.value }}
instead so it goes inside thep
tag.How to test
Visit https://localgov.ddev.site/adult-health-and-social-care/another-service-landing-page/service-page and check that the content in the fact box is inside a
p
tag.Accessibility
The original issue says "Key information is styled in a way that suggests importance but does not use appropriate semantic elements to convey its meaning.".
However, I am not sure what semantic elements to use except
p
for these elements. It's not clear in all circumstances (so we could make this generic) if any of the constituent parts should be headings or something else.Thanks to Big Blue Door for sponsoring my time to work on this.