-
Notifications
You must be signed in to change notification settings - Fork 26
/
index.htm
264 lines (209 loc) · 11.9 KB
/
index.htm
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
<!DOCTYPE html>
<html>
<head>
<title class="applicationTitle">Koa11y</title>
<link rel="icon" type="image/x-icon" href="_img/fav.ico">
<!--
<link rel="stylesheet" href="_style/ven.bootstrap.css">
<link rel="stylesheet" href="_style/ven.bootswatch/flatly.min.css">
-->
<link rel="stylesheet" href="_style/style.css">
</head>
<body><div id="app">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand">
<img src="_img/logo.png" alt="Logo" />
<span class="applicationTitle">Koa11y</span>
</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="#about" @click="aboutModal = true">About</a></li>
<li><a href="#exit" @click="nw.Window.get().close()">Exit</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<!--
/////////////////////////////////////////////////////////////////
// //
// APPLICATION NAME AND DESCRIPTION //
// //
/////////////////////////////////////////////////////////////////
// This is automatically replaced by the content in your //
// package.json file. //
/////////////////////////////////////////////////////////////////
-->
<div class="container" role="main">
<header>
<h3>
<!--
<span class="applicationTitle">Koa11y</span>
<small class="applicationDescription">A GUI for running Pa11y.</small>
-->
</h3>
</header>
<section>
<form id="pa11y" role="form-inline">
<div class="row">
<div class="col-xs-12 col-s-12 col-md-12 col-l-12">
<label for="url">URL:</label>
<input type="text" class="form-control" required="required" v-model="url" @keyup="urlKeyup" @change="urlKeyup" />
</div>
</div>
<div class="row">
<div class="col-xs-12 col-s-12 col-md-12 col-l-12 form-group">
<label for="output">Filename (will overwrite existing files):</label>
<div class="input-group">
<input id="output" @change="unlockRun" @keyup="unlockRun" v-model="outputFileName" type="text" class="form-control" required="required" />
<div id="output-btn" class="input-group-addon btn-group">
<button id="outputtype" class="btn btn-success dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ outputTypeName() }} <span class="caret"></span></button>
<ul class="dropdown-menu" aria-labelledby="outputtype">
<li><input type="radio" name="outputtype" v-model="outputType" @change="dropdownChanged" value="html" id="html" /><label for="html" >HTML</label></li>
<li><input type="radio" name="outputtype" v-model="outputType" @change="dropdownChanged" value="csv" id="csv" /><label for="csv" >CSV</label></li>
<li><input type="radio" name="outputtype" v-model="outputType" @change="dropdownChanged" value="json" id="json" /><label for="json" >JSON</label></li>
<li><input type="radio" name="outputtype" v-model="outputType" @change="dropdownChanged" value="md" id="md" /><label for="md" >Markdown</label></li>
<li><input type="radio" name="outputtype" v-model="outputType" @change="dropdownChanged" value="xml" id="xml" /><label for="xml" >XML</label></li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-s-6 col-md-6 col-l-6">
<label>Standards Format:</label><br />
<button data-toggle="dropdown" class="btn btn-success dropdown-toggle">{{ standardName() }} <span class="caret"></span></button>
<ul id="standard" class="dropdown-menu">
<li><input type="radio" name="standard" v-model="standard" @change="dropdownChanged" value="section" id="section" /><label for="section" >{{ standards.section }}</label></li>
<li><input type="radio" name="standard" v-model="standard" @change="dropdownChanged" value="wcaga" id="wcaga" /><label for="wcaga" >{{ standards.wcaga }}</label></li>
<li><input type="radio" name="standard" v-model="standard" @change="dropdownChanged" value="wcagaa" id="wcagaa" /><label for="wcagaa" >{{ standards.wcagaa }} (default)</label></li>
<li><input type="radio" name="standard" v-model="standard" @change="dropdownChanged" value="wcagaaa" id="wcagaaa" /><label for="wcagaaa" >{{ standards.wcagaaa }}</label></li>
</ul>
</div>
<div class="col-xs-6 col-s-6 col-md-6 col-l-6">
<label for="folderPicker">Output Folder:</label>
<input class="form-control folderPicker" v-model="folderPicker" @change="outputFolderChanged" type="text" id="folderPicker" required="required" />
<span class="glyphicon glyphicon-folder-open pull-right outputFolderIcon" title="Browse" @click="outputFolderIcon"></span>
<input class="hide" @change="outputFolderSet" type="file" id="outputFolderBrowse" ref="outputFolderBrowse" nwdirectory="nwdirectory" nwworkingdir="..." />
</div>
</div>
<div class="row" id="imageAltsSection">
<div class="col-xs-12 col-s-12 col-md-12 col-l-12">
<label for="imagealts">Image Accessibility:</label>
<p><button @click="clipboard" class="btn btn-sm btn-primary">Copy the console code</button> Paste this code in your browser's console and press enter. It will give you code you can paste into the box below, then click "Run".</p>
<textarea id="imagealts" @change="unlockRun" @keyup="unlockRun" v-model="imageAlts" class="form-control"></textarea>
</div>
</div>
<div class="row" id="button-row">
<div class="col-xs-12 col-s-12 col-md-12 col-l-12 text-left" style="vertical-align: middle">
<span id="button-badges">
<button class="btn btn-sm btn-danger" :class="{'disabled': !errorsButton}" @click="toggleButton('errorsButton')">
Errors <span class="badge">{{ badges.errors }}</span>
</button>
<button class="btn btn-sm btn-warning" :class="{'disabled': !warningsButton}" @click="toggleButton('warningsButton')">
Warnings <span class="badge">{{ badges.warnings }}</span>
</button>
<button class="btn btn-sm btn-primary" :class="{'disabled': !noticesButton}" @click="toggleButton('noticesButton')">
Notices <span class="badge">{{ badges.notices }}</span>
</button>
</span>
<button type="submit" id="run" class="btn btn-primary pull-right" :disabled="submitAllowed">Run!</button>
</div>
</div>
</form>
<hr />
<div id="results" class="row"></div>
<div class="row notifications" v-html="notifications"></div>
</section>
<!--
/////////////////////////////////////////////////////////////////
// //
// ABOUT MODAL //
// //
/////////////////////////////////////////////////////////////////
-->
<modal v-if="aboutModal" @close="aboutModal = false">
<h4 slot="header">About</h4>
<div slot="body" class="panel panel-primary">
<div class="panel-heading">
<span class="pull-right badge" :title="'Version ' + version">v {{ version }}</span>
<h3 class="panel-title">About Koa11y</h3>
</div>
<div class="panel-body">
<p class="well well-sm">
This program will load an invisible (headless) browser and go to the URL you've supplied to test the page for accessibility issues. Then it outputs any issues to a file.
</p>
<p>
Contributors to Koa11y:
<span v-for="(contributor, index) in contributors">
<a @click="externalLink(contributor.url)" href="#">{{ contributor.name }}</a><span v-if="index < contributors.length - 1">, </span>
</span>.<br />
Koala Logo designed by <a href="mailto:[email protected]" title="[email protected]" class="external-link">Charlotte Schmidt</a>.<br /><br />
Koa11y is completely open source and built upon other open source technologies. Koa11y is made with
<span v-for="(tech, index) in technologies">
<a @click="externalLink(tech.url)" href="#">{{ tech.name }}</a><span v-if="index < technologies.length - 1">, </span>
</span>.
</p>
<p class="text-center">
<a href="https://open-indy.github.io/Koa11y" @click="externalLink('https://open-indy.github.io/Koa11y')">Visit the Koa11y website.</a>
</p>
</div>
</div>
</modal>
<div id="spinner" style="display: none;">
<div class="stage">
<div class="cube">
<div class="side side1"></div>
<div class="side side2"></div>
<div class="side side3"></div>
<div class="side side4"></div>
</div>
</div>
</div>
<div id="imageAltsModal" class="modal" style="display: none">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<span class="glyphicon glyphicon-remove pull-right" data-dismiss="modal" aria-hidden="true"></span>
<h4>Image Alts</h4>
</div>
<div class="modal-body">
<div id="imageAltsThumbs"></div>
<div id="imageAltsDonut" class="donut-size">
<div class="pie-wrapper">
<span class="label">
<span class="num">0</span><span class="smaller">%</span>
</span>
<div class="pie">
<div class="left-side half-circle"></div>
<div class="right-side half-circle"></div>
</div>
<div class="shadow"></div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success pull-right disabled">Continue</button>
</div>
</div>
</div>
</div>
<test></test>
</div> <!-- end container -->
<script type="text/javascript" src="node_modules/vue/dist/vue.min.js"></script>
<script type="text/javascript" src="node_modules/http-vue-loader/src/httpVueLoader.js"></script>
<script type="text/javascript" src="_scripts/ven.jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="_scripts/ven.bootstrap-3.2.0.min.js"></script>
<script type="text/javascript" src="_scripts/ven.simple-donut.js"></script>
<script type="text/javascript" src="_scripts/app.js"></script>
<script type="text/javascript" src="_scripts/delete-settings.js"></script>
</div></body>
</html>