Skip to content

Commit

Permalink
Subscription: Rewrites the styles to the hidden label way that hides …
Browse files Browse the repository at this point in the history
…the label but is still accessible to screenreaders.
  • Loading branch information
enejb committed Nov 13, 2014
1 parent bf8d67a commit f8b5e7c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/subscriptions.php
Expand Up @@ -655,7 +655,13 @@ function widget( $args, $instance ) {
<script>
( function( d ) {
if ( ( 'placeholder' in d.createElement( 'input' ) ) ) {
d.getElementById( 'jetpack-subscribe-label' ).style.visibility = 'hidden';
var label = d.getElementById( 'jetpack-subscribe-label' );
label.style.clip = 'rect(1px, 1px, 1px, 1px)';
label.style.position = 'absolute';
label.style.height = '1px';
label.style.width = '1px';
label.style.overflow = 'hidden';

}
} ) ( document );
</script>
Expand Down

0 comments on commit f8b5e7c

Please sign in to comment.