poedit icon indicating copy to clipboard operation
poedit copied to clipboard

more accessibility for translations list

Open bdorer opened this issue 3 years ago • 4 comments

Steps to reproduce:

  1. Start a screenreader like nvda or windows narator.
  2. Open a large .po file with mor strings available than fit on the screen.
  3. Press end to go to the last available string.
  4. 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.

bdorer avatar May 12 '21 18:05 bdorer

If you need more help fixing this

Patches are always appreciated, thanks!

vslavik avatar May 13 '21 06:05 vslavik

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 avatar May 20 '21 11:05 pvagner

@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.

vslavik avatar May 20 '21 12:05 vslavik

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 ?

MarcoZehe avatar Dec 12 '21 14:12 MarcoZehe