Wrap cite tag with footer in Quote and Pullquote blocks #10465
Closed
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.
Description
Previously #9804.
This PR changes the Quote and Pullquote blocks to wrap their
<cite>
s with<footer>
s. The reason for this is that<cite>
tags can be used within a quote but not be the citation of a quote, e.g. using a<cite>
element to refer to a book or ship. The use of a<footer>
improves the semantics to show that the contained<cite>
is the citation of the entire<blockquote>
, and makes it easier for themes to style inline<cite>
s differently from the one in the<footer>
.In the editor, the RichText field for the citation is a
<footer>
element, where previously it was a<div>
due to #8785 and before that it was a<cite>
.How has this been tested?
I have tested to make sure that old Quote and Pullquote blocks are automatically converted properly. Some errors appear in the JavaScript console the first time a post is opened containing the deprecated forms of the blocks, but I am guessing that is due to the deprecated forms not matching the other even older deprecated forms before matching the last one in the list. The content is preserved and automatically converted as expected and no blocks are made invalid. After saving, no errors appear in the JavaScript console.
(I would say that the failed matches of deprecated forms should not be called out in the JavaScript console as errors, but I am not sure of the history of this functionality or how it works, and that is out-of-scope for this PR anyway.)
Additional info