Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're right to point out that the current best practice is to use HTML as intended, including semantic markup for links and buttons. Still, some developers attach mouse and/or touch events to semantically undistinguished elements without providing appropriate markup. For instance, the TodoMVC examples do this (including the Ember.js one). I guess it's time for me to start submitting pull requests.


It looks like the Ember one has three {{action}}s:

1) <button {{action "removeTodo"}} class="destroy"> (a button) 2) <button id="clear-completed" {{action "clearCompleted"}} {{bind-attr class="buttonClass:hidden"}}> (a button) 3) <label {{action "editTodo" on="doubleClick"}}>{{title}}</label> - not a button, but a requirement of TodoMVC. It would be nice if TodoMVC had a <button> marked edit that achieved the same goal.

There is also a subclass of <input>, which:

1) Automatically focuses on insertion (native focuses are properly handled by screen readers) 2) Clears out the Todo if the text becomes empty and the user hits return (somewhat screen-reader friendly, and a requirement of TodoMVC)

What am I missing?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: