Hi Sergey, I also was looking not to duplicate the code, but the inheritance hierarchy for AquaButtonRadioUI.java is different from MetalRadioButtonUI.java, although both ultimately derive from BasicButtonUI. As Phil pointed out, I wanted to keep the side effects to a minimum, so I copied the code from BasicRadioButtonUI.
As for the bug JDK-8167160, it was raised because of JDK-8154043 which was an issue about keyboard navigation for RadioButtons. Semyon wrote the test for that, and that test was modified in JDK-8167160, to simply exclude the test for Aqua L&F for mac. With my current changes, the behavior has been equalized with Metal L&F, so I re-enabled the test for Aqua. Thanks, Krishna -----Original Message----- From: Philip Race Sent: Sunday, August 12, 2018 4:24 AM To: Sergey Bylokhov <sergey.bylok...@oracle.com> Cc: Krishna Addepalli <krishna.addepa...@oracle.com>; firstname.lastname@example.org Subject: Re: <Swing Dev> RFR:JDK-8208640: [a11y][macosx] Unable to navigate between Radiobuttons in Radio group using keyboard The bug says >This is not the native tabbed scrolling for Native buttons. The code review says > In OS X in default OS X apps, for radio button focus traversing to work, > > custom actions must be set using System Preferences. I don't know what the first of these means and I don't know what the second of these is saying you have to do. System Preferences is a big UI and it is bizarre to have to do something like that to make it possible to navigate radio buttons. The problem here is that no one seems to be able to do this navigation with a Swing app using the default Aqual L&F. We may now be doing something different than native .. but at least it works as other L&Fs instead of not at all. -phil. On 8/11/18, 3:19 PM, Sergey Bylokhov wrote: > BTW. Looks like this bu was reported before here: > https://bugs.openjdk.java.net/browse/JDK-8167160 > > And the test was updated because our radio-buttons in the native > L&F-Aqua behave in the same way as the native cocoa equivalents. Can > you confirm that? > > On 11/08/2018 15:14, Sergey Bylokhov wrote: >> Hi, Krishna. >> Is it possible to deduplicate this code, I guess it should. >> >> On 11/08/2018 08:21, Krishna Addepalli wrote: >>> Hi All, >>> >>> Please review a fix for JDK-8208640: >>> https://bugs.openjdk.java.net/browse/JDK-8208640 >>> >>> Webrev: http://cr.openjdk.java.net/~kaddepalli/8208640/webrev00/ >>> <http://cr.openjdk.java.net/%7Ekaddepalli/8208640/webrev00/> >>> >>> The problem is that the arrow key navigation for Aqua L&F was not >>> implemented, which is why neither the tab keys nor the arrow keys >>> were allowing to navigate through the radio buttons through a button >>> group. >>> >>> Proposed fix is to copy the implementation from Basic L&F into Aqua >>> L&F. Also fixed the test that was written to include the Aqua L&F to >>> be tested, and it passes on Mac successfully. >>> >>> Thanks, >>> >>> Krishna >>> >> >> > >