anki/ts/deck-options
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
..
Addons.svelte Remove untranslated 'see old deck options' notice 2022-11-03 12:05:19 +10:00
AdvancedOptions.svelte Mention 'custom scheduling' and link to FSRS in manual 2023-10-28 12:47:55 +10:00
AudioOptions.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
BuryOptions.svelte Remove v1/v2 support from the backend (#2727) 2023-10-14 10:50:59 +10:00
CardStateCustomizer.svelte Integrate FSRS into Anki (#2654) 2023-09-16 16:09:26 +10:00
choices.ts Add auto-advance options to deck preset (#2765) 2023-11-13 10:41:51 +10:00
ConfigSelector.svelte Improve keyboard handling and accessibility for Select.svelte and refactor (#2811) 2023-11-21 14:23:18 +10:00
DailyLimits.svelte Allow applying limits of inactive parents (#2824) 2023-11-13 14:30:19 +10:00
deck-options-base.scss Add scss formatter 2023-07-03 09:44:38 +10:00
DeckOptionsPage.svelte Remove v1/v2 support from the backend (#2727) 2023-10-14 10:50:59 +10:00
DisplayOrder.svelte Use FSRS difficulty when sorting by ease 2023-09-23 16:20:36 +10:00
FsrsOptions.svelte Persist FSRS weights search in preset (#2827) 2023-11-14 11:47:08 +10:00
HtmlAddon.svelte fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
icons.ts Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
index.ts Add auto-advance options to deck preset (#2765) 2023-11-13 10:41:51 +10:00
LapseOptions.svelte Hide SM2-specific items in help pages when FSRS enabled 2023-10-13 11:00:51 +10:00
lib.test.ts Remove v1/v2 support from the backend (#2727) 2023-10-14 10:50:59 +10:00
lib.ts Allow applying limits of inactive parents (#2824) 2023-11-13 14:30:19 +10:00
NewOptions.svelte Remove v1/v2 support from the backend (#2727) 2023-10-14 10:50:59 +10:00
SaveButton.svelte Experiment with disabling prettier whitespace sensitivity 2023-06-01 11:11:26 +10:00
SpinBoxFloatRow.svelte Add auto-advance options to deck preset (#2765) 2023-11-13 10:41:51 +10:00
SpinBoxRow.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
steps.test.ts
steps.ts Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
StepsInput.svelte Refactor Select component | Fix CSV import issue (#2227) 2022-12-01 19:24:26 +10:00
StepsInputRow.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
TabbedValue.svelte Address a11y warning for TabbedValue (#2582) 2023-07-18 22:49:02 +10:00
TextInputModal.svelte Experiment with disabling prettier whitespace sensitivity 2023-06-01 11:11:26 +10:00
TimerOptions.svelte Add auto-advance options to deck preset (#2765) 2023-11-13 10:41:51 +10:00
tsconfig.json Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
Warning.svelte Add an info box so the non-linear nature of desired retention can be seen 2023-11-06 12:04:31 +10:00
WeightsInput.svelte Display the default weights as a placeholder 2023-09-30 16:10:23 +10:00
WeightsInputRow.svelte Display the default weights as a placeholder 2023-09-30 16:10:23 +10:00