I'm currently working on a project using React and TypeScript, and I need to figure out how to detect if a user has any of the high contrast accessibility settings enabled on Mac OS. These settings include Invert colors, Use grayscale, Differentiate without color, Increase contrast, or an increased Display contrast setting.
My goal is to find a way to detect these settings using JavaScript/TypeScript.
Currently, I have only been able to detect Invert colors.
Does anyone know how I can detect if a user has any of the other Mac OS accessibility settings enabled?
Additional information:
- The prefers contrast media query is not yet available. Despite trying it, it does not work as expected.
- The inverted colors media query only tests for the Invert colors setting.
- Apple's developer documentation on color and contrast does not offer a clear solution.
- Methods for detecting high contrast use in other browser and operating system scenarios