Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13679: Focus and accessibility improvements of Spin edit controls #26699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

krasko78
Copy link
Contributor

Resolves: #13679

Key points:

  1. I changed the accessibility role to SpinBox. My NVDA on Windows now says "Spin button" instead of "Edit".
  2. NVDA does read out the new value on change. Since the issue is more than two years old, it will be good to retest it in other screen readers and confirm if they still do not read out the new value.
  3. When the value is changed with the arrow buttons or the up/down arrow keys, the spin control will now not lose the focus and will select all the text.
  4. If ESC is pressed, the control will lose the focus as before. But if you then try to increase or decrease the value with the up/down arrow keys it won't work. You can however press Space or Enter to focus the control again and change the value further as much as you want.
  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

Range,
Information
Group,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only SpinBox was needed here but the enum should be in sync with the one in iaccessible.h (there is comment about that) so I added a few missing values.

@@ -191,6 +193,10 @@ FocusScope {
return
}

if (event.key === Qt.Key_Up || event.key === Qt.Key_Down) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically this should be in IncrementalPropertyControl.qml but I figured putting it here shouldn't do any harm. Plus it is much easier to have it here.

@RomanPudashkin RomanPudashkin requested a review from Eism February 24, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MU4 Issue] Accessibility for number spin boxes
1 participant