USEPA / emf

Emissions Modeling Framework (EMF)
6 stars 3 forks source link

improve focus indicators for buttons #98

Closed cseppan closed 2 years ago

cseppan commented 2 years ago

When tabbing through the interface, Java has a default highlight for buttons with a thin blue light around the button's text. This doesn't meet the accessibility contrast guidelines. The Sort-Filter-Select toolbar buttons are particularly bad since the highlight blends into the button's icon.

Need to see if there are any options for changing how buttons are highlighted when they have focus.

ddelvecchio commented 2 years ago

Initial button focus contrast (from background color to focus label): image

Changed button focus contrast (from background color to focus label). New contrast 7.07:1 which is way above the required 4.5:1 contrast ratio. image

ddelvecchio commented 2 years ago

In order to change the focus lablel to the correct contrast color ratio, the ration was increased to 7:1 which meets both WCAG AA and WCAG AAA.

The following line of code was added to the EmfClient.java run method. This will globably apply to the whole application the new button focus color contrast. This change affects all buttons and the sort/filter panels for the entire application.

    UIManager.put("Button.focus", new Color(51, 82, 107));