Anki is a smart spaced repetition flashcard program
Find a file
Rastislav Kish e985fec9c4
A11Y: Improve the accessibility of the Preferences dialog (#3255)
* Configure buddy widgets for labels in the Preferences dialog

Labels are often used to describe the purpose of a different widget like a combobox, edit field or a spinbox by providing a textual name for their functionality. The relation between a label and a widget is typically expressed by placing the label next to the relevant object. In addition to this visual linking intended for human users, frameworks usually also offer semantic way to link labels with other widgets, so the relation can be noticed by programs like screenreaders, which can figure out the correct textual description for the focused widgets based on this information.

By default, labels on their own are not focusable elements, so users dependend on keyboard navigation and speech get to notice only the widget types (textbox, spinbox, etc.) while moving around without any contextual information if labels are not linked. When the linking is done, the component names get included as well.

QT provides the "buddy" property for QLabel, which creates a semantic link between the label and its buddy widget.

This commit configures the buddy properties on labels of the Anki Preferences dialog.

* Configure spinbox suffixes in Preferrences dialog

QSpinBox provides a suffix property. This property makes it possible to display a measurement unit next to the component value, which is linked to it both visually and semantically for the GUI framework without affecting the spinbox value itself. For purposes of accessibility, it's better to use this property than simply place a label next to the component, since it can be directly accessed by screenreaders and other assistive technology.

This commit configures suffix properties for spinboxes in the Anki Preferences dialog. Note: Removal of the original unit labels may have altered the UI a little bit.

* Assign buddy widgets in the ID and password retrieval dialog

Set buddy widgets of the labels in the Get ID and password for synchronization dialog.

* Fix positioning/size of text boxes

* Style the suffixes of Preferences' QSpinBoxes

Style QSpinBox suffixes (for those that have one) in the Preferences dialog by prepending them by a space character.
2024-07-10 19:58:47 +07:00
.buildkite Ensure runner gets rebuilt in Mac CI 2024-04-17 20:23:50 +10:00
.cargo Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01: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 HMR on Windows (#3144) 2024-04-17 21:23:34 +10:00
build Fix remaining accessibility warnings (#3241) 2024-07-10 19:55:08 +07:00
cargo Update axum/reqwest for hyper 1.0 2024-07-06 18:45:32 +07:00
docs Update instructions for Debian 12 2024-04-04 16:34:57 +07:00
ftl Update translations 2024-07-06 19:08:03 +07:00
proto Add a preference to toggle LaTeX generation (#3218) 2024-06-01 09:26:28 +01:00
pylib Bump Python deps 2024-07-06 18:40:37 +07:00
python Bump Python deps 2024-07-06 18:40:37 +07:00
qt A11Y: Improve the accessibility of the Preferences dialog (#3255) 2024-07-10 19:58:47 +07:00
rslib Update axum/reqwest for hyper 1.0 2024-07-06 18:45:32 +07:00
tools Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
ts Fix remaining accessibility warnings (#3241) 2024-07-10 19:55:08 +07:00
.deny.toml Fix cargo deny in CI 2024-02-24 15:22:57 +07:00
.dprint.json Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
.eslintrc.cjs Include error message text on page 2024-06-24 15:35:47 +07:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01: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 Use system certificate store (#3050) 2024-03-04 05:48:16 +00: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 24.06.3 2024-06-24 14:55:43 +07:00
Cargo.lock Update axum/reqwest for hyper 1.0 2024-07-06 18:45:32 +07:00
Cargo.toml Update axum/reqwest for hyper 1.0 2024-07-06 18:45:32 +07:00
check Add a shortcut to auto-format before running checks 2023-07-02 09:59:05 +10:00
CONTRIBUTORS A11Y: Improve the accessibility of the Preferences dialog (#3255) 2024-07-10 19:58:47 +07:00
LICENSE Replace css_browser_selector with our own implementation (#2854) 2023-11-30 10:57:33 +10:00
ninja Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
package.json Fix remaining accessibility warnings (#3241) 2024-07-10 19:55:08 +07: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 HMR on Windows (#3144) 2024-04-17 21:23:34 +10:00
rust-toolchain.toml Update Rust + Rust deps 2024-07-06 18:40:38 +07:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
yarn Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
yarn.bat Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
yarn.lock Update web deps 2024-07-06 18:40:37 +07: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