- Enhancement (svgIcons): Fix JSDoc param def; add alt options

- Accessibility: Begin work, add aria-label to some buttons and
    form controls; add `role=main`; `<img alt>`; `<iframe title>`
- i18n: Add `lang` attribute
- Refactoring: lbs, simplify i18nized element retrieval call
- Docs: Some JSDoc descriptions, JSDoc spacing, fix svgIcons param
    def; add todo
- Testing: Avoid reporting meta-viewport (have own zooming
    controls and difficult to fix)
This commit is contained in:
Brett Zamir
2019-04-03 12:49:48 +08:00
parent 69ea647286
commit 056f4f197c
36 changed files with 968 additions and 382 deletions

View File

@@ -2,7 +2,8 @@ var svgEditorExtensionLocale_server_moinsave_en = (function () {
'use strict';
var en = {
saved: 'Saved! Return to Item View!'
saved: 'Saved! Return to Item View!',
hiddenframe: 'Frame to store hidden values'
};
return en;

View File

@@ -2,7 +2,8 @@ var svgEditorExtensionLocale_server_moinsave_zh_CN = (function () {
'use strict';
var zhCN = {
saved: '已保存! 返回视图!'
saved: '已保存! 返回视图!',
hiddenframe: 'Frame to store hidden values'
};
return zhCN;

View File

@@ -2,7 +2,8 @@ var svgEditorExtensionLocale_server_opensave_en = (function () {
'use strict';
var en = {
uploading: 'Uploading...'
uploading: 'Uploading...',
hiddenframe: 'Frame to store hidden values'
};
return en;

View File

@@ -2,7 +2,8 @@ var svgEditorExtensionLocale_server_opensave_zh_CN = (function () {
'use strict';
var zhCN = {
uploading: '正在上传...'
uploading: '正在上传...',
hiddenframe: 'Frame to store hidden values'
};
return zhCN;

View File

@@ -4887,7 +4887,7 @@ var svgEditorExtension_server_moinsave = (function () {
/* const target = */
$('<iframe name="output_frame" style="width: 0; height: 0;" src="#"/>').appendTo('body');
$("<iframe name=\"output_frame\" title=\"".concat(strings.hiddenframe, "\"\n style=\"width: 0; height: 0;\" src=\"#\"/>")).appendTo('body');
svgEditor.setCustomHandlers({
save: function () {
var _save = _asyncToGenerator(

View File

@@ -5017,7 +5017,7 @@ var svgEditorExtension_server_opensave = (function () {
cancelled = false; // Hiding by size instead of display to avoid FF console errors
// with `getBBox` in browser.js `supportsPathBBox_`)
$('<iframe name="output_frame" style="width: 0; height: 0;" src="#"/>').appendTo('body');
$("<iframe name=\"output_frame\" title=\"".concat(strings.hiddenframe, "\"\n style=\"width: 0; height: 0;\" src=\"#\"/>")).appendTo('body');
svgEditor.setCustomHandlers({
save: function save(win, data) {
var svg = '<?xml version="1.0" encoding="UTF-8"?>\n' + data,