[wp-hackers] hide-if-no-js... what's the point? is wordpress functional without javascript?

Dion Hulse (dd32) wordpress at dd32.id.au
Fri Feb 4 11:53:53 UTC 2011


They're set by Javascript in the body:
http://core.trac.wordpress.org/browser/trunk/wp-admin/admin-header.php#L94
You'll need to check the source code of the iframe to ensure that the  
proper JS is there.

That works in conjunction with this CSS:
http://core.trac.wordpress.org/browser/trunk/wp-admin/css/global.dev.css#L198

Honestly, I have to say, It's a pretty ingenious solution IMO, As long as  
both the CSS, The Javascript, And the body classes exist, it all just  
works..

On Fri, 04 Feb 2011 22:38:46 +1100, Davit Barbakadze <jayarjo at gmail.com>  
wrote:

> Where are those classes set actually? I tried to use them in media
> iframe, where I add some controls and it seems to function the opposite
> way. hide-if-js is displayed and hide-if-no-js hidden.
>
>
> Davit Barbakadze
> On Tue, Feb 1, 2011 at 3:07 AM, Mark Jaquith <markjaquith at gmail.com>  
> wrote:
>> On Sun, Jan 30, 2011 at 1:02 PM, Jane Wells <jane at automattic.com> wrote:
>>> WordPress is intentionally functional with JavaScript turned off to  
>>> comply
>>> with accessibility regulations.
>>
>> I'd like to think that our reasons are deeper than mere compliance
>> (and I'm sure you agree)!
>>
>> On 1/30/11 12:17 PM, Davit Barbakadze wrote:
>>> I tried and it surprisingly does to some extent. But then... what's  
>>> the point?
>>
>> For someone with disabilities, accessible web publishing could
>> literally change their life. It's just the right thing to do. And
>> while we're not perfect, our considerable efforts have yielded a
>> remarkably accessible application.
>>
>> We have two "magic" classes you can use: hide-if-no-js and hide-if-js.
>> I recommend that your plugins leverage these as much as possible when
>> creating accessible administration screens.


More information about the wp-hackers mailing list