I remember praising @vilc at the time. However after a little reading…
Interactive content (<a href=...
) inside a button element is not allowed:
Does it matter? That’s up to you.
I remember praising @vilc at the time. However after a little reading…
Interactive content (<a href=...
) inside a button element is not allowed:
Does it matter? That’s up to you.
I understand the $button widget can be used to effectively introduce the equivalent of an onlick wrapper as can the $eventcatcher and message catcher. You may need to use the tag parameter (html tag) of the button widget to use say span or div rather than a button.
Example:
<$button tag=span>
<a href="https://tiddlywiki.com" target="_blank">Go</a>
</$button>
More;
<$button tag=span tooltip="mouse over" actions="""<$action-sendmessage $message="tm-notify" $param="SampleNotification"/>""">
Go
</$button>
generates
<p><span class="" title="mouse over">
Go
</span></p>
but appears as simple text, with mouse over and if clicked sends a TW notification. Notice you can not see any thing about buttons or actions, or onclick in the html?
I don’t understand the premise – instead of what?
I hope you’re not questioning the veracity of the HTML spec… and I hope you’re not asking me to annotate the spec for you. I posted links. All you have to do is follow them and read.
Answer: Instead of <button>
a $button widget
There “may be no interactive content inside a html button element”, in part because it is itself an interactive element, however the tiddlywiki button is not ONLY a html button.
But see also below that “Some elements belong to this category only under specific conditions”, but we have the condition in which they are interactive.
for example in following on TiddlyWiki.com
<$button tag=span tooltip="mouse over" actions="""<$action-sendmessage $message="tm-notify" $param="SampleNotification"/>""">
This sentence is clickable<br>
A list within a button
<$list filter="[tag[HelloThere]]">
</$list>
</$button>
In the above there is a strong argument that inside the above $button widget that the content is interactive.
Notice how this is not “Interactive”.
<$button tag=span tooltip="mouse over" actions="""<$action-sendmessage $message="tm-notify" $param="SampleNotification"/>""">
This sentence is clickable<br>
A list within a button
<$list filter="[tag[HelloThere]]">
<$text text=<<currentTiddler>>/><br>
</$list>
</$button>
tag=span
from the above button to see how it looks
<a href=
inside the html button tag, which are arguably interactive content. See abstract html view.Here is an abstract;
<p>
<button class="" title="mouse over">
This sentence is clickable<br>
A list within a button
<div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#A%20Gentle%20Guide%20to%20TiddlyWiki">A Gentle Guide to TiddlyWiki</a></div>
<div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#Discover%20TiddlyWiki">Discover TiddlyWiki</a></div>
<div><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#Some%20of%20the%20things%20you%20can%20do%20with%20TiddlyWiki">Some of the things you can do with TiddlyWiki</a></div>
....
</button></p>
No, it’s how the spec defines it. Yet again, I’m going to have to say it…
I’m done with this.
Look at how the spec defines it, if you want to ignore what I said about tiddlywiki $button widgets, and you will see it lists the ‘a tag’ as something that sometimes obeys this rule and sometime not.
perhaps a good time for you to bale, I suppose.
Hi folks,
I did move this discussion into it’s own thread, but I wanted to keep the OP in the original thread too. So I had to duplicate the OP and re-assign ownership to @CodaCoder
IMO this thread goes way off topic in the root thread – So I moved it.
Discussion can go on here if you want.
I think there are some interesting aspects and they would be worth to discuss.
But – Please watch your language, otherwise I’ll close the thread, which was not possible with the original thread.
It will be possible here.
kind regards
Mario