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

Docs. CSS. Make section links accessible. #9

Closed
stewdio opened this issue Jun 26, 2019 · 1 comment
Closed

Docs. CSS. Make section links accessible. #9

stewdio opened this issue Jun 26, 2019 · 1 comment

Comments

@stewdio
Copy link
Owner

stewdio commented Jun 26, 2019

Match h3 and h4 tags that have id attributes and place a “section” icon in the left gutter that is a hyperlink to that heading. This will make it easy to bookmark or copy the link for pasting elsewhere.

@stewdio
Copy link
Owner Author

stewdio commented Apr 16, 2020

This was solved many moons ago. Instead of a “section” icon (§) on the left gutter, this now exists as a “hash” icon (#) on the right gutter edge. All h2, h3, and h4 tags within main are processed—if they do not contain an explicit id attribute one is automatically generated and applied based on its innerText content. Then an anchor hyperlink is generated for the gutter edge; for the user to either click on or copy the URL from. This is done in other/navigation.js: https://github.com/stewdio/q.js/blob/master/other/navigation.js#L253-L269

@stewdio stewdio closed this as completed Apr 16, 2020
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

No branches or pull requests

1 participant