4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp <meta http-equiv="content-type" content="text/html; charset=utf-8">
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp /*Supplemental: CSS for the YUI distribution*/
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp #custom-doc { width: 95%; min-width: 950px; }
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp #pagetitle {background-image: url(/assets/bg_hd.gif);}
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp padding:10px 10px 10px 10px;
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp <link rel="stylesheet" type="text/css" href="/build/cssfonts/fonts-min.css">
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp<script type="text/javascript" src="/build/yui/yui-min.js"></script>
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp allowRollup: false,
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min'
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp}).use('charts', 'test', 'console', function (Y)
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp pieDataValues = [
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp defaultPieAriaDescription = "Use the left and right keys to navigate through items.",
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp width = 400,
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp height = 300;
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp function AriaTests(cfg, testConfig)
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp this.defaultAriaDescription = testConfig.defaultAriaDescription;;
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp defaultAriaLabel: "Chart Application",
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp changedAriaLabel: "This is a new ariaLabel value.",
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp setUp: function() {
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp tearDown: function() {
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp "test:getAriaLabel()": function()
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp Y.Assert.isTrue(this.chart.get("ariaLabel") == this.defaultAriaLabel);
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp "test:setAriaLabel()": function()
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp var chart = this.chart;
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp Y.Assert.isTrue(chart.get("ariaLabel") == this.changedAriaLabel);
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp "test:getAriaDescription()": function()
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp Y.Assert.isTrue(this.chart.get("ariaDescription") == this.defaultAriaDescription);
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp "test:setAriaDescription()": function()
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp var chart = this.chart;
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp Y.Assert.isTrue(chart.get("ariaDescription") == this.changedAriaLabel);
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp Y.AriaTests = AriaTests;
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp var pieTests = new Y.AriaTests({
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp dataProvider: pieDataValues,
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp render: "#mychart",
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp type: "pie",
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp width: width,
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp height: height
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp type: "Pie",
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp defaultAriaDescription: defaultPieAriaDescription
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp //create the console
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp var r = new Y.Console({
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp newestOnTop : false,
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp style: 'block' // to anchor in the example content
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp r.render('#testLogger');
4c307472e86c080e30ac5eb2ce60ab4f6fc10b28Tripp //run the tests