RFR: 8204 : Keyboard traps in flamegraph view for search option [v2]

Virag Purnam vpurnam at openjdk.org
Mon Feb 26 15:50:51 UTC 2024


On Fri, 23 Feb 2024 12:14:20 GMT, Virag Purnam <vpurnam at openjdk.org> wrote:

>> Focus Trapped Issue. Keyboard focus is trapped in three specific scenarios mentioned below:
>> 
>> 1. Focus is trapped in JMC Agent Preset Manager
>> 
>> Select Window -> JMC Agent Preset Manager
>> Click on "Import Fils..."/ "Export File" button
>> Press Esc button when dialog is displayed
>> Press "Tab" button for multi times
>> 
>> 2. Focus is trapped in Description of Template Manager
>> 
>> Select JVM Browser
>> Start Flight Recording
>> Template Manager
>> Click New
>> Click Edit
>> Focus to Description
>> 
>> 3. Focus is trapped in search tool in Flame Graph  (Mostly on Windows)
>> 
>> Launch JDK Mission Control
>> Open any JFR file
>> Navigate to "Outline" tab
>> In Java Application, choose "Threads"
>> Move focus to search tool in Flame Graph
>> 
>> Solution:
>> 1. PresetManagerPage.java : Setting the focus back to tableInspector.
>> 2. TemplateEditPage.java : Added TraverseListener() for description field.
>> 3. FlamegraphSwingView.java : Fix is not straight forward as SWT to Swing and back to SWT traversal is creating issue here. I have just implemented work around for this. I have added KeyListener() to all the swing components. Once it traverse through all the components, I am setting the Focus back to SWT.  With this there is no keyboard focus trap. 
>>  
>> These issues are kind of blocker with respect to accessibility. Could someone please review the changes.
>
> Virag Purnam has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8204: Keyboard traps in flamegraph view for search option

> I'll make a reminder to take a look at this on my Windows machine later tonight, but I did take a quick look at these changes in Linux..
> 
> > Focus is trapped in JMC Agent Preset Manager
> > Select Window -> JMC Agent Preset Manager
> > Click on "Import Fils..."/ "Export File" button
> > Press Esc button when dialog is displayed
> > Press "Tab" button for multi times
> 
> Exiting out of the Import Files dialog still doesn't return focus to the Preset Manager window.
> 
> > Focus is trapped in Description of Template Manager
> > Select JVM Browser
> > Start Flight Recording
> > Template Manager
> > Click New
> > Click Edit
> > Focus to Description
> 
> This one looks to be fixed.
> 
> > Focus is trapped in search tool in Flame Graph (Mostly on Windows)
> > Launch JDK Mission Control
> > Open any JFR file
> > Navigate to "Outline" tab
> > In Java Application, choose "Threads"
> > Move focus to search tool in Flame Graph
> 
> Is the idea that you type something into the Flame Graph and then try to use Tab to cycle back through all the pages back to the Flame Graph page?
> 
> FWIW, on Linux regardless of which JFR Outline page I start on the Tab navigation seems to get stuck behind the Results tab. I can see there's a little white artifact that gets drawn so I think it's getting stuck here:
> 
> ![Screenshot from 2024-02-26 10-29-17](https://private-user-images.githubusercontent.com/10425301/307850892-1223693b-f7d2-44b2-89d2-ab92350f26c4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg5NjI0MzMsIm5iZiI6MTcwODk2MjEzMywicGF0aCI6Ii8xMDQyNTMwMS8zMDc4NTA4OTItMTIyMzY5M2ItZjdkMi00NGIyLTg5ZDItYWI5MjM1MGYyNmM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjI2VDE1NDIxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFhODAzOWZlOGMzNTJkNzYxOWVhZmIxODZlYjFjOTM1MTE4NGEzNjczMTA2NDIxZTBmODVmNTQ0NjBiYjMwNmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DGW5043WIomt9cjIo0eSBTFhPt2fiJOXr_Jb5a8_qQ0)
> 
> If I start at the Flame Graph page and repeatedly tab, the navigation goes:
> 
> 1. Flame Graph search bar
> 2. ??? (Can't find the visual clue as to what it's active on, but it's not stuck)
> 3. Outline
> 4. Outline Minimize
> 5. Lock Page Structure
> 6. View Menu
> 7. Selected JFR Outline Page (i.e., Java Application/Threads/etc.)
> 8. Results tab
> 9. Results Minimize
> 10. **Stuck** behind Results tab
> 
> If I start for example on the Java Application Page instead of the Flame Graph, it still gets stuck in the same way as above but can jump straight to number 7.

Thanks @aptmac for the review and comments. It will be great if you could please review these changes on Windows as well.

-------------

PR Comment: https://git.openjdk.org/jmc/pull/554#issuecomment-1964464715


More information about the jmc-dev mailing list