|
0
|
1 |
/* |
|
|
2 |
Copyright (c) 2009, Yahoo! Inc. All rights reserved. |
|
|
3 |
Code licensed under the BSD License: |
|
|
4 |
http://developer.yahoo.net/yui/license.txt |
|
|
5 |
version: 3.0.0b1 |
|
|
6 |
build: 1163 |
|
|
7 |
*/ |
|
|
8 |
YUI.add('node-aria', function(Y) { |
|
|
9 |
|
|
|
10 |
/** |
|
|
11 |
* Aria support for Node |
|
|
12 |
* @module node |
|
|
13 |
* @submodule node-aria |
|
|
14 |
*/ |
|
|
15 |
|
|
|
16 |
Y.Node.re_aria = /^(?:role$|aria-)/; |
|
|
17 |
|
|
|
18 |
Y.Node.prototype._addAriaAttr = function(name) { |
|
|
19 |
this.addAttr(name, { |
|
|
20 |
getter: function() { |
|
|
21 |
return Y.Node.getDOMNode(this).getAttribute(name, 2); |
|
|
22 |
}, |
|
|
23 |
|
|
|
24 |
setter: function(val) { |
|
|
25 |
Y.Node.getDOMNode(this).setAttribute(name, val); |
|
|
26 |
return val; |
|
|
27 |
} |
|
|
28 |
}); |
|
|
29 |
}; |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
}, '3.0.0b1' ,{requires:['node-base']}); |