Skip to content

Commit

Permalink
a11y improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Oct 12, 2022
1 parent 2347b92 commit 1251ca2
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
parser: "@typescript-eslint/parser",
extends: ["standard", "eslint:recommended", "plugin:promise/recommended", "plugin:prettier/recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:svelte/recommended"],
plugins: ["@typescript-eslint"],
ignorePatterns: ["/node_modules/*", "/dist/*", "/build/*"],
ignorePatterns: ["/node_modules/*", "/dist/*", "/build/*", "/core/*"],
parserOptions: {
ecmaVersion: 12,
extraFileExtensions: [".svelte"],
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install modules
run: npm ci
- name: Run Lint
run: npm run check
1 change: 1 addition & 0 deletions interface/utils/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable no-unused-vars */
/// <reference types="svelte" />

declare global {
/* Authme Import file structure */
Expand Down
4 changes: 2 additions & 2 deletions interface/windows/confirm/confirm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<h5>Password</h5>
<div class="flex items-center justify-center">
<input class="input passwordInput mt-1" type="password" />
<svg xmlns="http://www.w3.org/2000/svg" on:click={showPassword} viewBox="0 0 24 24" fill="currentColor" class="showPassword relative right-9 top-0.5 h-6 w-6 cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" on:keypress={showPassword} on:click={showPassword} viewBox="0 0 24 24" fill="currentColor" class="showPassword relative right-9 top-0.5 h-6 w-6 cursor-pointer">
<path d="M12 15a3 3 0 100-6 3 3 0 000 6z" />
<path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" on:click={showPassword} viewBox="0 0 24 24" fill="currentColor" class="hidePassword relative right-9 top-0.5 hidden h-6 w-6 cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" on:keypress={showPassword} on:click={showPassword} viewBox="0 0 24 24" fill="currentColor" class="hidePassword relative right-9 top-0.5 hidden h-6 w-6 cursor-pointer">
<path d="M3.53 2.47a.75.75 0 00-1.06 1.06l18 18a.75.75 0 101.06-1.06l-18-18zM22.676 12.553a11.249 11.249 0 01-2.631 4.31l-3.099-3.099a5.25 5.25 0 00-6.71-6.71L7.759 4.577a11.217 11.217 0 014.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113z" />
<path d="M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0115.75 12zM12.53 15.713l-4.243-4.244a3.75 3.75 0 004.243 4.243z" />
<path d="M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 00-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 016.75 12z" />
Expand Down
8 changes: 4 additions & 4 deletions interface/windows/landing/landing.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
<h5>Password</h5>
<div class="flex items-center justify-center">
<input class="input passwordInput0 mt-1" type="password" />
<svg xmlns="http://www.w3.org/2000/svg" on:click={() => showPassword(0)} viewBox="0 0 24 24" fill="currentColor" class="showPassword0 relative right-9 top-0.5 h-6 w-6 cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" on:click={() => showPassword(0)} on:keypress={() => showPassword(0)} viewBox="0 0 24 24" fill="currentColor" class="showPassword0 relative right-9 top-0.5 h-6 w-6 cursor-pointer">
<path d="M12 15a3 3 0 100-6 3 3 0 000 6z" />
<path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" on:click={() => showPassword(0)} viewBox="0 0 24 24" fill="currentColor" class="hidePassword0 relative right-9 top-0.5 hidden h-6 w-6 cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" on:click={() => showPassword(0)} on:keypress={() => showPassword(0)} viewBox="0 0 24 24" fill="currentColor" class="hidePassword0 relative right-9 top-0.5 hidden h-6 w-6 cursor-pointer">
<path d="M3.53 2.47a.75.75 0 00-1.06 1.06l18 18a.75.75 0 101.06-1.06l-18-18zM22.676 12.553a11.249 11.249 0 01-2.631 4.31l-3.099-3.099a5.25 5.25 0 00-6.71-6.71L7.759 4.577a11.217 11.217 0 014.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113z" />
<path d="M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0115.75 12zM12.53 15.713l-4.243-4.244a3.75 3.75 0 004.243 4.243z" />
<path d="M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 00-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 016.75 12z" />
Expand All @@ -75,11 +75,11 @@
<h5>Confirm password</h5>
<div class="flex items-center justify-center">
<input class="input passwordInput1 mt-1" type="password" />
<svg xmlns="http://www.w3.org/2000/svg" on:click={() => showPassword(1)} viewBox="0 0 24 24" fill="currentColor" class="showPassword1 relative right-9 top-0.5 h-6 w-6 cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" on:click={() => showPassword(1)} on:keypress={() => showPassword(0)} viewBox="0 0 24 24" fill="currentColor" class="showPassword1 relative right-9 top-0.5 h-6 w-6 cursor-pointer">
<path d="M12 15a3 3 0 100-6 3 3 0 000 6z" />
<path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" on:click={() => showPassword(1)} viewBox="0 0 24 24" fill="currentColor" class="hidePassword1 relative right-9 top-0.5 hidden h-6 w-6 cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" on:click={() => showPassword(1)} on:keypress={() => showPassword(0)} viewBox="0 0 24 24" fill="currentColor" class="hidePassword1 relative right-9 top-0.5 hidden h-6 w-6 cursor-pointer">
<path d="M3.53 2.47a.75.75 0 00-1.06 1.06l18 18a.75.75 0 101.06-1.06l-18-18zM22.676 12.553a11.249 11.249 0 01-2.631 4.31l-3.099-3.099a5.25 5.25 0 00-6.71-6.71L7.759 4.577a11.217 11.217 0 014.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113z" />
<path d="M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0115.75 12zM12.53 15.713l-4.243-4.244a3.75 3.75 0 004.243 4.243z" />
<path d="M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 00-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 016.75 12z" />
Expand Down
126 changes: 124 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"dev": "node scripts/server.js",
"build": "node scripts/buildNumber.cjs alpha false && tauri build",
"build:alpha": "node scripts/buildNumber.cjs alpha false && tauri build",
"build:bundle": "node scripts/build.js"
"build:bundle": "node scripts/build.js",
"check": "svelte-check && tsc --noEmit && eslint ."
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
Expand All @@ -37,6 +38,7 @@
"prettier": "^2.7.0",
"prettier-plugin-tailwindcss": "^0.1.13",
"svelte": "^3.50.1",
"svelte-check": "^2.9.2",
"svelte-preprocess": "^4.10.7",
"tailwindcss": "^3.1.8",
"tinro": "^0.6.12",
Expand Down
2 changes: 1 addition & 1 deletion scripts/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ esbuild
onRebuild(error, result) {
clients.forEach((res) => res.write("data: update\n\n"))
clients.length = 0
console.log(error || "Hot reload complete")
console.log(error ? `[reload] Hot reload: ${error}` : "[reload] Hot reload complete")
},
},
})
Expand Down

0 comments on commit 1251ca2

Please sign in to comment.