thought
1

I understand that nothing gets people yelling at each other like a meaty discussion on accessibility, but I’m not getting why the idea of making alt optional on img tags in HTML5 is causing such a furor. The alt attribute is the lowest of the low‐hanging accessibility fruit, and the number of people on earth who care about valid HTML — but don’t care even a little about accessibility — could fit into my pants. Get more people interested in validating their HTML; then we’ll talk.

link

Thomas and Amy apparently don’t have enough awesome stuff going on yet, so they’ve decided to release a book on JavaScript performance. Thomas tells me his findings have some implications for how we package Prototype & script.aculo.us.

quotation

Convenient though it would be if it were true, Mozilla is not big because it’s full of useless crap. Mozilla is big because your needs are big. Your needs are big because the Internet is big. There are lots of small, lean web browsers out there that, incidentally, do almost nothing useful. If that’s what you need, you’ve got options.

jwz
quotation

After the human race is enslaved by robots, there are going to be small rebel groups hiding out somewhere and Elliot Spitzer’s going to be writing op‐eds about how “no one could have predicted” that the robots would rebel and overthrow their masters. And it’ll be left to DFH bloggers to observe that this is in fact one of the most widely predicted scenarios in all of science fiction.

Matthew Yglesias

Paginate THIS

Posted in Articles, Design, User Interface, Web

Here’s a lovely pagination control I looked at on PSDTUTS today. Actually, first I used it; when it took me to a page I was not expecting, I hit the Back button and looked at it. It’s a testament to both my arrogance and my compulsiveness that I found five

Read more →
code
1

Code: Disabling text selection

Inspired by Thomas’s classic and event delegation.

/**
 *  Element.enableTextSelection(element, isEnabled)
 *  
 *  Enables or disables text selection within the given element.
 *  - element (Element): The element within which a dragging motion
 *    _should_ or _should not_ behave like text selection.
 *  - isEnabled (boolean): Whether to enable or disable text selection.
**/
(function() {
  var IGNORED_ELEMENTS = [];
  function _textSelectionHandler(event) {
    var element = Event.element(event);
    if (!element) return;
    for (var i = 0, node; node = IGNORED_ELEMENTS[i]; i++) {
      if (element === node || element.descendantOf(node)) {
        Event.stop(event);
        break;
      }
    }
  }
  
  if (document.attachEvent)
    document.onselectstart = _textSelectionHandler.bindAsEventListener(window);    
  else
    document.observe('mousedown', _textSelectionHandler);
    

  Element.addMethods({
    enableTextSelection: function(element, isEnabled) {
      if (isEnabled) {
        IGNORED_ELEMENTS = IGNORED_ELEMENTS.without(element);
      } else {
        if (!IGNORED_ELEMENTS.include(element))
          IGNORED_ELEMENTS.push(element);
      }
    }
  });
})();
link

The New Orleans Saints finished the regular season at 8–8, but finished dead last in the NFC South. This table confirms that our division was, indeed, the hardest this year. Parity is a bitch.

thought

Happy new year, folks. It’s been a while since I spoke in my own voice on this blog with any regularity; mostly it’s just quotations and links and such, with the occasional post about JavaScript. I will stop short of saying it’s a resolution of mine to reverse that trend. (Here’s a tip for resolutions: pick something small, sustainable, and quotidian. Don’t resolve to lose weight; resolve to drink one fewer soda per day, and start on January 1.)