mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-06 05:57:37 +03:00
Fix various accessibility issues (#9138)
Enable buddy fields in group and entry edit pages * Fixes #9060, you can now press Alt + [letter] to skip between fields on the group and entry edit pages. * Move the expire checkbox to the right hand column and use the standard eye icon button for notes reveal. Only show notes reveal button if the hide notes setting is enabled. Fix overflow of text in default auto-type sequence preview * Fixes #9083 Add copy title shortcut (Ctrl + I) * Closes #9109 Fix issues with menu actions being enabled incorrectly Add accessibility description to password widget to explain how to hide/show passwords and open the generator * Closes #9059 Add F6 shortcut to focus search * Closes #9163
This commit is contained in:
parent
8077cd028d
commit
6182b605c0
6 changed files with 239 additions and 173 deletions
|
@ -146,6 +146,9 @@ MainWindow::MainWindow()
|
|||
m_entryContextMenu->addAction(m_ui->actionEntryOpenUrl);
|
||||
m_entryContextMenu->addAction(m_ui->actionEntryDownloadIcon);
|
||||
m_entryContextMenu->addSeparator();
|
||||
m_entryContextMenu->addAction(m_ui->actionEntryAddToAgent);
|
||||
m_entryContextMenu->addAction(m_ui->actionEntryRemoveFromAgent);
|
||||
m_entryContextMenu->addSeparator();
|
||||
m_entryContextMenu->addAction(m_ui->actionEntryRestore);
|
||||
|
||||
m_entryNewContextMenu = new QMenu(this);
|
||||
|
@ -192,18 +195,8 @@ MainWindow::MainWindow()
|
|||
connect(sshAgent(), SIGNAL(error(QString)), this, SLOT(showErrorMessage(QString)));
|
||||
connect(sshAgent(), SIGNAL(enabledChanged(bool)), this, SLOT(agentEnabled(bool)));
|
||||
m_ui->settingsWidget->addSettingsPage(new AgentSettingsPage());
|
||||
|
||||
m_entryContextMenu->addSeparator();
|
||||
m_entryContextMenu->addAction(m_ui->actionEntryAddToAgent);
|
||||
m_entryContextMenu->addAction(m_ui->actionEntryRemoveFromAgent);
|
||||
|
||||
m_ui->actionEntryAddToAgent->setIcon(icons()->icon("utilities-terminal"));
|
||||
m_ui->actionEntryRemoveFromAgent->setIcon(icons()->icon("utilities-terminal"));
|
||||
#endif
|
||||
|
||||
m_ui->actionEntryAddToAgent->setVisible(false);
|
||||
m_ui->actionEntryRemoveFromAgent->setVisible(false);
|
||||
|
||||
initViewMenu();
|
||||
|
||||
#if defined(WITH_XC_KEESHARE)
|
||||
|
@ -289,6 +282,7 @@ MainWindow::MainWindow()
|
|||
m_ui->actionEntryMoveDown->setShortcut(Qt::CTRL + Qt::ALT + Qt::Key_Down);
|
||||
m_ui->actionEntryCopyUsername->setShortcut(Qt::CTRL + Qt::Key_B);
|
||||
m_ui->actionEntryCopyPassword->setShortcut(Qt::CTRL + Qt::Key_C);
|
||||
m_ui->actionEntryCopyTitle->setShortcut(Qt::CTRL + Qt::Key_I);
|
||||
m_ui->actionEntryAutoTypeSequence->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_V);
|
||||
m_ui->actionEntryOpenUrl->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_U);
|
||||
m_ui->actionEntryCopyURL->setShortcut(Qt::CTRL + Qt::Key_U);
|
||||
|
@ -322,6 +316,7 @@ MainWindow::MainWindow()
|
|||
m_ui->actionEntryAutoTypeSequence->setShortcutVisibleInContextMenu(true);
|
||||
m_ui->actionEntryOpenUrl->setShortcutVisibleInContextMenu(true);
|
||||
m_ui->actionEntryCopyURL->setShortcutVisibleInContextMenu(true);
|
||||
m_ui->actionEntryCopyTitle->setShortcutVisibleInContextMenu(true);
|
||||
m_ui->actionEntryAddToAgent->setShortcutVisibleInContextMenu(true);
|
||||
m_ui->actionEntryRemoveFromAgent->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
|
@ -416,6 +411,8 @@ MainWindow::MainWindow()
|
|||
m_ui->actionEntryCopyPasswordTotp->setIcon(icons()->icon("totp-copy-password"));
|
||||
m_ui->actionEntryTotpQRCode->setIcon(icons()->icon("qrcode"));
|
||||
m_ui->actionEntrySetupTotp->setIcon(icons()->icon("totp-edit"));
|
||||
m_ui->actionEntryAddToAgent->setIcon(icons()->icon("utilities-terminal"));
|
||||
m_ui->actionEntryRemoveFromAgent->setIcon(icons()->icon("utilities-terminal"));
|
||||
m_ui->menuTags->setIcon(icons()->icon("tag-multiple"));
|
||||
m_ui->actionEntryDownloadIcon->setIcon(icons()->icon("favicon-download"));
|
||||
m_ui->actionGroupSortAsc->setIcon(icons()->icon("sort-alphabetical-ascending"));
|
||||
|
@ -695,6 +692,7 @@ MainWindow::MainWindow()
|
|||
statusBar()->addPermanentWidget(m_statusBarLabel);
|
||||
|
||||
restoreConfigState();
|
||||
setMenuActionState();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -885,6 +883,7 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
|||
bool inWelcomeWidget = (currentIndex == WelcomeScreen);
|
||||
bool inDatabaseTabWidgetOrWelcomeWidget = inDatabaseTabWidget || inWelcomeWidget;
|
||||
|
||||
m_ui->actionDatabaseClose->setEnabled(true);
|
||||
m_ui->actionDatabaseMerge->setEnabled(inDatabaseTabWidget);
|
||||
m_ui->actionDatabaseNew->setEnabled(inDatabaseTabWidgetOrWelcomeWidget);
|
||||
m_ui->actionDatabaseOpen->setEnabled(inDatabaseTabWidgetOrWelcomeWidget);
|
||||
|
@ -1042,6 +1041,13 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
|||
// Only disable the action in the database menu so that the
|
||||
// menu remains active in the toolbar, if necessary
|
||||
m_ui->actionLockDatabase->setEnabled(false);
|
||||
// Never show in these modes
|
||||
m_ui->actionEntryMoveUp->setVisible(false);
|
||||
m_ui->actionEntryMoveDown->setVisible(false);
|
||||
m_ui->actionEntryRestore->setVisible(false);
|
||||
m_ui->actionEntryAddToAgent->setVisible(false);
|
||||
m_ui->actionEntryRemoveFromAgent->setVisible(false);
|
||||
m_ui->actionGroupEmptyRecycleBin->setVisible(false);
|
||||
|
||||
m_searchWidgetAction->setEnabled(false);
|
||||
break;
|
||||
|
@ -1049,7 +1055,6 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
|||
default:
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
m_ui->actionDatabaseClose->setEnabled(true);
|
||||
} else {
|
||||
const auto entryActions = m_ui->menuEntries->actions();
|
||||
for (auto action : entryActions) {
|
||||
|
@ -1072,6 +1077,13 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
|||
m_ui->actionExportCsv->setEnabled(false);
|
||||
m_ui->actionExportHtml->setEnabled(false);
|
||||
m_ui->actionDatabaseMerge->setEnabled(false);
|
||||
// Hide entry-specific actions
|
||||
m_ui->actionEntryMoveUp->setVisible(false);
|
||||
m_ui->actionEntryMoveDown->setVisible(false);
|
||||
m_ui->actionEntryRestore->setVisible(false);
|
||||
m_ui->actionEntryAddToAgent->setVisible(false);
|
||||
m_ui->actionEntryRemoveFromAgent->setVisible(false);
|
||||
m_ui->actionGroupEmptyRecycleBin->setVisible(false);
|
||||
|
||||
m_searchWidgetAction->setEnabled(false);
|
||||
}
|
||||
|
@ -1415,7 +1427,7 @@ void MainWindow::keyPressEvent(QKeyEvent* event)
|
|||
} else if (event->key() == Qt::Key_F2) {
|
||||
dbWidget->focusOnEntries(true);
|
||||
return;
|
||||
} else if (event->key() == Qt::Key_F3) {
|
||||
} else if (event->key() == Qt::Key_F3 || event->key() == Qt::Key_F6) {
|
||||
focusSearchWidget();
|
||||
return;
|
||||
} else if (event->key() == Qt::Key_Escape && dbWidget->isSearchActive()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue