how do I detect whether windows is in high contrast mode, or it displays large font or extra large font?
how do I detect whether windows is in high contrast m开发者_StackOverflow中文版ode, or it displays large font or extra large font?
I need to provide accessibility support in my javascript.
Thanks.
See this post.
in high contrast mode on Windows, background images should be set to "none" and it also changes the background color. This should override any CSS stylesheet. So you can perform some javascript to detect it after initial rendering.
Edit: You said you actually want to do this in Java. This has been covered before on SO:
Turns out the win.highContrast.on property was added in Java 1.4.1 for this purpose.
Try SystemParametersInfo
function with the following parameters:
- SPI_GETHIGHCONTRAST
- SPI_GETICONTITLELOGFONT
精彩评论