Anki/CONTRIBUTORS
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

211 lines
8.5 KiB
Text

If you have made changes to Anki's AGPL code, you are welcome to distribute
the changed code under the AGPL license.
If you would like to contribute your code back to the official release, we ask
that you license your contributions under the BSD 3 clause license. Portions
of the code are also used in AnkiWeb and AnkiMobile, and accepting
contributions under an AGPL license would mean we could no longer use the code
we have written in those projects.
In your first pull request, please add your name below. By adding your name to
this file, you assert that any code you contribute to the Anki project is
licensed under the BSD 3 clause license. If any pull request you make contains
code that you don't own the copyright to, you agree to make that clear when
submitting the request.
When submitting a pull request, GitHub Actions will check that the Git email you
are submitting from matches the one you used to edit this file. A common issue
is adding yourself to this file using the username on your computer, but then
using GitHub to rebase or edit a pull request online. This will result in your
Git email becoming something like user@noreply.github.com. To prevent the
automatic check from failing, you can edit this file again using GitHub's online
editor, making a trivial edit like adding a space after your name, and then pull
requests will work regardless of whether you create them using your computer or
GitHub's online interface.
For users who previously confirmed the license of their contributions on the
support site, it would be great if you could add your name below as well.
********************
AMBOSS MD Inc. <https://www.amboss.com/>
Aristotelis P. <https://glutanimate.com/contact>
Erez Volk <erez.volk@gmail.com>
zjosua <zjosua@hotmail.com>
Arthur Milchior <arthur@milchior.fr>
Yngve Hoiseth <yngve@hoiseth.net>
Ijgnd
Yoonchae Lee <bluegreenmagick@gmail.com>
Evandro Coan <github.com/evandrocoan>
Alan Du <alanhdu@gmail.com>
Yuchen Lei <lyc@xuming.studio>
Henry Tang <hktang@ualberta.ca>
Simone Gaiarin <simgunz@gmail.com>
Rai (Michal Pokorny) <agentydragon@gmail.com>
Zeno Gantner <zeno.gantner@gmail.com>
Henrik Giesel <hengiesel@gmail.com>
Michał Bartoszkiewicz <mbartoszkiewicz@gmail.com>
Sander Santema <github.com/sandersantema/>
Thomas Brownback <https://github.com/brownbat/>
Andrew Gaul <andrew@gaul.org>
kenden
Nickolay Yudin <kelciour@gmail.com>
neitrinoweb <github.com/neitrinoweb/>
Andreas Reis <github.com/nwwt>
Matt Krump <github.com/mkrump>
Alexander Presnyakov <flagist0@gmail.com>
Abdo <github.com/abdnh>
aplaice <plaice.adam+github@gmail.com>
phwoo <github.com/phwoo>
Soren Bjornstad <anki@sorenbjornstad.com>
Aleksa Sarai <cyphar@cyphar.com>
Jakub Kaczmarzyk <jakub.kaczmarzyk@gmail.com>
Akshara Balachandra <akshara.bala.18@gmail.com>
lukkea <github.com/lukkea/>
David Allison <davidallisongithub@gmail.com>
Tsung-Han Yu <johan456789@gmail.com>
Piotr Kubowicz <piotr.kubowicz@gmail.com>
RumovZ <gp5glkw78@relay.firefox.com>
Cecini <github.com/cecini>
Krish Shah <github.com/k12ish>
ianki <iankigit@gmail.com>
rye761 <ryebread761@gmail.com>
Guillem Palau Salvà <guillempalausalva@gmail.com>
Meredith Derecho <meredithderecho@gmail.com>
Daniel Wallgren <github.com/wallgrenen>
Kerrick Staley <kerrick@kerrickstaley.com>
Maksim Abramchuk <maximabramchuck@gmail.com>
Benjamin Kulnik <benjamin.kulnik@student.tuwien.ac.at>
Shaun Ren <shaun.ren@linux.com>
Ryan Greenblatt <greenblattryan@gmail.com>
Matthias Metelka <github.com/kleinerpirat>
qubist-pixel-ux <github.com/qubist-pixel-ux>
cherryblossom <github.com/cherryblossom000>
Hikaru Yoshiga <github.com/hikaru-y/>
Thore Tyborski <github.com/ThoreBor>
Alexander Giorev <alex.giorev@gmail.com>
Ren Tatsumoto <tatsu@autistici.org>
lolilolicon <lolilolicon@gmail.com>
Gesa Stupperich <gesa.stupperich@gmail.com>
git9527 <github.com/git9527>
Vova Selin <vselin12@gmail.com>
qxo <49526356@qq.com>
Spooghetti420 <github.com/spooghetti420>
Danish Prakash <github.com/danishprakash>
Araceli Yanez <github.com/aracelix>
Sam Bradshaw <samjr.bradshaw@gmail.com>
gnnoh <gerongfenh@gmail.com>
Sachin Govind <sachin.govind.too@gmail.com>
Bruce Harris <github.com/bruceharris>
Patric Cunha <patricc@agap2.pt>
Brayan Oliveira <github.com/BrayanDSO>
Luka Warren <github.com/lukawarren>
wisherhxl <wisherhxl@gmail.com>
dobefore <1432338032@qq.com>
Bart Louwers <bart.git@emeel.net>
Sam Penny <github.com/sam1penny>
Yutsuten <mateus.etto@gmail.com>
Zoom <zoomrmc+git@gmail.com>
TRIAEIOU <github.com/TRIAEIOU>
Stefan Kangas <stefankangas@gmail.com>
Fabricio Duarte <fabricio.duarte.jr@gmail.com>
Mani <github.com/krmanik>
Kaben Nanlohy <kaben.nanlohy@gmail.com>
Tobias Predel <tobias.predel@gmail.com>
Daniel Tang <danielzgtg.opensource@gmail.com>
Jack Pearson <github.com/jrpear>
yellowjello <github.com/yellowjello>
Ingemar Berg <github.com/ingemarberg>
Ben Kerman <ben@kermanic.org>
Euan Kemp <euank@euank.com>
Kieran Black <kieranlblack@gmail.com>
XeR <github.com/XeR>
mgrottenthaler <github.com/mgrottenthaler>
Austin Siew <github.com/Aquafina-water-bottle>
Joel Koen <mail@joelkoen.com>
Christopher Woggon <christopher.woggon@gmail.com>
Kavel Rao <github.com/kavelrao>
Ben Yip <github.com/bennyyip>
mmjang <752515918@qq.com>
shunlog <github.com/shunlog>
3ter <github.com/3ter>
Derek Dang <github.com/derekdang/>
Luc Mcgrady <github.com/Luc-Mcgrady>
Kehinde Adeleke <adelekekehinde06@gmail.com>
Marko Juhanne <github.com/mjuhanne>
Gabriel Heinatz <anorot@gmail.com>
Monty Evans <montyevans@gmail.com>
Nil Admirari <https://github.com/nihil-admirari>
Michael Winkworth <github.com/SteelColossus>
Mateusz Wojewoda <kawa1.11@o2.pl>
Jarrett Ye <jarrett.ye@outlook.com>
Sam Waechter <github.com/swektr>
Michael Eliachevitch <m.eliachevitch@posteo.de>
Carlo Quick <https://github.com/CarloQuick>
Dominique Martinet <asmadeus@codewreck.org>
chandraiyengar <github.com/chandraiyengar>
user1823 <92206575+user1823@users.noreply.github.com>
Gustaf Carefall <https://github.com/Gustaf-C>
virinci <github.com/virinci>
snowtimeglass <snowtimeglass@gmail.com>
Ben Olson <github.com/grepgrok>
Akash Reddy <akashreddy2003@gmail.com>
Lucio Sauer <watermanpaint@posteo.net>
Gustavo Sales <gustavosmendes14@gmail.com>
Shawn M Moore <https://github.com/sartak>
Marko Sisovic <msisovic13@gmail.com>
Viktor Ricci <ricci@primateer.de>
Harvey Randall <harveyrandall2001@gmail.com>
Pedro Lameiras <pedrolameiras@tecnico.ulisboa.pt>
Kai Knoblich <kai@FreeBSD.org>
Lucas Scharenbroch <lucasscharenbroch@gmail.com>
Antonio Cavallo <a.cavallo@cavallinux.eu>
Han Yeong-woo <han@yeongwoo.dev>
Jean Khawand <jk@jeankhawand.com>
Pedro Schreiber <schreiber.mmb@gmail.com>
Foxy_null <https://github.com/Foxy-null>
Arbyste <arbyste@outlook.com>
Vasll <github.com/vasll>
laalsaas <laalsaas@systemli.org>
ijqq <ijqq@protonmail.ch>
AntoineQ1 <https://github.com/AntoineQ1>
jthulhu <https://github.com/jthulhu>
Escape0707 <tothesong@gmail.com>
Loudwig <https://github.com/Loudwig>
Wu Yi-Wei <https://github.com/Ianwu0812>
RRomeroJr <117.rromero@gmail.com>
Xidorn Quan <me@upsuper.org>
Alexander Bocken <alexander@bocken.org>
James Elmore <email@jameselmore.org>
Rastislav Kish <rastislav.kish@protonmail.com>
********************
The text of the 3 clause BSD license follows:
Contributions copyright the above contributors, 2010-Present.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.