Commit2228c49unknown_key
fix: add aria-label to inputs and fix heading hierarchy for accessibility
fix: add aria-label to inputs and fix heading hierarchy for accessibility
- dashboard.tsx: add aria-label={label} to ToggleSwitch checkbox input
- developer-apps.tsx: add aria-label to confidential client checkbox
- discussions.tsx: add aria-label to title input; promote Comments h3 to h2
- editor.tsx: add aria-label to filename and commit message inputs
- environments.tsx: add aria-label to all unlabelled inputs (reviewers, wait timer, allowed branches, name)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: ccantynz-alt <251062557+ccantynz-alt@users.noreply.github.com>5 files changed+14−32228c4919a1a77093d0e075c8351344a6e290120
5 changed files+14−3
Modifiedsrc/routes/dashboard.tsx+1−1View fileUnifiedSplit
@@ -595,7 +595,7 @@ const ToggleSetting = ({
595595 </div>
596596 </div>
597597 <label class="toggle-switch">
598 <input type="checkbox" name={name} value="on" checked={defaultChecked} />
598 <input type="checkbox" name={name} value="on" checked={defaultChecked} aria-label={label} />
599599 <span class="toggle-slider" />
600600 </label>
601601 </div>
Modifiedsrc/routes/developer-apps.tsx+1−0View fileUnifiedSplit
@@ -205,6 +205,7 @@ apps.get("/settings/applications/new", async (c) => {
205205 name="confidential"
206206 value="on"
207207 checked
208 aria-label="Confidential client"
208209 />
209210 {" "}Confidential client (server-side app)
210211 </label>
Modifiedsrc/routes/discussions.tsx+2−1View fileUnifiedSplit
@@ -205,6 +205,7 @@ discussionRoutes.get(
205205 name="title"
206206 placeholder="Title"
207207 required
208 aria-label="Discussion title"
208209 style="padding: 8px;"
209210 />
210211 <select name="category" style="padding: 8px;">
@@ -349,7 +350,7 @@ discussionRoutes.get(
349350 }}
350351 />
351352 </article>
352 <h3 style="margin-top: 32px;">{comments.length} Comments</h3>
353 <h2 style="margin-top: 32px;">{comments.length} Comments</h2>
353354 {comments.map((com) => {
354355 const isAnswer = com.c.id === discussion.d.answerCommentId;
355356 return (
Modifiedsrc/routes/editor.tsx+3−0View fileUnifiedSplit
@@ -64,6 +64,7 @@ editor.get("/:owner/:repo/new/:ref{.+$}", requireAuth, requireRepoAccess("write"
6464 placeholder="filename.ts"
6565 style="flex: 1"
6666 autocomplete="off"
67 aria-label="File path"
6768 />
6869 </Flex>
6970 </FormGroup>
@@ -81,6 +82,7 @@ editor.get("/:owner/:repo/new/:ref{.+$}", requireAuth, requireRepoAccess("write"
8182 name="message"
8283 placeholder="Create new file"
8384 required
85 aria-label="Commit message"
8486 />
8587 </FormGroup>
8688 <Button type="submit" variant="primary">
@@ -232,6 +234,7 @@ editor.get("/:owner/:repo/edit/:ref{.+$}", requireAuth, requireRepoAccess("write
232234 name="message"
233235 placeholder={`Update ${filePath.split("/").pop()}`}
234236 required
237 aria-label="Commit message"
235238 />
236239 </FormGroup>
237240 <Flex gap={8}>
Modifiedsrc/routes/environments.tsx+7−1View fileUnifiedSplit
@@ -200,6 +200,7 @@ r.get("/:owner/:repo/settings/environments", requireAuth, async (c) => {
200200 name="reviewers"
201201 value={reviewers.join(", ")}
202202 placeholder="alice, bob"
203 aria-label="Reviewers"
203204 />
204205 </div>
205206 <div class="form-group" style="margin: 0">
@@ -210,6 +211,7 @@ r.get("/:owner/:repo/settings/environments", requireAuth, async (c) => {
210211 min="0"
211212 max="1440"
212213 value={String(env.waitTimerMinutes)}
214 aria-label="Wait timer in minutes"
213215 style="width: 120px"
214216 />
215217 </div>
@@ -220,6 +222,7 @@ r.get("/:owner/:repo/settings/environments", requireAuth, async (c) => {
220222 name="allowedBranches"
221223 value={branches.join(", ")}
222224 placeholder="main, release/*"
225 aria-label="Allowed branches"
223226 />
224227 </div>
225228 <div style="display: flex; justify-content: flex-end">
@@ -252,6 +255,7 @@ r.get("/:owner/:repo/settings/environments", requireAuth, async (c) => {
252255 name="name"
253256 required
254257 placeholder="production"
258 aria-label="Environment name"
255259 />
256260 </div>
257261 <div class="form-group">
@@ -267,7 +271,7 @@ r.get("/:owner/:repo/settings/environments", requireAuth, async (c) => {
267271 </div>
268272 <div class="form-group">
269273 <label>Reviewers (comma-separated usernames)</label>
270 <input type="text" name="reviewers" placeholder="alice, bob" />
274 <input type="text" name="reviewers" placeholder="alice, bob" aria-label="Reviewers" />
271275 </div>
272276 <div class="form-group">
273277 <label>Wait timer (minutes)</label>
@@ -277,6 +281,7 @@ r.get("/:owner/:repo/settings/environments", requireAuth, async (c) => {
277281 min="0"
278282 max="1440"
279283 value="0"
284 aria-label="Wait timer in minutes"
280285 style="width: 120px"
281286 />
282287 </div>
@@ -286,6 +291,7 @@ r.get("/:owner/:repo/settings/environments", requireAuth, async (c) => {
286291 type="text"
287292 name="allowedBranches"
288293 placeholder="main, release/*"
294 aria-label="Allowed branches"
289295 />
290296 </div>
291297 <button type="submit" class="btn btn-primary">
292298