ThePacielloGroup / CCAe

The Colour Contrast Analyser (CCA) helps you determine the legibility of text and the contrast of visual elements, such as graphical controls and visual indicators.
http://www.paciellogroup.com/resources/contrastanalyser/
GNU General Public License v3.0
468 stars 105 forks source link

Refactoring and add new features #301

Closed ungjinPark closed 1 year ago

ungjinPark commented 1 year ago

What's new?

  1. Add one more shortcut for copying result for someone who needs short result. You can press 'Control-Alt(Opt)-C' to copy short result.
    • This shortcut save a short result in your clipboard include only background color hex, foreground color hex value and ratio. It may useful someone who doesn't need success criteria.
  2. Add a main window shortcut for swap background and foreground. If main window activated, Keyboard users can press 'Control-Tab' key to swap background and foreground color.
  3. Add sre-announcement feature for main window.
  4. Add some translatable text for i18n.
    • Add helpful announcement message for screen reader user when press Ctrl/Cmd + Shift + C to trying copy result
    • Add helpful announcement message for screen reader user when press Ctrl/Cmd + Alt(Opt) + C to trying copy short result(new feature).
    • Add helpful announcement message for screen reader user when swap foreground and background.
    • Add menuitem label for 'Copy short result' in Edit menu.
  5. in views/main.js, simplify code lines that's repeated too many. simplified code lines for onInput event for range/number input element.

Background

Sometime, I've felt uncomfortable usability for CCAe.

Switch Colors Buttons in Main window, there's no keyboard shortcut, I felt uncomfortable I must pick my mouse and move a mouse pointer to button. So I add it because I'm lazy :)

And, unfortunately, in South Korea, government don't follow a WCAG purely, becuase WCAG is goot guideline but they're not prepaired to apply WCAG's success Criteria enough. Our government made KWCAG that minor version of WCAG, and we follow it. So, We don't need success criteria. So I've added a feature for copy result without success criteria.

Also, when I read 'views/main.js', I felt that unnecessary lines of code were repeating too much, so I simplified them in my own way. Please review my code, and please test it.

ferllings commented 1 year ago

Thanks, I'll review it shortly

ferllings commented 1 year ago

@ungjinPark I've updated your PR, with a feature to customize copy-paste content. Something I wanted to re-add for a long time.