Home GnuPG

qt: Make text label in pinentry message box focusable

Description

qt: Make text label in pinentry message box focusable

* qt/main.cpp (qt_cmd_handler): Set text format of message box to
PlainText. Set text interaction flags of message box to
TextSelectableByMouse.
* qt/qt/pinentryconfirm.h (class PinentryConfirm): Derive from
QAccessible::ActivationObserver interface; add d'tor; override
focusNextPrevChild method of QMessageBox and  accessibilityActiveChanged
method of QAccessible::ActivationObserver interface.
* qt/pinentryconfirm.cpp (messageBoxLabel): New.
(PinentryConfirm::PinentryConfirm): Register as activation observer.
(PinentryConfirm::~PinentryConfirm): New.
(PinentryConfirm::focusNextPrevChild): New.
(PinentryConfirm::accessibilityActiveChanged): New.

This makes the text label in the second manifestation of pinentry-qt
accessible, i.e. allows the user to focus it by tabbing if accessibility
tools are active.

Details

Provenance
ikloeckerAuthored on Mar 2 2022, 5:46 PM
Parents
rPb6370f87d247: qt: Extract function for selecting the text of a QLabel
Branches
Unknown
Tags
Unknown
Tasks
T5863: pinentry-qt: Further improve the accessibility