anki/ts
Ben Olson 9a301665a4
Improve keyboard handling and accessibility for Select.svelte and refactor (#2811)
* resolve TagAddButton a11y
better comments to document tagindex reasoning

* resolved a11y for TagsSelectedButton
allow focus to TagsSelectedButton with Shift+Tab and Enter or Space to show popover

* safely ignore a11y warning as container for interactables is not itself interactable

* Update CONTRIBUTORS

* quick fix syntax

* quick fix syntax

* quick fix syntax

* quick fix syntax

* resolved a11y in accordance with ARIA APG Disclure pattern

* resolved a11y
ideally should replace with  with
a11y-click-events-have-key-events is explicitly ignored as the alternative (adding ) seems more clunky

* resolved SpinBox a11y
cannot focus on these buttons, so no key event handling needed (keyboard editting already possible by just typing in the field)
widget already properly follows ARIA APG Spinbutton pattern

* cleanup

* onEnterOrSpace() function implemented as discussed in #2787 and #2564

* I think this is the main keyboard handling of Select
Still need to fix focus and handle roles and attributes

* fixed the keyboard interaction

focus is janky because you need to wait until after the listed options load and for some reason that needs a tiny delay on onMount
I think this technically violates a11y, but it really doesn't since the delay is literally zero. But the code still needs it to happen.

* Select and SelectOption reference the same focus function

* SelectOption moved inside Select
+ started roles and a11y

* quick syntax and such changes

* finish handling roles and attributes

* fixed keyboard handling and only visual focus

* cleanup and slight refactoring

* fixed syntax

* what even is this?

* bug fixes + revert key selection

* fixed scrolling

* better control scrolling and focus

* Adjusted selection
Up/Down Arrows: start selection on active option
Enter/Space/Click: no initial selection, down arrow to first option, up arrow to last option

* Only set selected the first time Select is opened, all subsequent times use the previous selected
2023-11-21 14:23:18 +10:00
..
card-info Record FSRS difficulty in the review log 2023-09-17 11:50:38 +10:00
change-notetype Improve keyboard handling and accessibility for Select.svelte and refactor (#2811) 2023-11-21 14:23:18 +10:00
components Improve keyboard handling and accessibility for Select.svelte and refactor (#2811) 2023-11-21 14:23:18 +10:00
congrats Combine all backend methods into a single js/d.ts file, like in Python 2023-07-03 13:46:38 +10:00
deck-options Improve keyboard handling and accessibility for Select.svelte and refactor (#2811) 2023-11-21 14:23:18 +10:00
domlib Fix overwrite surround (#2247) 2022-12-09 10:10:58 +10:00
editable Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
editor Add tooltip to mask editor button 2023-11-03 21:55:38 +10:00
fields Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
graphs Handle stability < 0.5 in stability graph 2023-11-05 13:44:39 +10:00
html-filter Detect incorrect usage of triple slash in TypeScript (#2524) 2023-05-26 12:49:44 +10:00
icons Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
image-occlusion Fix misalignment of IO masks in Qt5 when image is vertically long (#2829) 2023-11-16 10:30:54 +10:00
import-anki-package Allow im-/exporting with or without deck configs (#2804) 2023-11-13 13:54:41 +10:00
import-csv Improve keyboard handling and accessibility for Select.svelte and refactor (#2811) 2023-11-21 14:23:18 +10:00
import-page Hide show/close buttons on mobile 2023-09-19 13:14:54 +10:00
lib Resolve a11y for tag options buttons (#2787) 2023-11-14 11:40:04 +10:00
mathjax Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
reviewer Fix misalignment of IO masks in Qt5 when image is vertically long (#2829) 2023-11-16 10:30:54 +10:00
sveltelib Apply Svelte typing fix from Abdo 2023-09-20 16:02:27 +10:00
tag-editor Resolve a11y for tag options buttons (#2787) 2023-11-14 11:40:04 +10:00
tools Fix some build steps being re-run a second time unnecessarily 2023-11-13 13:35:54 +10:00
.gitignore
bundle_svelte.mjs Fix a deprecation warning in Svelte 2023-08-23 11:05:14 +10:00
bundle_ts.mjs Add env var to enable sourcemaps 2022-12-04 11:37:16 +10:00
esbuild_jest.mjs Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
jest.config.js Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
licenses.json Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
page.html Load page script after body created (#1802) 2022-04-19 17:16:56 +10:00
README.md
transform_ts.mjs Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
tsconfig.json Migrate to protobuf-es (#2547) 2023-06-14 22:47:37 +10:00
yarn.sh Fix yarn.sh failing with linked out folder 2023-03-31 13:08:59 +10:00

Anki's TypeScript and Sass dependencies. Some TS/JS code is also stored separately in ../qt/aqt/data/web/.

To update all dependencies:

./update.sh

To add a new dev dependency, use something like:

./add.sh -D @rollup/plugin-alias