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

"Skip to content" should have an ID #643

Closed
philliproth opened this issue Oct 28, 2024 · 4 comments
Closed

"Skip to content" should have an ID #643

philliproth opened this issue Oct 28, 2024 · 4 comments

Comments

@philliproth
Copy link

For accessibility it would be nice to have a "skip to content" link with an ID. This way if a "back to top" link is implemented in any way it can target the button and the very top of the page. "#" or "#top" usually works in every browser visually, but nothing would get focus.

Simply add an id="skip-link".

@carolinan
Copy link
Contributor

Hi
Skip to content links in block themes targets the ID #wp--skip-link--target. This ID is added to the <main> element and this is a built-in functionality in WordPress core, it is not specific to this theme.

@philliproth
Copy link
Author

Ah wrong repo then. And I meant the other way around: when one wants to target the top of the page. Closing, I'll open an issue in core. Thank you!

@carolinan
Copy link
Contributor

Please see WordPress/gutenberg#50433 I actually built this for Gutenberg, but people downvoted it because they did not see the need for this block to be in core.

@philliproth
Copy link
Author

While I like the idea of such a block (would definitely use it often!) it would not solve the issue that it needs a focusable target.

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