Adjust footnote markup to accommodate multiple references #198
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.
This is a follow up on the original work done for footnote accessibility here #192
The Problem
The original PR had replaced the footnote arrow "back link" with the words "go to where this is referenced" like so:
This was done with the aim of making those links clearer to both sighted and non-sighted users.
However as we were testing the original PR, we discovered an edge case where the solution that was implemented does not work.
The edge case appears when footnotes are referenced multiple times in the body of the publication, and therefore contain multiple numbered "back links", as can be seen here.
Multiple numbered back arrow links
With the changes introduced in #192, a footnote that is referenced multiple times would look like this, which is obviously an issue:
The Solution
Publishers should ideally not be using footnotes as they are not great on the web.
In the meanwhile, we're implementing a middle ground solution. This reverts the footnote "back link" to using the arrow, with the adjustment that the back link will have an
aria-label
of "go to where this is referenced" or "go to where this is referenced 2,3,4... i" when there's more than one reference. This should help AT users navigate this area, while keeping it fairly terse and understandable for sighted users.https://trello.com/c/SJyttlVo