Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve accessibility by nesting bottom footnotes inside a footer element #2688

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

vilhelmgray
Copy link

This adds semantic meaning to the footnotes organization and improves accessibility by aiding disabled users who rely on assistive devices such as screen readers which utilize semantic tags such as the footer element in order to navigate properly.

The hr element is semantically defined as representing a paragraph-level thematic break. Now that the footnotes are descendants of the footer element, the hr element originally preceding the footnotes list is no longer necessary (footnotes are no longer paragraph-level content) and thus replaced. However, the footer element is given the class "footnotes" to allow for styling, so the following CSS could be used to provide a stylistically equivalent visible border separating the footnotes from the content if so desired:

    .footnotes {
      border-top: 2px groove gray;
    }

Zola Discourse link: https://zola.discourse.group/t/improve-accessibility-by-nesting-bottom-footnotes-inside-a-footer-element/2356

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

  • Are you doing the PR on the next branch?

  • Have you created/updated the relevant documentation page(s)?

This update does not require any interaction from the user to make use of it. However, if would be helpful, I could make a documentation change to mention the visible border CSS suggestion to users.

@vilhelmgray vilhelmgray force-pushed the next branch 3 times, most recently from 177c9ff to f32cbf0 Compare November 6, 2024 01:48
This adds semantic meaning to the footnotes organization and improves
accessibility by aiding disabled users who rely on assistive devices
such as screen readers which utilize semantic tags such as the footer
element in order to navigate properly.

The hr element is semantically defined as representing a paragraph-level
thematic break. Now that the footnotes are descendants of the footer
element, the hr element originally preceding the footnotes list is
no longer necessary (footnotes are no longer paragraph-level content)
and thus replaced. However, the footer element is given the class
"footnotes" to allow for styling, so the following CSS could be used to
provide a stylistically equivalent visible border separating the
footnotes from the content if so desired:

    .footnotes {
      border-top: 2px groove gray;
    }

Test snapshots are also updated to reflect the new footer elements.
@Keats Keats merged commit ab0ad33 into getzola:next Nov 6, 2024
5 checks passed
@Keats
Copy link
Collaborator

Keats commented Nov 6, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants