Project:Dynamic display block
Version:6.x-1.0-rc6
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed

Issue Summary

It's an accessibility thing (seizures could result from flashing graphics) from what a client said.

Against last stable, adds pause/resume to #pause2 #resume2; does not work with pause on hover (cyclic issue, couldnt find a way around it.).

AttachmentSize
pause.patch2.02 KB

Comments

#1

It's an accessibility thing (seizures could result from flashing graphics) from what a client said.
What do you mean by this?

Some code comments
The Id's in the patch should be classes. (not more then one Id per page)
Two declarations of block_selector
why use jQuery(block_selector + ' #pause2', context)?
why use $(block_selector, context)?

Can you give more comments in your code to explain what the jQuery code does?

#2

When showing website to a client they requested a pause button due to moving images may cause seizures (which is an accessibility issue).

Pause and resume were done has id's due to prev2 and next2 being IDs; should they be '.pause' and '.resume' without the 2 or is there reason for the 2?

I tend to not remember how each programming language handles it's scope so tend to play it safe by declaring variables on the same level as I use them, ie why I declared block_selector first then overrrode it for advanced, which looks to have a different selector.

why use jQuery(block_selector + ' #pause2', context)?
why use $(block_selector, context)?

If you mean jQuery VS $
In drupal 7 jQuery is going to be running in compadibility mode I believe. (jQuery.noConflict() #125030: Javascript: Allow compatibility with other libraries.), where the use of $ to use core jQuery will no be allowed. So generally seems like a better idea to start using jQuery instead of $ even for d6.

I'll do the changes after the whether to use 2 for the classes is answered, thanks for responding.

#3

Status:active» postponed

Maybe my english is not good enough to understand what you mean with: due to moving images may cause seizures (which is an accessibility issue).

Can you give an explanation what seizures is, and how this relates to an accessibility issue?

That prev2 and next2 are ID's, is wrong, they should be classes. That it has a 2 in the ID name is a result that there was an ID prev and next before in the javascript code (which have been removed later)

I mean the block_selector and the context in:
why use jQuery(block_selector + ' #pause2', context)?
why use $(block_selector, context)?

In drupal7 each javascript file with jQuery code will be wrapped in:

(function ($) {
original JS code
})(jquery);

No need to change all the $() into jQuery()

Before going into this issue part by part.

I found some time last couple of weeks to have a good look at the jQuery code used in the ddblock module, and a lot can be improved. I started improving the code for the views_slideshow_ddblock module at the moment . The changes will also be implemented in the ddblock module later.

I will release the optimized jQuery code (using jQuery best practises) soon with the views_sideshow_ddblock module.

You can use the code in the meantime in your code, but the implementation I have in mind for the modules is slightly different.

Thanks for your patch, but as of now you don't have to put more effort into this.
The solutions are there, just wait till it gets implemented in the modules.

Hope this helps you further.

#4

k, good to know about the wrapper (I had a a very bad expierence with $ and a conflict with a library I was trying to use that took ages to debug, so I've been using jQuery instead of $ since)

Seizures are when the body starts to shake without control. Flashing lights, images can cause them in those predisposed to them. Usually there's warnings in movies, etc. about how they can cause seizures.