Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Add hidden descriptive text to links for a11y and SEO #149

Open
ramboz opened this issue Apr 17, 2023 · 0 comments
Open

Add hidden descriptive text to links for a11y and SEO #149

ramboz opened this issue Apr 17, 2023 · 0 comments
Assignees

Comments

@ramboz
Copy link
Collaborator

ramboz commented Apr 17, 2023

Delta is using .sr-only visually hidden text to improve accessibility and SEO on some links. We need a way to replicate this in Franklin.

Image

Technical proposal

  1. Let author add […] as part of the link text
  2. Client-side, we then go through all the links in the main content, and if the textContent contains both [ followed by ], when then do a regex replace on the innerHTML with <span class="sr-only">…</span>.

Image

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

No branches or pull requests

2 participants