Anki/qt/aqt/forms
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
..
__init__.py Adjust HTML editor / add-on config editor font (#3054) 2024-03-05 07:29:05 +00:00
about.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
about.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
addcards.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
addcards.ui Remove unused actions from ui files (#1655) 2022-02-11 10:15:36 +10:00
addfield.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
addfield.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
addmodel.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
addmodel.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
addonconf.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
addonconf.ui Use a webview to show add-on's config help (#2281) 2022-12-21 16:55:31 +10:00
addons.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
addons.ui Increase initial add-on dialog size 2022-12-09 12:36:28 +10:00
browser.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
browser.ui Allow burying cards in browser (#2351) 2023-01-30 19:21:06 +10:00
browserdisp.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
browserdisp.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
browseropts.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
browseropts.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
changemap.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
changemap.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
changemodel.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
changemodel.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
clayout_top.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
clayout_top.ui Add minimumContentsLength property to templatesBox (#1781) 2022-04-09 13:55:03 +10:00
customstudy.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
customstudy.ui Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
dconf.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
dconf.ui Improve hover feedback on various widgets (#2079) 2022-09-20 16:34:15 +10:00
debug.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
debug.ui Start debug console with text area focused 2023-03-22 15:52:55 +10:00
editcurrent.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
editcurrent.ui Turn edit window into a QMainWindow (#2732) 2023-10-14 10:29:57 +10:00
edithtml.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
edithtml.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
emptycards.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
emptycards.ui Improve hover feedback on various widgets (#2079) 2022-09-20 16:34:15 +10:00
exporting.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
exporting.ui Allow im-/exporting with or without deck configs (#2804) 2023-11-13 13:54:41 +10:00
fields.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
fields.ui Add option to exclude fields from search (#2394) 2023-03-20 07:46:03 +10:00
filtered_deck.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
filtered_deck.ui Use seconds instead of minutes for preview delay 2023-12-21 11:02:29 +10:00
finddupes.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
finddupes.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
findreplace.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
findreplace.ui fixed and tested issue #2608 (#2611) 2023-08-16 07:26:50 +10:00
forget.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
forget.ui Improve hover feedback on various widgets (#2079) 2022-09-20 16:34:15 +10:00
getaddons.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
getaddons.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
importing.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
importing.ui Improve hover feedback on various widgets (#2079) 2022-09-20 16:34:15 +10:00
main.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
main.ui Remove empty cards shortcut 2024-05-27 05:14:27 +07:00
modelopts.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
modelopts.ui Improve hover feedback on various widgets (#2079) 2022-09-20 16:34:15 +10:00
models.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
models.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
preferences.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
preferences.ui A11Y: Improve the accessibility of the Preferences dialog (#3255) 2024-07-10 19:58:47 +07:00
preview.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
preview.ui Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
profiles.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
profiles.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
progress.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
progress.ui update designer references 2020-11-17 19:55:18 +10:00
reposition.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
reposition.ui Improve hover feedback on various widgets (#2079) 2022-09-20 16:34:15 +10:00
setgroup.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
setgroup.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
setlang.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
setlang.ui Revamp Preferences, implement Minimalist Mode and Qt widget gallery to test GUI changes (#2289) 2023-01-18 21:24:16 +10:00
stats.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
stats.ui Make stats title translatable 2023-06-07 16:25:35 +10:00
studydeck.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
studydeck.ui update TR references in .ui files 2021-03-26 15:03:51 +10:00
synclog.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
synclog.ui Refactor media sync handling (#2647) 2023-09-10 13:22:20 +10:00
taglimit.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
taglimit.ui Improve hover feedback on various widgets (#2079) 2022-09-20 16:34:15 +10:00
template.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
template.ui Add separate styling for template editor QGroupBoxes (#2337) 2023-01-19 21:14:52 +10:00
widgets.py Fix code completion in Qt forms (#2993) 2024-02-08 15:24:12 +10:00
widgets.ui Revamp Preferences, implement Minimalist Mode and Qt widget gallery to test GUI changes (#2289) 2023-01-18 21:24:16 +10:00