Commit 91702e1a authored by Ingo Klöcker's avatar Ingo Klöcker Committed by Ingo Klöcker
Browse files

Fix tool tip for S/MIME CSR and set accessible description

S/MIME CSRs are now created with a different action since we split the
creation of OpenPGP key pairs and S/MIME CSRs. Improve tool tip of
Import button by adding "certificate" to make more clear what is imported
from a file.

Set a plain-text version of the tool tip as accessible description to
prevent screen readers from speaking HTML tags literally.

GnuPG-bug-id: 6149
parent 9311e50b
......@@ -134,8 +134,13 @@ public:
mGenerateBtn->setDefaultAction(genKeyAction);
mGenerateBtn->setIconSize(QSize(64, 64));
mGenerateBtn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
mGenerateBtn->setToolTip(i18n("Create a new OpenPGP key pair") + QStringLiteral("<br>") +
i18n("To create an S/MIME certificate request use \"New Key Pair\" from the 'File' Menu instead"));
const auto generateBtnDescription = kxi18nc("@info",
"Create a new OpenPGP key pair.<nl/>"
"To create an S/MIME certificate request use "
"<interface>New S/MIME Certification Request</interface> "
"from the <interface>File</interface> menu instead.");
mGenerateBtn->setToolTip(generateBtnDescription.toString());
mGenerateBtn->setAccessibleDescription(generateBtnDescription.toString(Kuit::PlainText));
KConfigGroup restrictions(KSharedConfig::openConfig(), "KDE Action Restrictions");
mGenerateBtn->setEnabled(restrictions.readEntry("action/file_new_certificate", true));
......@@ -144,8 +149,11 @@ public:
mImportBtn->setDefaultAction(importAction);
mImportBtn->setIconSize(QSize(64, 64));
mImportBtn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
mImportBtn->setToolTip(i18n("Import from a file.") + QStringLiteral("<br>") +
i18n("To import from a public keyserver use \"Lookup on Server\" instead."));
const auto importBtnDescription = kxi18nc("@info",
"Import certificate from a file.<nl/>"
"To import from a public keyserver use <interface>Lookup on Server</interface> instead.");
mImportBtn->setToolTip(importBtnDescription.toString());
mImportBtn->setAccessibleDescription(importBtnDescription.toString(Kuit::PlainText));
mImportBtn->setEnabled(restrictions.readEntry("action/file_import_certificate", true));
auto btnLayout = new QHBoxLayout;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment