rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.91k stars 299 forks source link

UX issues in Encapsulate Field dialog #5142

Open daFreeMan opened 5 years ago

daFreeMan commented 5 years ago

Rubberduck version information

Version 2.4.1.4930
OS: Microsoft Windows NT 10.0.15063.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.4873.1000
Host Executable: MSACCESS.EXE

Description 1) OK button is not defaulted. 2) <Tab> key moves into the Preview box but not out of it 3) <Down Arrow> will move the cursor below the visible section of Preview box leaving no obvious indication of where you are. 4) There is a preview of the Property Get method, but not of the Property Set/Let method. It may be that when using the Down Arrow to go below what's visible in the Preview box, it's actually going past this previewed code, but there is no vertical scroll bar or scrolling in the text box. 5) <Shift><Tab> from the Property Name text box will move to the Cancel button, <Shift><Tab> again will move to the OK button. <Shift><Tab> a third time will move into the Preview box, but will not move out of it.

To Reproduce Steps to reproduce the behavior: As described above

Expected behavior When I type a new name in the Property Name entry box, I'd expect to be able to hit <Enter> to accept the change (same behavior as clicking OK). I would expect hitting <Esc> to close the dialog without making any changes. Similar to #5137 - I believe there was chat discussion to extend this to all dialogs, I'm formalizing the request for this one here. When I <Tab> from the Setter Type check box collection into Preview, the "preview collapse" button area (green rectangle in screen shot) is selected. Another <Tab> takes me to the previewed code text box. Another <Tab> should take me to the OK button.

Screenshots This shows the tab order in the dialog box: 2019-09-11 12_35_34-Microsoft Visual Basic for Applications - ROIReport -  IRestDriver (Code) Once the cursor is in 5, it's stuck there - keyboard commands will not get it out. Mouse clicks do continue to work as expected. I show -1 and -2 because the only way to get to the buttons is via <shift><tab> from 1.

Logfile Fairly large log file including several parses. Nothing of interest beyond Executing click handler for menu item '&Encapsulate Field' at time stamp 2019-09-11 12:35:00.1427. No errors logged. RubberduckLog.txt

Additional context We're not all exclusive mouse users!

Vogel612 commented 5 years ago

relabelling as enhancement, because strictly speaking this is not "wrong" behaviour, just crappy behaviour. FWIW I'd expect the preview box itself to be readonly and therefore skipped when tabbing. That would make it unreachable via keyboard navigation, which carries accessibility implications (not that the VBE is accessible...)