Tag Archive

Detect Locale with javascript

Published on 31 Oct 2011 By admin

There may be times where you would want to detect the language of the users browser. I would normally use php to detect the users browser language. However, when this is not possible, it can also be done using the following javascript: thelocale = ‘en-GB’; // set default locale if ( navigator ) { if [...]

Hiding content – accessibility consideration

Published on 21 Aug 2011 By admin

If you need to hide content but still want it available to screen readers, avoid using  display:none in your CSS. display:none means exactly what it says – NONE! Thus the element will also be hidden from all screen readers and all browsers. To have the element hidden from browsers, but still available to screen readers [...]