Skip to content

Fix links without href #139

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lydell
Copy link

@lydell lydell commented Jun 1, 2025

Closes elm/browser#34, closes elm/browser#55, closes elm/browser#64, closes elm/virtual-dom#142.

<a> elements without href aren’t clickable in plain HTML. However, in Browser.application programs, clicking them still produces a message.

The href attribute on a and area elements is not required; when those elements do not have href attributes they do not create hyperlinks.

https://html.spec.whatwg.org/multipage/links.html#links-created-by-a-and-area-elements

If the a element has no href attribute, then the element represents a placeholder for where a link might otherwise have been placed, if it had been relevant, consisting of just the element's contents.

https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element

Note to those following along: This PR is included in https://github.com/lydell/browser/tree/safe, which is part of https://github.com/lydell/elm-safe-virtual-dom, but it has nothing to do with “safe virtual DOM” really, it’s just in there because it’s convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant