Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcode: Slideshow: Make keyboard accessible #1001

Closed
kraftbj opened this issue Aug 12, 2014 · 10 comments
Closed

Shortcode: Slideshow: Make keyboard accessible #1001

kraftbj opened this issue Aug 12, 2014 · 10 comments
Labels
[Feature] Shortcodes / Embeds [Focus] Accessibility Improving usability for all users (a11y) [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Comments

@kraftbj
Copy link
Contributor

kraftbj commented Aug 12, 2014

The controls for the slideshow only appear on mouseover, making it difficult for keyboard users.

Initial look suggests this is what's requiring the mouse: https://github.com/Automattic/jetpack/blob/3.1.1/modules/shortcodes/js/slideshow-shortcode.js#L123-129

From user, ideal would be to remove the fade, always display, and ensure it can be reached via tab.

Reported in http://wordpress.org/support/topic/jetpack-and-web-accesibility?replies=1

@kraftbj kraftbj changed the title Shortcode: Slideshow: Make accessible Shortcode: Slideshow: Make keyboard accessible Aug 12, 2014
@jeherve jeherve added the a11y label Aug 17, 2014
@chrisdc
Copy link
Contributor

chrisdc commented Sep 9, 2014

Is everyone in favour of making the controls permanently visible, or is it worth a go at fading the controls in on focus as well as mouse over?

@georgestephanis
Copy link
Member

@MichaelArestad and @lancewillett -- thoughts from a design/aesthetic perspective?

@MichaelArestad
Copy link
Contributor

I would make the controls always visible albeit somewhat transparent until hover. Like @kraftbj said, the current design makes it difficult and unintuitive for touchscreen users.

@georgestephanis
Copy link
Member

So, maybe dim it to effective 50% opacity or the like? Unsure of the best way to actually apply a fix for ~.

@MichaelArestad
Copy link
Contributor

Probably something like this:
image

I just halved the background size and did some positioning adjustments in Inspector.

@chrisdc
Copy link
Contributor

chrisdc commented Sep 9, 2014

Sorry, but aren't we looking into this type of gallery? Quite possible I may be missing the point.

@kraftbj
Copy link
Contributor Author

kraftbj commented Sep 9, 2014

@MichaelArestad and @georgestephanis , @chrisdc is correct. This ticket is specifically for the Slideshow (not Carousel), though I'm fine with making both better :-)

@chrisdc
Copy link
Contributor

chrisdc commented Sep 9, 2014

There's a probably a better way of checking for focus, but replacing this with opacity: 0.5; and the code linked above with this does seem to work:

var controls = jQuery( this.controlsDiv_ );
slideshow.on( 'mouseenter focusin', function() {
    controls.stop();
    controls.fadeTo( 400, 1 );
} );
slideshow.on( 'mouseleave focusout', function() {
    if ( ! jQuery( slideshow ).find( ':focus' ).length ) {
        controls.fadeTo( 400, 0.5 );
    }
} );

@enejb
Copy link
Member

enejb commented Sep 25, 2014

Hi @chrisdc
Can you add
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
to the css as suggested by
http://css-tricks.com/css-transparency-settings-for-all-broswers/

Also can you make the fade transitions 200ms instead of 400ms I find 400ms just a bit too slow.
I think lines :
controls.stop();
controls.fadeTo( 400, 1 );
can be made into one
controls.stop().fadeTo( 400, 1 );

Thanks for your contributions let me know if you have any questions 👍

@chrisdc
Copy link
Contributor

chrisdc commented Sep 26, 2014

Hi @enejb I've added the code you asked for to the pull request. Let me know if you would like me to squash my changes at any point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Shortcodes / Embeds [Focus] Accessibility Improving usability for all users (a11y) [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

No branches or pull requests

6 participants