Fix footnotes semantic organization for accessibility #2890
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.
Footnotes are currently excluded in certain accessibility tools such as Firefox Reader View. This is because footnotes are nested underneath an HTML5
footer
element, which permits the accessibility tool to discard the contents as irrelevant to the current section text under consideration.Semantically, the
footer
element represents metainformation for its nearest ancestor sectioning content (e.g. publication timestamps, related links, authorship copyright, etc.). It's incorrect to place footnotes underneath thefooter
element because, while footnotes may be thematically distinct from the main content, they are considered semantically part of that content. Footnotes are merely a different section of content: their role is that of content supplementation, not metainformation.In order to properly indicate the semantic relationship between the main content and its footnotes, the footnotes should be nested underneath a
section
element which adequately communicates this relationship. This isn't just speculation, but is in fact the exact way the WHATWG HTML5 specification document recommends implementing the footnotes with reciprocal backlinks idiom.To that end, this patch changes the footnotes
footer
element to asection
element. Theclass="footnotes"
attribute remains the same so that user stylesheets may not be affected by this bug fix:Test snapshots are also updated to reflect the adjustment.
Fixes: c4a84a8 ("Improve accessibility by nesting bottom footnotes inside footer element (#2688)")
Link: #2688
IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.
The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
next
branch?If the change is a new feature or adding to/changing an existing one: