Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WHCM -- Windows High Contrast Mode Support #5

Open
damiansian opened this issue Jan 3, 2025 · 0 comments
Open

WHCM -- Windows High Contrast Mode Support #5

damiansian opened this issue Jan 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@damiansian
Copy link

damiansian commented Jan 3, 2025

URL

https://demo.fileyourstatetaxes.org/

Issue

On a PC, or simulated in a browser using the rendering options, turning on Windows High Contrast Mode leads to two errors on the home page.

Issue one:

The link opens in new window icon disappears.

Issue two:

The focus indicator isn't visible.

WCAG

n/a

Important

This is a Section 508 requirement to support OS level accessibility options. Since the State of NJ is required to meet Section 508, this is a requirement.

User Impact

Users utilize Windows high contrast mode primarily to enhance the visibility and readability of text and interface elements on their screen, particularly those with visual impairments like low vision or color blindness, as it drastically increases the contrast between colors, making it easier to distinguish between different parts of the interface; essentially, it simplifies the visual display by using stark color combinations like black text on a white background or vice versa.

Screen walkthrough

WHCM.mov

Suggested fix

SVG

To fix an SVG not respecting Windows High Contrast Mode (forced colors), use the CSS property "currentColor" within your SVG elements for fills and strokes, which will automatically inherit the system color set by the user's high contrast mode settings; if necessary, you can further refine styling using media queries targeting the "forced-colors" state to ensure proper color adjustments in high contrast mode.

Visible focus indicators

@media (forced-colors: active) {
  input:focus {
    outline: 2px solid system-color:highlight;
  }

  button:focus {
    background-color: system-color:highlight;
  }
}
@damiansian damiansian converted this from a draft issue Jan 3, 2025
@damiansian damiansian added the bug Something isn't working label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant