Anki is a smart spaced repetition flashcard program
Find a file
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
.buildkite Update n2 for Windows console fix; recommend it on Windows as well 2023-07-02 19:03:37 +10:00
.cargo Fix i18n build script not responding to env var changes 2023-07-04 17:17:41 +10:00
.config Drop workspace-hack in favor of workspace deps 2023-06-23 17:41:31 +10:00
.github/ISSUE_TEMPLATE Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.vscode.dist Allow im-/exporting with or without deck configs (#2804) 2023-11-13 13:54:41 +10:00
build Load MathJax's text-chtml-full component in reviewer/previewer (#2836) 2023-11-20 16:50:55 +10:00
cargo Update self_cell for UB fix 2023-11-12 10:40:33 +10:00
docs Tweaks to Windows build instructions 2023-11-20 11:59:08 +10:00
ftl Clarify learning steps recommendation (#2832) 2023-11-20 16:31:39 +10:00
proto Persist FSRS weights search in preset (#2827) 2023-11-14 11:47:08 +10:00
pylib Expose ImportAnkiPackageOptions (#2835) 2023-11-20 13:17:53 +10:00
python Update pip for CVE [action required] 2023-11-03 14:21:12 +10:00
qt Load MathJax's text-chtml-full component in reviewer/previewer (#2836) 2023-11-20 16:50:55 +10:00
rslib Fix FSRS retrievability sorting issues 2023-11-20 13:59:45 +10:00
sass Add scss formatter 2023-07-03 09:44:38 +10:00
tools Enable webview debugging in Qt5 scripts 2023-11-13 15:20:50 +10:00
ts Improve keyboard handling and accessibility for Select.svelte and refactor (#2811) 2023-11-21 14:23:18 +10:00
.deny.toml Integrate the FSRS optimizer (#2633) 2023-09-05 18:45:05 +10:00
.dprint.json Allow disabling occlusion mask border (#2764) 2023-10-23 11:43:37 +10:00
.eslintrc.js Enforce curly bracket usage for one-statement ifs 2023-10-23 09:19:49 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
.gitmodules Exclude PyOxidizer from recursive checkout 2023-07-02 18:22:44 +10:00
.isort.cfg Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.mypy.ini Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.pylintrc Add ability to restore a notetype to its original configuration (#2472) 2023-04-18 14:07:51 +10:00
.rustfmt-empty.toml Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.rustfmt.toml Move ascii_percent_encoding into a separate repo 2023-04-12 08:45:23 +10:00
.version Bump version to 23.12 2023-11-13 13:57:33 +10:00
Cargo.lock Fix broken bundling on Windows 11 2023-11-20 12:01:34 +10:00
Cargo.toml Update fsrs-rs 2023-11-13 10:13:20 +10:00
check Add a shortcut to auto-format before running checks 2023-07-02 09:59:05 +10:00
CONTRIBUTORS Fix switching of add & history buttons when selecting IO notetype (#2833) 2023-11-20 16:36:25 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
ninja Switch runner to release build 2023-07-02 10:31:07 +10:00
package.json Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
README.md Updated README (#2718) 2023-10-11 14:11:07 +10:00
run Fix webengine remote debugging in Qt6 2023-11-05 12:41:17 +10:00
run.bat Fix webengine remote debugging in Qt6 2023-11-05 12:41:17 +10:00
rust-toolchain.toml Rust 1.73 2023-10-09 19:22:43 +10:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
yarn.lock Bump @babel/traverse from 7.22.5 to 7.23.2 (#2746) 2023-10-18 09:17:26 +10:00

Anki

Build status

This repo contains the source code for the computer version of Anki.

About

Anki is a spaced repetition program. Please see the website to learn more.

Getting Started

Anki Betas

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see Anki betas

Developing

For more information on building and developing, please see Development.

Contributing

Want to contribute to Anki? Check out the Contribution Guidelines.

Anki Contributors

CONTRIBUTORS

License

Anki's license: LICENSE