diff --git a/_posts/2015-10-15-high-contrast-ignore-colors.md b/_posts/2015-10-15-high-contrast-ignore-colors.md index a068c79..c148031 100644 --- a/_posts/2015-10-15-high-contrast-ignore-colors.md +++ b/_posts/2015-10-15-high-contrast-ignore-colors.md @@ -27,10 +27,12 @@ Under such settings, background images used on buttons and elsewhere will disapp Obviously, it's better to consider this situation upfront, and take care how background images and other styling is used. However, if you find that you need to fix a site after the fact, is there anything you can do? -Yes! +Why ... yes! This accessibility fix comprises two parts. +## The Javascript + This is one of the rare cases where we can detect how the user has set up their computer. First, the small Javascript script, [ignore-color.jquery.js][js], can be employed. It runs a test periodically by creating a hidden HTML element, setting its background colour, then detecting if the specified colour is still in use. If the user has used any sort of high contrast or "ignore-colour" setting in the operating system or browser, then the assigned colour will not be used -- the test will "fail". The Javascript uses the result of the test to set a class on the `` of the web page -- @@ -40,6 +42,8 @@ the only cost is that the test is run [every 4-8 seconds][tag-int] via `setInter Note, the `ignore-color` Javascript is based on [work by John Snyders][snyders]. +## The styles + While the first part of the fix is fairly generic, the second part is specific to each web site. The body-class set by the Javascript can be employed in CSS stylesheets, to take remedial actions. diff --git a/_posts/2015-10-25-composer-suggest-lace-open-media-player.md b/_posts/2015-10-25-composer-suggest-lace-open-media-player.md index c420268..ee630a7 100644 --- a/_posts/2015-10-25-composer-suggest-lace-open-media-player.md +++ b/_posts/2015-10-25-composer-suggest-lace-open-media-player.md @@ -37,7 +37,7 @@ standard dependency-manager for PHP, [Composer][], in my next project. This was the [LACE Evidence Hub][LACE-EH], for Doug Clow and Rebecca Ferguson. The LACE Evidence Hub was also built on WordPress, and grew in part out of the work -on the OER Research Hub. Part of what helped me decide on Composer, was [this 2013 post][] +on the OER Research Hub. Discoveries that helped me decide on Composer were [this 2013 post][], and the discovery of the [WordPress Packagist][] repository. @@ -62,7 +62,7 @@ Here's a short JSON example: Here is a [longer example][ex-2]: -{% highlight json %} +{% highlight json linenos %} "require": { "php": ">=5.3.3", "fancyguy/webroot-installer": "1.1.0", @@ -88,7 +88,7 @@ Some things worth noting: 1. The package `../google-universal-analytics` is always required; 2. Their are two optional WordPress versions, which can override the _default_ version (4.1); 3. Almost all the `suggestions` use a precise version constraint -- this is safer! -4. +4. x ..