5

Firstly, I've seen a few people using <kbd> tags to emphasise JSFiddle demo links, which goes against the W3C specification:

The kbd element represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands).

There are situations where <kbd> elements could have valid links, so there's no need to strip them out completely, but I can't ever see a need for a JSFiddle link within them.

Look at my demo!

Should JSFiddle links be blocked from <kbd> tags?


The other thing is that there are currently no restrictions (or so it seems).
You can have an entire block of text within the <kbd> tags if you so desired.
which is silly.

You can also put images inside them, which seems a little unnecessary:

Woo hoo!

Does there need to be stricter formatting rules for the <kbd> tag to limit anything which shouldn't normally appear within them?

11
  • 2
    What is your feature request exactly? There's nothing in particular that you're suggesting... it's just a random "rant" about kbd. Commented Apr 15, 2013 at 14:54
  • I'm asking for stricter formatting rules for the <kbd> tag. I figured that would be obvious, but let me edit it into my question. Commented Apr 15, 2013 at 14:54
  • Can you provide some examples where these problems appear in the wild? Commented Apr 15, 2013 at 14:55
  • 22
    What if I have a potato-button on my keyboard? Commented Apr 15, 2013 at 14:57
  • 1
    @EmilVikström Well here's a question I just edited on SO which placed JSFiddle link within the <kbd> tags, which sparked this post: stackoverflow.com/revisions/15882334/1. The rest is just a result of toying with the <kbd> tag to see if SO imposed any restrictions. Commented Apr 15, 2013 at 14:58
  • 2
    Your examples are abuse of the formatting, just like unnecessary code tags, or everything in bold...and so on. Just edit it out. Commented Apr 15, 2013 at 14:58
  • Sulfurized Demonbobby, I have two upvote-buttons on my keyboard! Commented Apr 15, 2013 at 14:59
  • 7
    You must be rich man. In Latvia we dream about keyboard potato. Commented Apr 15, 2013 at 15:01
  • 3
    @EmilVikström: Then you're one lucky bastard, I only have one button which casts downvotes with extreme prejudice. ;) Commented Apr 15, 2013 at 15:01
  • @Balpha that has to be the fastest status-declined I've ever seen. Commented Apr 15, 2013 at 15:13
  • 1
    @RichardJ.RossIII 7:18, 6:14 :)
    – balpha StaffMod
    Commented Apr 15, 2013 at 15:34

1 Answer 1

10

I dislike formatting abuse as much as the next guy, but this isn't something you should enforce technically. What if people want to legitimately link a <kbd> tag? For example I coult tell you to read all about Scroll Lock :)

Unless this really becomes a wide-spread problem – which I doubt –, editing them out and educating the posters to please not do that seems good enough.

2
  • This is why I mentioned filtering just JSFiddle links. I can't imagine a situation where a <kbd> tag would be the only way of displaying a link to such an example. "Here's a demo (press <kbd>A+B+C</kbd>)" over "Here's a demo: <kbd>A+B+C</kbd>" Commented Apr 15, 2013 at 15:13
  • @JamesDonnelly the thing about <kbd> is that it's not an obvious feature. It's not in the toolbar, and your n00b who is just joining the site simply won't know about it. Commented Apr 15, 2013 at 15:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .