summary refs log tree commit diff
path: root/gnu/packages/patches/mathjax-3.1.2-no-a11y.patch
blob: 97bd82c536308dabb9d343db5d5321519ed7ac31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
commit 9bb6f1e11264fb075bfa70fa3684f10a32414594
Author: Lars-Dominik Braun <lars@6xq.net>
Date:   Wed Dec 1 14:28:06 2021 +0100

    guix: Remove accessibility.
    
    We cannot build speech-rule-engine from source and thus all dependents
    must be removed. This affects all a11y modules and menu items, which
    may try to load components.

diff --git a/components/src/dependencies.js b/components/src/dependencies.js
index f9be6f93..822f8fb6 100644
--- a/components/src/dependencies.js
+++ b/components/src/dependencies.js
@@ -16,6 +16,3 @@
 export const dependencies = {
-  'a11y/semantic-enrich': ['input/mml', '[sre]'],
-  'a11y/complexity': ['a11y/semantic-enrich'],
-  'a11y/explorer': ['a11y/semantic-enrich', 'ui/menu'],
   '[tex]/all-packages': ['input/tex-base'],
   '[tex]/action': ['input/tex-base', '[tex]/newcommand'],
@@ -58,6 +55,5 @@ export const dependencies = {
 export const paths = {
   tex: '[mathjax]/input/tex/extensions',
-  sre: '[mathjax]/sre/' + (typeof window === 'undefined' ? 'sre-node' : 'sre_browser')
 };
 
 const allPackages = [
diff --git a/components/src/mml-chtml/mml-chtml.js b/components/src/mml-chtml/mml-chtml.js
index c0bd18ee..a283a1ab 100644
--- a/components/src/mml-chtml/mml-chtml.js
+++ b/components/src/mml-chtml/mml-chtml.js
@@ -5,5 +5,4 @@ import '../input/mml/mml.js';
 import '../output/chtml/chtml.js';
 import '../output/chtml/fonts/tex/tex.js';
 import '../ui/menu/menu.js';
-import '../a11y/assistive-mml/assistive-mml.js';
 import '../startup/startup.js';
diff --git a/components/src/mml-chtml/preload.js b/components/src/mml-chtml/preload.js
index e3f202f7..3699570e 100644
--- a/components/src/mml-chtml/preload.js
+++ b/components/src/mml-chtml/preload.js
@@ -5,5 +5,5 @@ Loader.preLoad(
   'core',
   'input/mml',
   'output/chtml', 'output/chtml/fonts/tex.js',
-  'ui/menu', 'a11y/assistive-mml'
+  'ui/menu'
 );
diff --git a/components/src/mml-svg/mml-svg.js b/components/src/mml-svg/mml-svg.js
index 172b2433..23b66e69 100644
--- a/components/src/mml-svg/mml-svg.js
+++ b/components/src/mml-svg/mml-svg.js
@@ -5,5 +5,4 @@ import '../input/mml/mml.js';
 import '../output/svg/svg.js';
 import '../output/svg/fonts/tex/tex.js';
 import '../ui/menu/menu.js';
-import '../a11y/assistive-mml/assistive-mml.js';
 import '../startup/startup.js';
diff --git a/components/src/mml-svg/preload.js b/components/src/mml-svg/preload.js
index 3cb47d42..89f6b9f9 100644
--- a/components/src/mml-svg/preload.js
+++ b/components/src/mml-svg/preload.js
@@ -5,5 +5,5 @@ Loader.preLoad(
   'core',
   'input/mml',
   'output/svg', 'output/svg/fonts/tex.js',
-  'ui/menu', 'a11y/assistive-mml'
+  'ui/menu'
 );
diff --git a/components/src/source.js b/components/src/source.js
index ba6d6835..02ecf18d 100644
--- a/components/src/source.js
+++ b/components/src/source.js
@@ -62,11 +62,5 @@ export const source = {
   'output/chtml/fonts/tex': `${src}/output/chtml/fonts/tex/tex.js`,
   'output/svg': `${src}/output/svg/svg.js`,
   'output/svg/fonts/tex': `${src}/output/svg/fonts/tex/tex.js`,
-  'a11y/assistive-mml': `${src}/a11y/assistive-mml/assistive-mml.js`,
-  'a11y/semantic-enrich': `${src}/a11y/semantic-enrich/semantic-enrich.js`,
-  'a11y/complexity': `${src}/a11y/complexity/complexity.js`,
-  'a11y/explorer': `${src}/a11y/explorer/explorer.js`,
-  '[sre]': (typeof window === 'undefined' ? `${src}/../../js/a11y/sre-node.js` :
-            `${src}/../../node_modules/speech-rule-engine/lib/sre_browser.js`),
   'ui/menu': `${src}/ui/menu/menu.js`,
   'ui/safe': `${src}/ui/safe/safe.js`,
diff --git a/components/src/tex-chtml-full/preload.js b/components/src/tex-chtml-full/preload.js
index 76c81c92..0eb3a8e2 100644
--- a/components/src/tex-chtml-full/preload.js
+++ b/components/src/tex-chtml-full/preload.js
@@ -5,5 +5,5 @@ Loader.preLoad(
   'core',
   'input/tex-full',
   'output/chtml', 'output/chtml/fonts/tex.js',
-  'ui/menu', 'a11y/assistive-mml'
+  'ui/menu'
 );
diff --git a/components/src/tex-chtml-full/tex-chtml-full.js b/components/src/tex-chtml-full/tex-chtml-full.js
index 12291be9..c3f59e6b 100644
--- a/components/src/tex-chtml-full/tex-chtml-full.js
+++ b/components/src/tex-chtml-full/tex-chtml-full.js
@@ -5,5 +5,4 @@ import '../input/tex-full/tex-full.js';
 import '../output/chtml/chtml.js';
 import '../output/chtml/fonts/tex/tex.js';
 import '../ui/menu/menu.js';
-import '../a11y/assistive-mml/assistive-mml.js';
 import '../startup/startup.js';
diff --git a/components/src/tex-chtml/preload.js b/components/src/tex-chtml/preload.js
index 89f110c5..5dae092f 100644
--- a/components/src/tex-chtml/preload.js
+++ b/components/src/tex-chtml/preload.js
@@ -5,5 +5,5 @@ Loader.preLoad(
   'core',
   'input/tex',
   'output/chtml', 'output/chtml/fonts/tex.js',
-  'ui/menu', 'a11y/assistive-mml'
+  'ui/menu'
 );
diff --git a/components/src/tex-chtml/tex-chtml.js b/components/src/tex-chtml/tex-chtml.js
index 8d98865e..4d100a48 100644
--- a/components/src/tex-chtml/tex-chtml.js
+++ b/components/src/tex-chtml/tex-chtml.js
@@ -5,5 +5,4 @@ import '../input/tex/tex.js';
 import '../output/chtml/chtml.js';
 import '../output/chtml/fonts/tex/tex.js';
 import '../ui/menu/menu.js';
-import '../a11y/assistive-mml/assistive-mml.js';
 import '../startup/startup.js';
diff --git a/components/src/tex-mml-chtml/preload.js b/components/src/tex-mml-chtml/preload.js
index 7adb6a3b..3945370f 100644
--- a/components/src/tex-mml-chtml/preload.js
+++ b/components/src/tex-mml-chtml/preload.js
@@ -5,5 +5,5 @@ Loader.preLoad(
   'core',
   'input/tex', 'input/mml',
   'output/chtml', 'output/chtml/fonts/tex.js',
-  'ui/menu', 'a11y/assistive-mml'
+  'ui/menu'
 );
diff --git a/components/src/tex-mml-chtml/tex-mml-chtml.js b/components/src/tex-mml-chtml/tex-mml-chtml.js
index 4167bd59..0b068dc6 100644
--- a/components/src/tex-mml-chtml/tex-mml-chtml.js
+++ b/components/src/tex-mml-chtml/tex-mml-chtml.js
@@ -6,5 +6,4 @@ import '../input/mml/mml.js';
 import '../output/chtml/chtml.js';
 import '../output/chtml/fonts/tex/tex.js';
 import '../ui/menu/menu.js';
-import '../a11y/assistive-mml/assistive-mml.js';
 import '../startup/startup.js';
diff --git a/components/src/tex-mml-svg/preload.js b/components/src/tex-mml-svg/preload.js
index 69d6a2c5..bad39af1 100644
--- a/components/src/tex-mml-svg/preload.js
+++ b/components/src/tex-mml-svg/preload.js
@@ -5,5 +5,5 @@ Loader.preLoad(
   'core',
   'input/tex', 'input/mml',
   'output/svg', 'output/svg/fonts/tex.js',
-  'ui/menu', 'a11y/assistive-mml'
+  'ui/menu'
 );
diff --git a/components/src/tex-mml-svg/tex-mml-svg.js b/components/src/tex-mml-svg/tex-mml-svg.js
index acff78dd..3ca4e6cf 100644
--- a/components/src/tex-mml-svg/tex-mml-svg.js
+++ b/components/src/tex-mml-svg/tex-mml-svg.js
@@ -6,5 +6,4 @@ import '../input/mml/mml.js';
 import '../output/svg/svg.js';
 import '../output/svg/fonts/tex/tex.js';
 import '../ui/menu/menu.js';
-import '../a11y/assistive-mml/assistive-mml.js';
 import '../startup/startup.js';
diff --git a/components/src/tex-svg-full/preload.js b/components/src/tex-svg-full/preload.js
index d4165cf8..8871781a 100644
--- a/components/src/tex-svg-full/preload.js
+++ b/components/src/tex-svg-full/preload.js
@@ -5,5 +5,5 @@ Loader.preLoad(
   'core',
   'input/tex-full',
   'output/svg', 'output/svg/fonts/tex.js',
-  'ui/menu', 'a11y/assistive-mml'
+  'ui/menu'
 );
diff --git a/components/src/tex-svg-full/tex-svg-full.js b/components/src/tex-svg-full/tex-svg-full.js
index 55ce32f2..09c7e65c 100644
--- a/components/src/tex-svg-full/tex-svg-full.js
+++ b/components/src/tex-svg-full/tex-svg-full.js
@@ -5,5 +5,4 @@ import '../input/tex-full/tex-full.js';
 import '../output/svg/svg.js';
 import '../output/svg/fonts/tex/tex.js';
 import '../ui/menu/menu.js';
-import '../a11y/assistive-mml/assistive-mml.js';
 import '../startup/startup.js';
diff --git a/components/src/tex-svg/preload.js b/components/src/tex-svg/preload.js
index 284ce317..3eb02665 100644
--- a/components/src/tex-svg/preload.js
+++ b/components/src/tex-svg/preload.js
@@ -5,5 +5,5 @@ Loader.preLoad(
   'core',
   'input/tex',
   'output/svg', 'output/svg/fonts/tex.js',
-  'ui/menu', 'a11y/assistive-mml'
+  'ui/menu'
 );
diff --git a/components/src/tex-svg/tex-svg.js b/components/src/tex-svg/tex-svg.js
index f4ce644e..5d8caa5c 100644
--- a/components/src/tex-svg/tex-svg.js
+++ b/components/src/tex-svg/tex-svg.js
@@ -5,5 +5,4 @@ import '../input/tex/tex.js';
 import '../output/svg/svg.js';
 import '../output/svg/fonts/tex/tex.js';
 import '../ui/menu/menu.js';
-import '../a11y/assistive-mml/assistive-mml.js';
 import '../startup/startup.js';
diff --git a/ts/ui/menu/Menu.ts b/ts/ui/menu/Menu.ts
index 7553aafc..ca0b9780 100644
--- a/ts/ui/menu/Menu.ts
+++ b/ts/ui/menu/Menu.ts
@@ -135,7 +135,7 @@ export class Menu {
       autocollapse: false,
       collapsible: false,
       inTabOrder: true,
-      assistiveMml: true,
+      assistiveMml: false,
       explorer: false
     },
     jax: {
@@ -475,7 +475,7 @@ export class Menu {
           this.command('Reset', 'Reset to defaults', () => this.resetDefaults())
         ]),
         this.submenu('Accessibility', 'Accessibility', [
-          this.checkbox('Activate', 'Activate', 'explorer'),
+          this.checkbox('Activate', 'Activate', 'explorer', {disabled: true}),
           this.submenu('Speech', 'Speech', [
             this.checkbox('Speech', 'Speech Output', 'speech'),
             this.checkbox('Subtitles', 'Speech Subtitles', 'subtitles'),
@@ -534,11 +534,11 @@ export class Menu {
             this.checkbox('Prefix', 'Prefix', 'infoPrefix')
           ], true),
           this.rule(),
-          this.checkbox('Collapsible', 'Collapsible Math', 'collapsible'),
+          this.checkbox('Collapsible', 'Collapsible Math', 'collapsible', {disabled: true}),
           this.checkbox('AutoCollapse', 'Auto Collapse', 'autocollapse', {disabled: true}),
           this.rule(),
           this.checkbox('InTabOrder', 'Include in Tab Order', 'inTabOrder'),
-          this.checkbox('AssistiveMml', 'Include Hidden MathML', 'assistiveMml')
+          this.checkbox('AssistiveMml', 'Include Hidden MathML', 'assistiveMml', {disabled: true})
         ]),
         this.submenu('Language', 'Language'),
         this.rule(),
@@ -722,6 +722,7 @@ export class Menu {
    * @param {boolean} mml   True to output hidden Mathml, false to not
    */
   protected setAssistiveMml(mml: boolean) {
+    mml = false;
     this.document.options.enableAssistiveMml = mml;
     if (!mml || (MathJax._.a11y && MathJax._.a11y['assistive-mml'])) {
       this.rerender();
@@ -734,6 +735,7 @@ export class Menu {
    * @param {boolean} explore   True to enable the explorer, false to not
    */
   protected setExplorer(explore: boolean) {
+    explore = false;
     this.enableExplorerItems(explore);
     this.document.options.enableExplorer = explore;
     if (!explore || (MathJax._.a11y && MathJax._.a11y.explorer)) {
@@ -747,6 +749,7 @@ export class Menu {
    * @param {boolean} collapse   True to enable collapsible math, false to not
    */
   protected setCollapsible(collapse: boolean) {
+    collapse = false;
     this.document.options.enableComplexity = collapse;
     if (!collapse || (MathJax._.a11y && MathJax._.a11y.complexity)) {
       this.rerender(STATE.COMPILED);
@@ -845,6 +848,8 @@ export class Menu {
    * @param {string} component   The name of the a11y component to load
    */
   public loadA11y(component: string) {
+    console.log ('ignoring load for', component);
+    return;
     const noEnrich = !STATE.ENRICHED;
     this.loadComponent('a11y/' + component, () => {
       const startup = MathJax.startup;