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

Add data attributes for footnotes #234

Merged
merged 1 commit into from
Sep 16, 2021
Merged

Conversation

talum
Copy link

@talum talum commented Sep 14, 2021

Add data attributes for easier styling within dotcom. Also, add the aria-label for accessibility.

Previously, I had added an <h2> to denote a Footnotes header that could be hidden and was for screenreaders only. We decided we don't need that here. And since we aren't including that here, I dropped the aria-describedby as well. We'll add those elements to make our rendering more accessible elsewhere.

Replaces #233

@talum talum self-assigned this Sep 14, 2021
@talum talum force-pushed the add-attributes-to-footnotes branch 4 times, most recently from e53e483 to 424136d Compare September 14, 2021 16:26
@talum talum requested a review from phillmv September 14, 2021 16:32
Add data attributes for easier styling within dotcom. Also, add the aria-label for accessibility.
@phillmv phillmv changed the base branch from fix-footnotes-plus-fix-fnref-label-and-backrefs to master September 16, 2021 16:23
Copy link
Member

@phillmv phillmv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, only static strings were changed, tests pass, straightforward!

@phillmv phillmv merged commit 9eb8858 into master Sep 16, 2021
@phillmv phillmv deleted the add-attributes-to-footnotes branch September 16, 2021 20:22
@wooorm
Copy link

wooorm commented Oct 1, 2021

This commit seems to add a data-footnote-backref attribute, next to the existing class="footnote-backref". But the generated HTML on github.com seems to indicate:

<a href="..." data-footnote-backref="" class="data-footnote-backref" aria-label="Back to content">

Perhaps a bug somewhere? I’m guessing the output should be as follows:

-<a href="..." data-footnote-backref="" class="data-footnote-backref" aria-label="Back to content">
+<a href="..." data-footnote-backref="" class="footnote-backref" aria-label="Back to content">

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.

4 participants