Home GnuPG

qt: Make text labels focusable if accessibility is active

Description

qt: Make text labels focusable if accessibility is active

qt/pinentrydialog.h (class PinEntryDialog): Derive from
QAccessible::ActivationObserver interface; add d'tor; override
accessibilityActiveChanged function of QAccessible::ActivationObserver
interface.
qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Register the
dialog as activation observer.
(PinEntryDialog::~PinEntryDialog): New.

(PinEntryDialog::accessibilityActiveChanged): New.

On Linux (and maybe also on other platforms) pinentry becomes aware of
active accessibility tools after the construction of the dialog.
Implementing the QAccessible::ActivationObserver interface allows us to
adapt the dialog as soon as accessibility tools access Qt's accessibility
framework. In this case, we enable all text labels that are not associated
to other UI widgets to receive keyboard focus by tabbing. This allows
people using screen readers to focus and read the individual labels.

Details

Provenance
ikloeckerAuthored on Mar 1 2022, 9:58 AM
Parents
rPdd9f76525823: qt: Create all widgets in tab order
Branches
Unknown
Tags
Unknown
Tasks
T5863: pinentry-qt: Further improve the accessibility