question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It says it's OK to have a `a` in `button`

See original GitHub issue

Hi,

The request for “Can I include a in button” has a wrong result as it says it’s OK but it’s not because the content model is:

Phrasing content, but there must be no interactive content descendant and no descendant with the tabindex attribute specified.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
juliemoynatcommented, Sep 25, 2021

Thank you for taking this important point into account.

I’m not sure there are other cases like this but if I find one, I will tell you.

About the mechanism to ask precision about the attributes on the tag, it could be a second question like “does the parent tag have this attribute? [dropdown list of the interesting attributes]”. According to the answer, it could change the content in the page.

2reactions
CyberLightcommented, Sep 22, 2021

I’m sorry, but with the current implementation and making the result of tag matching, this approach is not possible. Perhaps, in the next versions it will be possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I nest a <button> element inside an <a> using HTML5?
No, it isn't valid HTML5 according to the HTML5 Spec Document from W3C: Content model: Transparent, but there must be no interactive content...
Read more >
Is it OK to have a link that looks like a button? - Accessible Web
Answer. Yes, it is OK to use links that look like buttons, but it is highly encouraged to use the native elements if...
Read more >
Is It Possible to Nest an HTML <button> Element Inside an <a ...
In this snippet, learn whether it's possible to nest a tag within an in HTML5. To have a button linking to somewhere, you...
Read more >
Why the 'Ok' Button is No Longer Okay - UX Movement
'Ok' is not a specific action. It's an exclamation. When users click the 'Ok' button, they're not saying “okay”, they're doing a specific ......
Read more >
What can I use inside a button tag in place of <a>? - SitePoint
it works fine but I get an error saying the <a> tag cannot be nested ... If you have a single button on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found