poedit
poedit copied to clipboard
more accessibility for translations list
Steps to reproduce:
- Start a screenreader like nvda or windows narator.
- Open a large .po file with mor strings available than fit on the screen.
- Press end to go to the last available string.
- Press shift+tab and tab to focus translations list.
Current Situation: Narator says: translations list wxdataviewctrlmainwindow NVDA says: translations list list, translations list (X items) wxdataviewctrlmainwindow, and the first 4 translations at the top of the shown list. expected: Both Narator and NVDA say translation list and the focused item.
If you need more help fixing this please feel free to reply.
If you need more help fixing this
Patches are always appreciated, thanks!
When pressing tab or shift+tab the list it self gains the system focus. I think one way on how to handle this would be to focus currently selected item instead. Further more the list has a role of ROLE_SYSTEM_CLIENT and screen readers fallback on populating its value from the displayed text on the screen. By setting acc role to ROLE_SYSTEM_LIST reporting the display text would not occur. btw items them selves are reported with ROLE_SYSTEM_LISTITEM so this part is working great as expected. Is it easily doable and do you like one of these ideas?
@pvagner Literally everything you wrote is complete gibberish to me. You assume (not only here, but in the other issues you filed as well) that I have your knowledge. I don't. You're too brief and ambiguous. Being too verbose never hurts understanding, being not verbose enough does. Please do follow this and be as detailed as possible.
Better yet, please submit patches, as you seem more competent than me to do so.
I believe the problem is that the listbox component you use for that particular list is not inheriting from the standard wxListBox component. That means that it doesn't inherit the accessible role and other properties automatically. So because WX doesn't know what component you are creating, it assigns the generic ROLE_SYSTEM_CLIENT
constant as a fall-back.
I don't know enough about WX or POEdit's code to provide a patch myself right now, but in order for this to become a list to NVDA, you should be able to tell WX somehow that your component is a listbox container and should use the appropriate role wxROLE_SYSTEM_LIST
somehow.
MSAA uses these roles to give objects the role property, which is used by screen readers to recognize the type of object they're interacting with.
Does this make more sense @vslavik ?