From b0c0b7a808ecd35fae5ec8897c1f94b29b657f1e Mon Sep 17 00:00:00 2001 From: Jordan Scales Date: Thu, 17 Sep 2015 10:00:55 -0400 Subject: [PATCH] tota11y v0.1.0 --- CHANGELOG.md | 9 + build/tota11y.js | 1903 ++++++++++++++++++++++-------------------- build/tota11y.min.js | 20 +- package.json | 2 +- 4 files changed, 1029 insertions(+), 905 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..2902f4b9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +## 0.1.0 + +* Added an experimental "Magic wand" plugin to display screen-reader text on hover ([1215c6e](https://github.com/Khan/tota11y/commit/1215c6e), [fbcd665](https://github.com/Khan/tota11y/commit/fbcd665)) +* Upgrade tota11y to use Accessibility Developer Tools v2.9.0-rc0 ([fe9a070](https://github.com/Khan/tota11y/commit/fe9a070)) +* Fixed a bug in contrast preview when interacting with gradients ([4c4ea9d](https://github.com/Khan/tota11y/commit/4c4ea9d)) +* Fixed a bug with annotation toggling breaking the HeadingsPlugin summary tab ([2f6d9d6](https://github.com/Khan/tota11y/commit/2f6d9d6)) +* Added real `src` values to the AltTextPlugin suggestions ([053d066](https://github.com/Khan/tota11y/commit/053d066)) +* Added surrounding code to all error descriptions ([c044017](https://github.com/Khan/tota11y/commit/c044017)) +* Built a changelog! diff --git a/build/tota11y.js b/build/tota11y.js index 0fa0337f..7335c653 100644 --- a/build/tota11y.js +++ b/build/tota11y.js @@ -1,5 +1,5 @@ /*! - * tota11y v0.0.10 + * tota11y v0.1.0 * http://khan.github.io/tota11y * * Includes Accessibility Developer Tools @@ -9,7 +9,7 @@ * Released under the MIT license * http://github.com/Khan/tota11y/blob/master/LICENSE.txt * - * Date: 2015-07-29 + * Date: 2015-09-17 * */ /******/ (function(modules) { // webpackBootstrap @@ -74,15 +74,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - __webpack_require__(/*! ./less/tota11y.less */ 3); + __webpack_require__(/*! ./less/tota11y.less */ 5); - var $ = __webpack_require__(/*! jquery */ 2); + var $ = __webpack_require__(/*! jquery */ 4); - var plugins = __webpack_require__(/*! ./plugins */ 7); - var logoTemplate = __webpack_require__(/*! ./templates/logo.handlebars */ 45); + var plugins = __webpack_require__(/*! ./plugins */ 9); + var logoTemplate = __webpack_require__(/*! ./templates/logo.handlebars */ 48); // Chrome Accessibility Developer Tools - required once as a global - __webpack_require__(/*! script!./~/accessibility-developer-tools/dist/js/axs_testing.js */ 46); + __webpack_require__(/*! script!./~/accessibility-developer-tools/dist/js/axs_testing.js */ 49); var Toolbar = (function () { function Toolbar() { @@ -91,13 +91,13 @@ this.activePlugin = null; } + /** + * Manages the state of the toolbar when a plugin is clicked, and toggles + * the appropriate plugins on and off. + */ + _createClass(Toolbar, [{ key: "handlePluginClick", - - /** - * Manages the state of the toolbar when a plugin is clicked, and toggles - * the appropriate plugins on and off. - */ value: function handlePluginClick(plugin) { // If the plugin was already selected, toggle it off if (plugin === this.activePlugin) { @@ -114,12 +114,12 @@ this.activePlugin = plugin; } } - }, { - key: "appendTo", /** * Renders the toolbar and appends it to the specified element. */ + }, { + key: "appendTo", value: function appendTo($el) { var _this = this; @@ -143,6 +143,7 @@ "Experimental" ), plugins.experimental.map(function (Plugin) { + // eslint-disable-line no-unused-vars return E(Plugin, { onClick: _this.handlePluginClick.bind(_this) }); }) ); @@ -200,11 +201,12 @@ // TODO: Make this customizable bar.appendTo($("body")); }); - // eslint-disable-line no-unused-vars - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./element */ 1))) + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./element */ 3))) /***/ }, -/* 1 */ +/* 1 */, +/* 2 */, +/* 3 */ /*!********************!*\ !*** ./element.js ***! \********************/ @@ -216,16 +218,14 @@ "use strict"; function buildElement(type, props) { - for (var _len = arguments.length, children = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - children[_key - 2] = arguments[_key]; - } + var _arguments = arguments; // We need to require jQuery inside of this method because `require()` // will work different after mocha's magic "before" method runs. // // This allows us to use the jQuery instance provided by our jsdom // instance. - var $ = __webpack_require__(/*! jquery */ 2); + var $ = __webpack_require__(/*! jquery */ 4); // Is our element a TextNode? if (props === undefined) { @@ -234,48 +234,55 @@ // Is our element a Plugin? } else if (type.render) { - // Render the plugin with the passed-in click handler - return type.render(props && props.onClick); + // Render the plugin with the passed-in click handler + return type.render(props && props.onClick); + + // Otherwise, build the element with jQuery + } else { + var _len, children, _key; + + var _ret = (function () { + var $el = $("<" + type + ">"); + + // Iterate through props + if (props !== null) { + for (var propName in props) { + // onClick gets turned into a jQuery event handler + // TODO: Handle props like onHover, onFocus, etc. + if (propName === "onClick") { + var handler = props[propName]; + $el.click(handler); + } else { + var value = props[propName]; + $el.prop(propName, value); + } + } + } - // Otherwise, build the element with jQuery - } else { - var _ret = (function () { - var $el = $("<" + type + ">"); - - // Iterate through props - if (props !== null) { - for (var propName in props) { - // onClick gets turned into a jQuery event handler - // TODO: Handle props like onHover, onFocus, etc. - if (propName === "onClick") { - var handler = props[propName]; - $el.click(handler); - } else { - var value = props[propName]; - $el.prop(propName, value); + // Recurse through the children and append each resulting element to + // the parent + + for (_len = _arguments.length, children = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + children[_key - 2] = _arguments[_key]; } - } - } - // Recurse through the children and append each resulting element to - // the parent - children.forEach(function (child) { - $el.append(buildElement(child)); - }); + children.forEach(function (child) { + $el.append(buildElement(child)); + }); - return { - v: $el - }; - })(); + return { + v: $el + }; + })(); - if (typeof _ret === "object") return _ret.v; - } + if (typeof _ret === "object") return _ret.v; + } } module.exports = buildElement; /***/ }, -/* 2 */ +/* 4 */ /*!*********************************!*\ !*** ./~/jquery/dist/jquery.js ***! \*********************************/ @@ -9494,7 +9501,7 @@ /***/ }, -/* 3 */ +/* 5 */ /*!***************************!*\ !*** ./less/tota11y.less ***! \***************************/ @@ -9503,10 +9510,10 @@ // style-loader: Adds some css to the DOM by adding a