Skip to content

Improve accessibility for keyboard and screen reader users - #13717

Open
mtigzoe wants to merge 84 commits into
keepassxreboot:developfrom
mtigzoe:accessibility-upstream-pr
Open

mtigzoe wants to merge 84 commits into
keepassxreboot:developfrom
mtigzoe:accessibility-upstream-pr

Conversation

@mtigzoe

@mtigzoe mtigzoe commented Sep 27, 2026 •

Copy link
Copy Markdown

Description

This pull request improves GUI accessibility for keyboard and screen reader users across KeePassXC.

The changes were developed through systematic accessibility testing of the Windows Qt GUI, with particular attention to JAWS, NVDA, keyboard navigation, focus management, accessible names and descriptions, screen-reader announcements, and braille displays.

The changes include:

  • Improve keyboard navigation and Tab/Shift+Tab behavior in dialogs, editors, lists, wizards, toolbars, and reports.

  • Restore focus appropriately when controls are hidden, disabled, or replaced.

  • Add or improve accessible names and descriptions for controls that were difficult for assistive technologies to identify.

  • Improve screen-reader announcements for status changes, errors, message boxes, asynchronous operations, and other transient UI changes.

  • Improve accessibility of the database and import wizards.

  • Improve accessibility of password, TOTP, passkey, attachment, report, tag, shortcut, and database-settings interfaces.

  • Improve keyboard access to controls that previously required mouse interaction.

  • Improve accessibility information exposed through Qt accessibility APIs.

  • Improve interoperability with JAWS, NVDA, and braille displays.

The goal is to provide concrete accessibility improvements and work toward better JAWS and screen-reader compatibility. This pull request does not claim that KeePassXC is fully compatible with JAWS or that every accessibility issue has been resolved.

Screenshots

No screenshots are included. The changes primarily concern keyboard navigation, focus behavior, accessible properties, and screen-reader/braille interaction rather than visual appearance.

Testing strategy

Testing has been performed on Windows 11 using the Qt GUI build of KeePassXC.

Testing has included:

  • Building KeePassXC successfully with the accessibility changes.

  • Launching the resulting KeePassXC executable successfully.

  • Manual keyboard navigation using Tab and Shift+Tab.

  • Testing focus restoration when controls become disabled or hidden.

  • Testing screen-reader interaction with JAWS.

  • Testing accessibility behavior with NVDA.

  • Testing relevant controls and dialogs with a braille display.

  • Testing database and application settings.

  • Testing the Create Database wizard, including the Advanced section.

  • Testing the Import File wizard and its import-type selection/navigation.

  • Testing entry and group editing, including the Notes field.

  • Testing Password Generator and Passkey interfaces.

  • Testing Database Settings.

  • Testing Database Reports and report navigation.

  • Testing Health Check accessibility behavior.

  • Testing toolbar and keyboard focus traversal.

  • Testing screen-reader announcements and focus changes in affected dialogs and status areas.

Additional manual accessibility testing and review may identify further improvements as the changes are reviewed and exercised across different assistive-technology configurations.

Generative AI disclosure

Generative AI was used to write the majority of the code in this pull request. ChatGPT, Grok, Claude, and GLM 5.3 Flash were used during development, code review, debugging, and testing. The resulting changes were reviewed and tested by the contributor, including manual accessibility testing with JAWS, NVDA, and a braille display.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical build and TOTP focus issues, along with moderate accessibility defects, remain unresolved.

Review effort: Lite
Findings: 2 High severity · 2 Medium severity

Open (4)
What changed in this PR

Improves accessibility, screen-reader feedback, keyboard navigation, and focus restoration across the Qt GUI.

Changes:

  • Adds accessible names, descriptions, announcements, and state updates.
  • Improves Tab traversal and focus handling across dialogs, editors, reports, and wizards.
  • Adds keyboard support for imports, tags, TOTP, passwords, shortcuts, and attachments.

Outstanding findings include 2 critical and 14 moderate issues involving a build failure, TOTP focus, announcement flooding, missing announcements, focus restoration, and event ownership.

File Description
src/​gui/​wizard/​NewDatabaseWizardPage.cpp Adds database wizard accessibility guidance.
src/​gui/​wizard/​ImportWizardPageSelect.ui Improves import selector accessibility and tab order.
src/​gui/​wizard/​ImportWizardPageSelect.h Adds import-list focus handling.
src/​gui/​wizard/​ImportWizardPageSelect.cpp Implements import wizard focus traversal.
src/​gui/​wizard/​ImportTypeListWidget.h Adds keyboard traversal for import types.
src/​gui/​widgets/​ShortcutWidget.cpp Clears displayed shortcuts on reset.
src/​gui/​widgets/​PopupHelpWidget.h Adds keyboard event handling.
src/​gui/​widgets/​PopupHelpWidget.cpp Makes search help keyboard accessible.
src/​gui/​widgets/​KPToolBar.h Adds toolbar accessibility support.
src/​gui/​widgets/​KPToolBar.cpp Names and exposes toolbar buttons.
src/​gui/​WelcomeWidget.h Adds event-filter keyboard handling.
src/​gui/​WelcomeWidget.cpp Improves recent database keyboard handling.
src/​gui/​URLEdit.cpp Announces invalid URLs.
src/​gui/​UpdateCheckDialog.cpp Announces update results.
src/​gui/​TotpSetupDialog.ui Adds TOTP names and tab order.
src/​gui/​TotpSetupDialog.h Adds accessibility update slots.
src/​gui/​TotpSetupDialog.cpp Announces TOTP changes and errors.
src/​gui/​TotpExportSettingsDialog.h Adds QR accessibility state.
src/​gui/​TotpExportSettingsDialog.cpp Improves QR and countdown accessibility.
src/​gui/​TotpDialog.ui Makes TOTP code and progress accessible.
src/​gui/​TotpDialog.cpp Improves TOTP focus and announcements.
src/​gui/​tag/​TagView.cpp Names the Searches and Tags view.
src/​gui/​tag/​TagsEdit.h Adds tag summaries and announcements.
src/​gui/​tag/​TagsEdit.cpp Announces tag editing changes.
src/​gui/​ShortcutSettingsPage.cpp Enables keyboard shortcut editing.
src/​gui/​SearchWidget.cpp Restores search focus.
src/​gui/​reports/​ReportsWidgetStatistics.cpp Exposes report error descriptions.
src/​gui/​reports/​ReportsWidgetPasskeys.ui Improves passkey table accessibility.
src/​gui/​reports/​ReportsWidgetPasskeys.cpp Preserves report focus.
src/​gui/​reports/​ReportsWidgetHibp.ui Names HIBP report controls.
src/​gui/​reports/​ReportsWidgetHealthcheck.ui Improves health-check navigation.
src/​gui/​reports/​ReportsWidgetHealthcheck.cpp Adds health column accessibility data.
src/​gui/​reports/​ReportsWidgetBrowserStatistics.ui Improves browser report navigation.
src/​gui/​reports/​ReportsWidgetBrowserStatistics.cpp Adds accessible URL descriptions.
src/​gui/​PasswordWidget.ui Names password quality feedback.
src/​gui/​PasswordWidget.h Adds password accessibility forwarding.
src/​gui/​PasswordWidget.cpp Improves password focus and announcements.
src/​gui/​PasswordGeneratorWidget.ui Adds generator accessible names.
src/​gui/​PasswordGeneratorWidget.cpp Announces generator state and quality.
src/​gui/​passkeys/​PasskeyImportDialog.ui Names passkey import selectors.
src/​gui/​passkeys/​PasskeyExportDialog.ui Improves passkey export navigation.
src/​gui/​MessageWidget.cpp Announces transient messages.
src/​gui/​MessageBox.h Adds message box announcement support.
src/​gui/​MessageBox.cpp Announces message box contents.
src/​gui/​MergeDialog.ui Improves merge table accessibility.
src/​gui/​MainWindow.cpp Improves toolbar focus and status announcements.
src/​gui/​KMessageWidget.cpp Restores focus when messages hide.
src/​gui/​IconDownloaderDialog.cpp Announces download progress and results.
src/​gui/​group/​EditGroupWidget.cpp Improves group editor tab behavior.
src/​gui/​EntryPreviewWidget.cpp Restores preview focus and names controls.
src/​gui/​entry/​EditEntryWidgetSSHAgent.ui Enables keyboard focus for external key controls.
src/​gui/​entry/​EditEntryWidgetMain.ui Allows Tab to leave notes.
src/​gui/​entry/​EditEntryWidgetBrowser.ui Allows Tab to leave URL entries.
src/​gui/​entry/​EditEntryWidgetAdvanced.ui Allows Tab to leave attribute selection.
src/​gui/​entry/​EditEntryWidget.cpp Improves entry editor focus and keyboard editing.
src/​gui/​entry/​attachments/​TextAttachmentsWidget.cpp Synchronizes preview state and focus.
src/​gui/​entry/​attachments/​ImageAttachmentsWidget.cpp Names image attachments and load errors.
src/​gui/​EditWidgetProperties.ui Improves custom-data navigation.
src/​gui/​EditWidgetIcons.ui Allows Tab to leave icon lists.
src/​gui/​dbsettings/​DatabaseSettingsWidgetGeneral.ui Names database icon controls.
src/​gui/​dbsettings/​DatabaseSettingsWidgetEncryption.ui Improves encryption settings accessibility.
src/​gui/​dbsettings/​DatabaseSettingsWidgetEncryption.h Adds transform-round accessibility handling.
src/​gui/​dbsettings/​DatabaseSettingsWidgetEncryption.cpp Announces encryption setting changes.
src/​gui/​dbsettings/​DatabaseSettingsWidgetDatabaseKey.cpp Restores focus when key options open.
src/​gui/​dbsettings/​DatabaseSettingsWidgetBrowser.ui Enables browser data keyboard editing.
src/​gui/​DatabaseWidget.cpp Names database views and search status.
src/​gui/​DatabaseOpenWidget.cpp Preserves focus when hardware-key controls disable.
src/​gui/​databasekey/​KeyComponentWidget.cpp Improves key component focus transitions.
src/​gui/​csvImport/​CsvImportWidget.cpp Allows screen readers to focus CSV previews.
src/​gui/​CategoryListWidget.cpp Improves category focus and scrolling.
src/​gui/​ApplicationSettingsWidgetSecurity.ui Names the search-clear timing control.
src/​gui/​ApplicationSettingsWidgetGeneral.ui Names recent database and save controls.
src/​gui/​ApplicationSettingsWidget.cpp Preserves settings focus and announces errors.
src/​autotype/​PickcharsDialog.cpp Names character selection buttons.
src/​autotype/​AutoTypeSelectDialog.cpp Improves Auto-Type help accessibility.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/gui/TotpDialog.cpp
setTabOrder(m_ui->totpLabel, closeButton);
setTabOrder(closeButton, copyButton);
m_ui->totpLabel->setFocusPolicy(Qt::StrongFocus);
m_ui->totpLabel->setFocus(Qt::OtherFocusReason);
<customwidget>
<class>ImportTypeListWidget</class>
<extends>QListWidget</extends>
<header>ImportTypeListWidget.h</header>
Comment on lines +195 to +197
QAccessibleAnnouncementEvent announcementEvent(
m_ui->progressLabel, m_ui->progressLabel->text());
QAccessible::updateAccessibility(&announcementEvent);
m_ui->invalidKeyLabel->setVisible(invalid);
m_ui->seedEdit->setAccessibleDescription(invalid ? tr("Error: secret key is invalid") : QString());
if (invalid) {
QAccessible::updateAccessibility(new QAccessibleEvent(m_ui->invalidKeyLabel, QAccessible::Alert));
@varjolintu

Copy link
Copy Markdown
Member

The pull request template has been removed. Please add it back with all the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants