Skip to content

Commit

Permalink
Updating Jooa11y with latest build of Sa11y - WIP
Browse files Browse the repository at this point in the history
Work in progress
  • Loading branch information
adamchaboryk committed Jan 17, 2024
1 parent 1a5a37c commit e3279bc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
11 changes: 5 additions & 6 deletions build/media_source/plg_system_jooa11y/js/jooa11y.es6.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { Jooa11y, Lang } from '@joomla/joomla-a11y-checker/dist/js/joomla-a11y-checker.esm.js';
import { Sa11y, Lang } from 'sa11y/dist/js/sa11y.esm';
import Sa11yLangEn from 'sa11y/dist/js/lang/en';


if (!Joomla) {
throw new Error('Joomla API is not properly initialised');
}

const stringPrefix = 'PLG_SYSTEM_JOOA11Y_';

Lang.translate = (string) => Joomla.Text._(stringPrefix + string, string);
Lang.addI18n(Sa11yLangEn.strings);

const options = Joomla.getOptions('jooa11yOptions');

window.addEventListener('load', () => {
// Instantiate
const checker = new Jooa11y(options);
checker.doInitialCheck();
const checker = new Sa11y(options);
});
2 changes: 1 addition & 1 deletion build/media_source/plg_system_jooa11y/scss/jooa11y.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import "../../../../node_modules/@joomla/joomla-a11y-checker/dist/css/joomla-a11y-checker";
@import "../../../../node_modules/sa11y/dist/css/";
13 changes: 11 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"punycode": "^2.3.0",
"qrcode-generator": "^1.4.4",
"roboto-fontface": "^0.10.0",
"sa11y": "^3.0.7",
"shepherd.js": "^11.2.0",
"short-and-sweet": "^1.0.4",
"skipto": "^4.1.7",
Expand Down Expand Up @@ -130,4 +131,4 @@
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.7.0"
}
}
}

0 comments on commit e3279bc

Please sign in to comment.