Skip to content

Commit 4b12af4

Browse files
author
michael-n-cooper
committed
TRAVIS-CI update from aria-common
1 parent 3e3f492 commit 4b12af4

File tree

2 files changed

+402
-387
lines changed

2 files changed

+402
-387
lines changed

graphics-aria/common/script/aria.js

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,12 @@
88
*/
99

1010
/* jshint shadow: true, unused: false, laxbreak:true, laxcomma:true, asi: true, eqeqeq: false, strict: implied, jquery: true */
11-
/* global require, updateReferences */
11+
/* global require, updateReferences, ariaAttributeReferences */
1212

1313
var roleInfo = {};
1414

15-
require(['core/pubsubhub'], function (respecEvents) {
16-
const button = respecUI.addCommand(
17-
'Save roles as JSON',
18-
showAriaSave,
19-
null,
20-
'☁️'
21-
);
22-
23-
function showAriaSave() {
24-
const json = JSON.stringify(roleInfo, null, ' ');
25-
const href = 'data:text/html;charset=utf-8,' + encodeURIComponent(json);
26-
const ariaUI = document.createElement('div');
27-
ariaUI.classList.add('respec-save-buttons');
28-
ariaUI.innerHTML = `
29-
<a href="${href}" download="roleInfo.json" class="respec-save-button">Save JSON</a>
30-
`;
31-
respecUI.freshModal('Save Aria roles as JSON', ariaUI, button);
32-
ariaUI.querySelector('a').focus();
33-
}
34-
35-
respecEvents.sub('end', function (msg) {
36-
if (msg == 'w3c/conformance') {
15+
function ariaAttributeReferences() {
16+
{
3717
var propList = {};
3818
var globalSP = [];
3919

@@ -766,5 +746,31 @@ require(['core/pubsubhub'], function (respecEvents) {
766746

767747
updateReferences(document);
768748
}
749+
}
750+
751+
require(['core/pubsubhub'], function (respecEvents) {
752+
const button = respecUI.addCommand(
753+
'Save roles as JSON',
754+
showAriaSave,
755+
null,
756+
'☁️'
757+
);
758+
759+
function showAriaSave() {
760+
const json = JSON.stringify(roleInfo, null, ' ');
761+
const href = 'data:text/html;charset=utf-8,' + encodeURIComponent(json);
762+
const ariaUI = document.createElement('div');
763+
ariaUI.classList.add('respec-save-buttons');
764+
ariaUI.innerHTML = `
765+
<a href="${href}" download="roleInfo.json" class="respec-save-button">Save JSON</a>
766+
`;
767+
respecUI.freshModal('Save Aria roles as JSON', ariaUI, button);
768+
ariaUI.querySelector('a').focus();
769+
}
770+
respecEvents.sub('end', function (msg) {
771+
if (msg == 'w3c/conformance') {
772+
ariaAttributeReferences();
773+
}
769774
});
770775
});
776+

0 commit comments

Comments
 (0)