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

RFC: Option to make footnotes and footnote backlinks accessible #692

Closed
stevenjmesser opened this issue Nov 5, 2020 · 4 comments · May be fixed by #774
Closed

RFC: Option to make footnotes and footnote backlinks accessible #692

stevenjmesser opened this issue Nov 5, 2020 · 4 comments · May be fixed by #774
Assignees

Comments

@stevenjmesser
Copy link

stevenjmesser commented Nov 5, 2020

Documents published on GOV.UK are authored in Markdown, and it was recently discovered that footnotes and footnote backlinks are not handled well by screen readers used by user with accessible needs.

To fix this, the Accessibility team on GOV.UK changed the way footnotes are handled. There's more details in these pull requests: alphagov/govspeak#192 and alphagov/govspeak#198

I'm raising this issue to see how others feel about adopting a similar change into Kramdown (or making it optional) in order to make thousands of blogs and websites more accessible to people using screen readers.

Thanks in advance for your comments!

@stevenjmesser
Copy link
Author

I've raised #693.

@gettalong gettalong self-assigned this Nov 10, 2020
@gettalong
Copy link
Owner

Thanks for the issue and the pull request!

I get what you want to accomplish with the issue and pull request. If the resulting HTML still validates, it would be okay for me.

However, I can't accept the current implementation since it is language dependent, i.e. the contents of the label are in English which is not suitable in a general case. If there is a language agnostic solution, I will have a more in-depth look at everything.

@BryceStevenWilley
Copy link

I would also love something like this, have been trying to make my blog more accessible. I'm not sure there's a good language agnostic solution however, as the main issue is the fact that numbers and backlinks don't have enough information for context.

The linked issues are specifically changing the footnote link text, not adding an aria-label. IMO that's a better accessibility fix, as it also helps sighted users. The ability to do this exists in kramdown now: I was able to change the back links to match the linked issue by using the footnote_backlink option (added this to my jekyll _config.yml:

kramdown:
  footnote_backlink: "[go to where this is referenced]"

However, there's not an equivalent option for changing the link text. footnote_prefix seems like it should, but it only adds to the id of the elements. I might try to extend #693 to add another option, footnote_link_text, to be text that's added in front of the number in the footnote (maybe an sprint-able string, so you could do things like [footnote 1]), and open a PR soon.

@stevenjmesser
Copy link
Author

Seemingly addressed in #773

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 a pull request may close this issue.

3 participants