Skip to content

Commit

Permalink
Bug #2, add headings to "ignore-colour" post, fix "composer-suggest.."
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Nov 3, 2015
1 parent 43a58e7 commit 825d9fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion _posts/2015-10-15-high-contrast-ignore-colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<body>` of the web page --
Expand All @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions _posts/2015-10-25-composer-suggest-lace-open-media-player.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand All @@ -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",
Expand All @@ -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


..
Expand Down

0 comments on commit 825d9fd

Please sign in to comment.