Right. The TW specific “tag” terminology is a “category/classification system” that we USUALLY initiate through a Tiddler’s tags field. The general HTML terminology refers to “elements” (usually in pairs) that appear in code as <TAGS>.
I think you are right to indicate the two different usages can get confused in practice sometimes?
From an accessibility perspective I am still confused. Why would you ever want a div to behave like a button? Or why create a link (<a> tag) using a button widget if you could use a link widget instead?
And if there was any good reason to use a div, shouldn’t there be an aria-role attribute as well we could set to “button”? – And then again, why not use a button tag in the first place?
There are lots of reasons, but first. Lets all step back and point out tiddlywiki’s final result is html. We have widgets and more to access most standard html features, onclick is one. Because we need javascript functionality to do things the widgets and macros allow us to do this in a tiddlywiki structured way to ensure changes are propergated and displayed correctly and tiddlers and fields are updated etc…
As a result widgets will always provide a subset of that which is possible in HTML/Javascript.
There are various places such as tag or type on the button or edit-text widgets where parameters allow us to pass through attribute value pairs to the resulting html.
In cases where you don’t use functions or Javascript you can often use HTML directly.
There are many ways to do things in TW – like in many other software. Sometimes I feel that there are too many ways so it gets harder to choose the best one.
You could use <div title="titles are not a recommended accessibility feature">some text</div> to achieve this, no need to use a widget. (Thanks for the reminder that we always can use HTML directly.)
I would recommend a button tag for a button that changes the state to edit and a link to navigate elsewhere. We have button and link widgets for this and I still don’t see a reason to modify the tags.
An example of wrong use of span (in my eyes – there might be reasons I do not see) are the tag pills. The tag pill is a span that triggers a menu when you click it. Why is this not a button? A span is not accessible via keyboard, while a button is by nature. (Tag pills are not created using the button widget as far as I know.)
There might be other useful cases for using the button widget with other tags and I would really like to see some of them.
Why is this a series of links (they don’t take you anywhere*) when we could have a list of buttons (they set a value) or a select menu where you select an option?
The button-widget, was probably one of the first and one of the most important widgets to start with … In the context described below it should be clearer, why there are some “sins” in the widget attributes. .. We simply needed that flexibility.
more context
The main problems with native HTML elements like select is, that they are really hard to style in way that also looks good on all browsers. It’s probably better now, but TW5 is an “early contender” in terms of HTML 5 standards.
Most of the functions like dropdowns where needed from the beginning and the basic concepts where developed back then.
The HTML-5 standard was introduced in Jan. 2008 and reached “W3C Recommendation” status in Oct. 2014. So the standard itself was still in its infancy when TW5 development started.
The first usable TiddlyWiki5 alpha was published in Nov. 2013 where Chrome was version 31, Safari v7, FireFox v26 and IE 11 was just introduced.