From 2be2625fbe183cbf61eec9cdbe9e3a946cda4d5f Mon Sep 17 00:00:00 2001 From: Paul Hibbitts Date: Tue, 2 Jul 2024 10:34:30 -0700 Subject: [PATCH 1/2] Improve accessibility of Font Awesome icons. --- docs/assets/js/docsify-fontawesome.js | 96 +++++++++++++++++++++++ docs/assets/js/docsify-fontawesome.min.js | 1 + docs/index.html | 2 +- 3 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 docs/assets/js/docsify-fontawesome.js create mode 100644 docs/assets/js/docsify-fontawesome.min.js diff --git a/docs/assets/js/docsify-fontawesome.js b/docs/assets/js/docsify-fontawesome.js new file mode 100644 index 0000000..2f25bf4 --- /dev/null +++ b/docs/assets/js/docsify-fontawesome.js @@ -0,0 +1,96 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./src/index.js": +/*!**********************!*\ + !*** ./src/index.js ***! + \**********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _plugin_fontawesome__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./plugin-fontawesome */ \"./src/plugin-fontawesome.js\");\n\n\n// if (!window.$docsify) {\n// window.$docsify = {}\n// }\nwindow.$docsify = window.$docsify || {};\nwindow.$docsify.plugins = (window.$docsify.plugins || []).concat(_plugin_fontawesome__WEBPACK_IMPORTED_MODULE_0__.install);\n\n\n//# sourceURL=webpack://docsify-fontawesome/./src/index.js?"); + + /***/ }), + + /***/ "./src/plugin-fontawesome.js": + /*!***********************************!*\ + !*** ./src/plugin-fontawesome.js ***! + \***********************************/ + /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + + eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"install\": () => (/* binding */ install)\n/* harmony export */ });\nfunction install(hook) {\n const faRegExp = /:fa[\\w -]+:/gm;\n\n hook.beforeEach(content => {\n let faHtmlRendered = content.replace(faRegExp, function (m, code) {\n console.log('m: ' + m.replace(/:/gi, ''));\n let rendered = ``;\n return rendered;\n });\n return faHtmlRendered;\n });\n hook.afterEach(function (html, next) {\n let faHtmlRendered = html.replace(faRegExp, function (m, code) {\n console.log('m: ' + m.replace(/:/gi, ''));\n let rendered = ``;\n return rendered;\n });\n //console.log('faHtmlRendered: '+faHtmlRendered);\n next(faHtmlRendered);\n });\n}\n\n\n//# sourceURL=webpack://docsify-fontawesome/./src/plugin-fontawesome.js?"); + + /***/ }) + + /******/ }); + /************************************************************************/ + /******/ // The module cache + /******/ var __webpack_module_cache__ = {}; + /******/ + /******/ // The require function + /******/ function __webpack_require__(moduleId) { + /******/ // Check if module is in cache + /******/ var cachedModule = __webpack_module_cache__[moduleId]; + /******/ if (cachedModule !== undefined) { + /******/ return cachedModule.exports; + /******/ } + /******/ // Create a new module (and put it into the cache) + /******/ var module = __webpack_module_cache__[moduleId] = { + /******/ // no module.id needed + /******/ // no module.loaded needed + /******/ exports: {} + /******/ }; + /******/ + /******/ // Execute the module function + /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); + /******/ + /******/ // Return the exports of the module + /******/ return module.exports; + /******/ } + /******/ + /************************************************************************/ + /******/ /* webpack/runtime/define property getters */ + /******/ (() => { + /******/ // define getter functions for harmony exports + /******/ __webpack_require__.d = (exports, definition) => { + /******/ for(var key in definition) { + /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { + /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); + /******/ } + /******/ } + /******/ }; + /******/ })(); + /******/ + /******/ /* webpack/runtime/hasOwnProperty shorthand */ + /******/ (() => { + /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) + /******/ })(); + /******/ + /******/ /* webpack/runtime/make namespace object */ + /******/ (() => { + /******/ // define __esModule on exports + /******/ __webpack_require__.r = (exports) => { + /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { + /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); + /******/ } + /******/ Object.defineProperty(exports, '__esModule', { value: true }); + /******/ }; + /******/ })(); + /******/ + /************************************************************************/ + /******/ + /******/ // startup + /******/ // Load entry module and return exports + /******/ // This entry module can't be inlined because the eval devtool is used. + /******/ var __webpack_exports__ = __webpack_require__("./src/index.js"); + /******/ + /******/ })() + ; \ No newline at end of file diff --git a/docs/assets/js/docsify-fontawesome.min.js b/docs/assets/js/docsify-fontawesome.min.js new file mode 100644 index 0000000..c546d58 --- /dev/null +++ b/docs/assets/js/docsify-fontawesome.min.js @@ -0,0 +1 @@ +!function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=0)}([function(e,n,r){"use strict";r.r(n),window.$docsify=window.$docsify||{},window.$docsify.plugins=(window.$docsify.plugins||[]).concat((function(e){const n=/:fa[\w -]+:/gm;e.beforeEach(e=>e.replace(n,(function(e,n){return console.log("m: "+e.replace(/:/gi,"")),``}))),e.afterEach((function(e,r){r(e.replace(n,(function(e,n){return console.log("m: "+e.replace(/:/gi,"")),``})))}))}))}]); \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index d198c0c..bd3d794 100644 --- a/docs/index.html +++ b/docs/index.html @@ -377,7 +377,7 @@ - + From bea9ed74559675fe4c9b60f586638281e186b042 Mon Sep 17 00:00:00 2001 From: Paul Hibbitts Date: Tue, 2 Jul 2024 10:34:35 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3ea435..8efaf11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [v1.2.17](https://github.com/hibbitts-design/docsify-open-course-starter-kit/releases/tag/v1.2.17) +### 0XX/XX/2024 + +**Improved:** +* Improve accessibility of Font Awesome icons when used for decorative elements (automatic addition of `aria-hidden` attribute) + ## [v1.2.16](https://github.com/hibbitts-design/docsify-open-course-starter-kit/releases/tag/v1.2.16) ### 06/24/2024🏒