YUI Theater — Jonathan LeBlanc: “YQL and YUI”

August 12, 2009 at 12:59 pm by Eric Miraglia | In YUI Theater | 4 Comments

Jonathan LeBlanc of the Yahoo! Developer Network

Earlier we posted video from Douglas Crockford’s talk on JSON at the BayJax meetup on July 27. Next up is Jonathan LeBlanc, a technical evangelist at the Yahoo! Developer Network who spoke about one of Yahoo!’s most intriguing developer offerings, YQL (the Yahoo! Query Language).

In this 24-minute session, Jonathan provides an introduction to YQL and then goes on to show how it can be used in combination with the YUI Library in the rapid creation of dynamic, data-driven interfaces where the data comes from hetereogeneous sources across the web. I suspect you’ll be surprised and intrigued, to say the least, if this is your first introduction to YQL; it’s the kind of service that makes you want to clear your calendar for a couple of days’ worth of uninterrupted hacking.

Thanks again to the Bayjax team and to Gonzalo Cordero for helping to bring the event to Yahoo!.

Other Recent YUI Theater Videos:

Subscribing to YUI Theater:

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

YUI Theater — Douglas Crockford: “The JSON Saga”

August 11, 2009 at 9:48 am by Eric Miraglia | In YUI Theater | 4 Comments

Douglas Crockford of Yahoo!

At the July 27 meeting of the Bayjax group, hosted here at Yahoo!, we had a lineup of terrific speakers. The first of the Bayjax talks — Douglas Crockford’s “The JSON Saga” — is now available on YUI Theater, embedded below and available in high definition with a full transcript on the YUI Theater site.

Here’s a taste of what Douglas has to say in this new talk, which covers the invention of JavaScript Object Notation as a data format and its popularization and standardization.

We found [JSON] worked really well. It was extremely effective for the thing that we invented it for — being browser server communication — but we also used it a lot for inter-server communication. Our platform scaled hugely, so we could have lots and lots of boxes, and they needed to be kept in sync, and we found JSON was perfect for sending messages between the servers. We also used JSON to implement a simple database, so we just have keys, and for each key we’d store some JSON data. It made it really efficient for storing stuff and getting it back. We liked it a lot, and we tried to convince our customers that it was good. Our customers said: well, we hate it, because we’ve never heard of it. Some of our customers said: oh, I wish you’d told us this six months ago, because we just decided to go with XML, so we can’t consider anything else now. And some of the people we talked to said: it’s not a standard, so we can’t use it. I said: it is a standard, it’s a subset of ECMA 262. They said: no, that’s not a standard. OK. So in order to use this, I had to declare that this is a standard. So that’s what I did. I decided it’s going to be a standard from now on. So I bought JSON.org.

It’s a great story, and of course Douglas is a fantastic storyteller, so consider it to be an hour well spent.

Thanks again to the Bayjax team and to Gonzalo Cordero for helping to bring the event to Yahoo!.

Other Recent YUI Theater Videos:

Subscribing to YUI Theater:

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

In the Wild for August 10, 2009

August 10, 2009 at 9:52 pm by Eric Miraglia | In In the Wild | 3 Comments

News and notes from the YUI community over the past few weeks; let us know what we missed in the comments section.

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

ARIA Made Easier With YUI 3

August 3, 2009 at 1:24 pm by Todd Kloots | In Accessibility, Development | 2 Comments

As mentioned in my talk Developing an Accessible Web 2.0 Widget Framework, one of the goals of YUI 3 is to make it easier for developers to build accessible user interfaces. To that end we’ve taken accessibility into consideration from the very start while building YUI 3, and the recent YUI 3.0.0 beta 1 release introduces several new additions that make it easier for developers to build ARIA-enabled widgets.

ARIA Attribute Support Added to Node

The Node Utility is YUI 3’s primary interface for interacting with the DOM, and it provides not only an abstraction model but built-in support for CSS Selector queries as a means of accessing HTML elements. Support for ARIA attributes has been added to the Node interface in the YUI 3.0.0 beta 1 release, allowing developers to use the expressive power of CSS Selector queries to apply and manage an element’s ARIA roles and states and properties.

Apply any of the ARIA attributes via Node’s set method. For example, to apply the role of toolbar to a <div> with an id of “toolbar”:


YUI().use('node', function(Y) {
    var node = Y.get('#toolbar').set('role', 'toolbar');
});

In addition to Node’s built-in support for CSS selector queries, it also supports chaining and the ability to set multiple attributes on a single Node. When used together, these features of Node make it especially easy to apply the ARIA roles, states, and properties when building DHTML widgets with a large subtree.

For example, when building a menubar widget it is necessary to apply a role of menubar to the root DOM element containing the menubar, and the role of menu to the root DOM element containing each submenu. Additionally, as each submenu is hidden by default, the aria-hidden state will need to be applied to each submenu as well. The Node interface makes it possible to do all of this in one line of code:


YUI().use('node', function(Y) {
    Y.get('#rootmenu').set('role', 'menubar').queryAll('.menu').setAttrs({ role: 'menu', 'aria-hidden': true });
});

Keyboard Support with the New Focus Manager Node Plugin

To work, ARIA requires developers provide keyboard access for widgets, since users of screen readers rely on the keyboard to navigate web sites and applications. As outlined in the ARIA specification and corresponding Best Practices document, providing keyboard access requires, in part, that each widget has one tab stop by default and is responsible for discretely managing focus for its descendants. Following these guidelines enables users to quickly navigate a page or application by using the tab key to move between widgets. Once a user has tabbed into a widget, they can then use other keys (the arrow keys for example) to move focus amongst the widget’s descendants.

The Focus Manager Node Plugin, which is available as of the YUI 3.0.0 beta 1 release, makes it easy to define a Node’s focusable descendants, define which descendant should be in the default tab flow, and define the keys that move focus among each descendant. Additionally, since the CSS pseudo class :focus is not supported on all elements in all A-Grade browsers, the Focus Manager Node Plugin provides an easy, cross-browser means of styling focus.

New ARIA Examples

For YUI 3.0.0 beta 1 we’ve also added a handful of examples that demonstrate the power of the Focus Manager Node Plugin to implement keyboard support to existing widgets and exercise Node’s new ARIA-related APIs.

Developers wishing to experience the benefits that ARIA provides can download the open-source NVDA Screen Reader and Firefox to test each example themselves. Alternatively, I’ve made screencasts of each example running with NVDA and Firefox.

YUI 3 Beta 1 ARIA Toolbar Video


YUI 3 Beta 1 ARIA Toolbar @ Yahoo! Video

YUI 3 Beta 1 ARIA Menu Button @ Yahoo! Video

YUI 3 Beta 1 ARIA Tabview Video


YUI 3 Beta 1 ARIA Tabview @ Yahoo! Video

The Road Ahead

While YUI 3 is presently composed mostly of utilities, we are hard at work polishing our widget infrastructure and will soon begin building out widgets. With YUI 3 our goal is to make it as easy as possible to build accessible user interfaces, whether you are building a widget from scratch, or implementing one of ours. We think we’re off to a good start with ARIA support incorporated into the Node interface and the Focus Manager Node Plugin. So, I want to encourage developers to start using these interfaces, and to let us know what’s missing, what’s not working, and what it is.

Additional Resources

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

Hosted by Yahoo!

Copyright © 2006-2010 Yahoo! Inc. All rights reserved. Privacy Policy - Terms of Service

Powered by WordPress on Yahoo! Web Hosting.