Skip to content

Commit

Permalink
Updating WAVE URL to be https, removing "no WAVE if SSL" messaging si…
Browse files Browse the repository at this point in the history
…nce WAVE Is now SSL
  • Loading branch information
bamadesigner committed Sep 9, 2020
1 parent 6dcf451 commit 7ae53ea
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 107 deletions.
6 changes: 0 additions & 6 deletions assets/css/src/admin-edit-post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@

}

#wa11y-wave-eval-no-SSL {
background: #f8f8f8;
padding: 21px 20px 26px 20px !important;
margin: 0 0 5px 0!important;
}

iframe#wa11y-wave-evaluation-mb-iframe {
width: 100%;
min-height: 600px;
Expand Down
55 changes: 14 additions & 41 deletions includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,31 +192,19 @@ public function print_post_meta_boxes( $post, $metabox ) {

case 'wa11y-wave-evaluation-mb':

// If SSL, we can't load the iframe because WAVE isn't SSL so add a message.
if ( is_ssl() ) :
// Build WAVE evaluation URL.
$wave_url = 'https://wave.webaim.org/report#/' . urlencode( get_permalink( $post->ID ) );

// Build anchor element to settings page.
$settings_page_anchor = '<a href="' . add_query_arg( array( 'page' => 'wa11y' ), admin_url( 'options-general.php' ) ) . '" title="' . sprintf( esc_attr__( 'Visit the %s settings page', 'wa11y' ), 'wA11y' ) . '" target="_blank">';
// Filter the WAVE url - includes $post object.
$wave_url = apply_filters( 'wa11y_wave_url', $wave_url, $post );

?>
<p id="wa11y-wave-eval-no-SSL"><strong><?php printf( __( 'At this time, the %1$s evaluation iframe cannot be embedded on a site using SSL because the %2$s site does not use SSL.', 'wa11y' ), 'WAVE', 'WAVE' ); ?></strong> <?php printf( __( 'If you would like to remove this message, please uncheck the "Display %1$s evaluation when editing content" setting on %2$sthe %3$s settings page%4$s.', 'wa11y' ), 'WAVE', $settings_page_anchor, 'wA11y', '</a>' ); ?></p>
<?php

else :

// Build WAVE evaluation URL.
$wave_url = 'http://wave.webaim.org/report#/' . urlencode( get_permalink( $post->ID ) );

// Filter the WAVE url - includes $post object.
$wave_url = apply_filters( 'wa11y_wave_url', $wave_url, $post );

// Print the WAVE evaluation iframe.
?>
<a class="wa11y-wave-open-evaluation" href="<?php echo $wave_url; ?>" target="_blank"><?php printf( __( 'Open %s evaluation in new window', 'wa11y' ), 'WAVE' ); ?></a>
<iframe id="wa11y-wave-evaluation-mb-iframe" src="<?php echo $wave_url; ?>"></iframe>
<?php

endif;
// Print the WAVE evaluation iframe.
?>
<a class="wa11y-wave-open-evaluation"
href="<?php echo $wave_url; ?>"
target="_blank"><?php printf( __( 'Open %s evaluation in new window', 'wa11y' ), 'WAVE' ); ?></a>
<iframe id="wa11y-wave-evaluation-mb-iframe" src="<?php echo $wave_url; ?>"></iframe>
<?php

break;
}
Expand Down Expand Up @@ -472,9 +460,6 @@ public function print_options_meta_boxes( $post, $metabox ) {
// Get WAVE settings.
$wave_settings = wa11y()->get_settings( 'wave' );

// Have to disable the admin WAVE evaluation if SSL because WAVE isn't SSL.
$disable_admin_wave = is_ssl();

?>
<div class="wa11y-tool-settings wave-tool-settings">

Expand Down Expand Up @@ -542,21 +527,9 @@ public function print_options_meta_boxes( $post, $metabox ) {
<span class="tool-option-side-note"><?php _e( "In the front-end, this will allow you to quickly evaluate any page that you're viewing. In the admin, the link will only display on screens where you are editing a post or a page.", 'wa11y' ); ?> <span class="highlight-red"><strong><?php printf( __( '%s can only evaluate publicly-accessible pages.', 'wa11y' ), 'WAVE' ); ?></strong></span></span>
</li>

<li<?php echo $disable_admin_wave ? ' class="disabled"' : null; ?>><label class="tool-option-header" for="wave-admin"><?php printf( __( 'Display %s evaluation when editing content', 'wa11y' ), 'WAVE' ); ?>:</label>
<input class="tool-option-checkbox" id="wave-admin" type="checkbox" name="wa11y_settings[tools][wave][load_admin_edit]" value="1"<?php checked( ! $disable_admin_wave && isset( $wave_settings['load_admin_edit'] ) && $wave_settings['load_admin_edit'] > 0 ); disabled( $disable_admin_wave ); ?> />
<?php

if ( $disable_admin_wave ) :
?>
<span class="tool-option-disabled-message"><?php printf( __( 'At this time, the %1$s evaluation iframe cannot be embedded on a site using SSL because the %2$s site does not use SSL.', 'wa11y' ), 'WAVE', 'WAVE' ); ?></span>
<?php
else :
?>
<span class="tool-option-side-note"><?php printf( __( 'The %1$s evaluation will only display on screens where you are editing a post or a page. <strong>%1$s can only evaluate publicly-accessible pages.</strong>', 'wa11y' ), 'WAVE', 'WAVE' ); ?> <span class="highlight-red"><strong><?php printf( __( '%s can only evaluate publicly-accessible pages.', 'wa11y' ), 'WAVE' ); ?></strong></span></span>
<?php
endif;

?>
<li><label class="tool-option-header" for="wave-admin"><?php printf( __( 'Display %s evaluation when editing content', 'wa11y' ), 'WAVE' ); ?>:</label>
<input class="tool-option-checkbox" id="wave-admin" type="checkbox" name="wa11y_settings[tools][wave][load_admin_edit]" value="1"<?php checked( isset( $wave_settings['load_admin_edit'] ) && $wave_settings['load_admin_edit'] > 0 ); ?> />
<span class="tool-option-side-note"><?php printf( __( 'The %1$s evaluation will only display on screens where you are editing a post or a page. <strong>%1$s can only evaluate publicly-accessible pages.</strong>', 'wa11y' ), 'WAVE', 'WAVE' ); ?> <span class="highlight-red"><strong><?php printf( __( '%s can only evaluate publicly-accessible pages.', 'wa11y' ), 'WAVE' ); ?></strong></span></span>
</li>
</ul>
</fieldset>
Expand Down
116 changes: 56 additions & 60 deletions languages/wa11y.pot
Original file line number Diff line number Diff line change
Expand Up @@ -16,207 +16,203 @@ msgstr ""
msgid "Accessibility Evaluation"
msgstr ""

#: includes/admin.php:199, includes/admin.php:580
msgid "Visit the %s settings page"
msgstr ""

#: includes/admin.php:202, includes/admin.php:551
msgid "At this time, the %1$s evaluation iframe cannot be embedded on a site using SSL because the %2$s site does not use SSL."
msgstr ""

#: includes/admin.php:202
msgid "If you would like to remove this message, please uncheck the \"Display %1$s evaluation when editing content\" setting on %2$sthe %3$s settings page%4$s."
msgstr ""

#: includes/admin.php:215
#: includes/admin.php:205
msgid "Open %s evaluation in new window"
msgstr ""

#: includes/admin.php:247
#: includes/admin.php:235
msgid "The Web Accessibility Toolbox"
msgstr ""

#: includes/admin.php:267, includes/admin.php:282
#: includes/admin.php:255, includes/admin.php:270
msgid "Save Your Changes"
msgstr ""

#: includes/admin.php:307
#: includes/admin.php:295
msgid "About %s"
msgstr ""

#: includes/admin.php:310
#: includes/admin.php:298
msgid "Accessibility Resources"
msgstr ""

#: includes/admin.php:313
#: includes/admin.php:301
msgid "Spread the Love"
msgstr ""

#: includes/admin.php:319
#: includes/admin.php:307
msgid "Web Accessibility Evaluation Tool"
msgstr ""

#: includes/admin.php:348
#: includes/admin.php:336
msgid "%s is a toolbox of resources to help you improve the accessibility of your WordPress website."
msgstr ""

#: includes/admin.php:354
#: includes/admin.php:342
msgid "Version"
msgstr ""

#: includes/admin.php:355
#: includes/admin.php:343
msgid "Author"
msgstr ""

#: includes/admin.php:366
#: includes/admin.php:354
msgid "The %1$s community has a %2$sgreat list of accessibility resources and tools%3$s available on their website."
msgstr ""

#: includes/admin.php:367
#: includes/admin.php:355
msgid "This resource is open-source and %1$s would love for you to contribute. %2$sVisit the %3$s Resources repo%4$s to learn how to contribute."
msgstr ""

#: includes/admin.php:376, includes/admin.php:376
#: includes/admin.php:364, includes/admin.php:364
msgid "Give the plugin a good rating"
msgstr ""

#: includes/admin.php:379
#: includes/admin.php:367
msgid "Follow bamadesigner on Twitter"
msgstr ""

#: includes/admin.php:379
#: includes/admin.php:367
msgid "Follow me on Twitter"
msgstr ""

#: includes/admin.php:382
#: includes/admin.php:370
msgid "Donate a few bucks to the plugin"
msgstr ""

#: includes/admin.php:382
#: includes/admin.php:370
msgid "Donate"
msgstr ""

#: includes/admin.php:382
#: includes/admin.php:370
msgid "and buy me a coffee"
msgstr ""

#: includes/admin.php:399
#: includes/admin.php:387
msgid "Enable %s"
msgstr ""

#: includes/admin.php:400
#: includes/admin.php:388
msgid "%1$s%2$s%3$s is an accessibility visualization toolkit provided by your friends at %4$s%5$s%6$s. It is a single JavaScript file that inserts a small button in the bottom corner of your document and helps visualize how your site performs with assistive technologies."
msgstr ""

#: includes/admin.php:405, includes/admin.php:489
#: includes/admin.php:393, includes/admin.php:477
msgid "Why %s Is Awesome"
msgstr ""

#: includes/admin.php:406
#: includes/admin.php:394
msgid "%1$s consists of several plugins, each with their own functionality, that works to help you visualize accessibility violations (and successes) while also educating you on best practices. Beyond simply pointing out errors, many %2$s plugins also suggest ways to fix these violations - specifically tailored to your document."
msgstr ""

#: includes/admin.php:408, includes/admin.php:492
#: includes/admin.php:396, includes/admin.php:480
msgid "Best Uses For %s"
msgstr ""

#: includes/admin.php:409
#: includes/admin.php:397
msgid "%1$s is built to scan, and provide feedback on, an entire document so this tool is best used to evaluate pages on the front-end of your site. <strong>%2$s can scan any page that you can load</strong> so the page does not have to be published."
msgstr ""

#: includes/admin.php:411, includes/admin.php:495
#: includes/admin.php:399, includes/admin.php:483
msgid "Other Resources"
msgstr ""

#: includes/admin.php:415
#: includes/admin.php:403
msgid "View the available %1$s %2$s extensions"
msgstr ""

#: includes/admin.php:418
#: includes/admin.php:406
msgid "There are several %1$s%2$s extensions%3$s available."
msgstr ""

#: includes/admin.php:424
#: includes/admin.php:412
msgid "If no user roles are selected or user capability is provided, %s will load for all logged-in users."
msgstr ""

#: includes/admin.php:440
#: includes/admin.php:428
msgid "Only load %s for specific user roles"
msgstr ""

#: includes/admin.php:453
#: includes/admin.php:441
msgid "Only load %s for a specific user capability"
msgstr ""

#: includes/admin.php:458
#: includes/admin.php:446
msgid "Load %s in the admin"
msgstr ""

#: includes/admin.php:460
#: includes/admin.php:448
msgid "This will load the %s button on all pages in the admin to give you a glimpse of admin accessibility."
msgstr ""

#: includes/admin.php:483
#: includes/admin.php:471
msgid "Enable %1$s %2$s(Web Accessibility Evaluation Tool)%3$s"
msgstr ""

#: includes/admin.php:484
#: includes/admin.php:472
msgid "%1$s%2$s%3$s is a free evaluation tool provided by %4$s%5$s (Web Accessibility In Mind)%6$s. It can be used to evaluate a live website for a wide range of accessibility issues. When this tool is enabled, a 'View %7$s evaluation' button will be placed in your WordPress admin bar to help you quickly evaluate the page you're viewing."
msgstr ""

#: includes/admin.php:490
#: includes/admin.php:478
msgid "%1$s provides a simple, straight forward evaluation of any public webpage and allows you to filter the evaluation by standard: Full, Section 508, and WCAG 2.0 A and AA. If your page does contain errors, the report provides documentation to explain the issue and how to fix it. %2$s also provides a color contrast checker."
msgstr ""

#: includes/admin.php:493
#: includes/admin.php:481
msgid "%1$s is built to scan, and provide feedback on, an entire document so this tool is best used to evaluate pages on the front-end of your site. A big difference between %2$s and %3$s is that <strong>%4$s can only evaluate publicly-accessible pages</strong> so it's not ideal for local/staging environments or content that is password-protected."
msgstr ""

#: includes/admin.php:499
#: includes/admin.php:487
msgid "Learn more about the %1$s %2$s extension"
msgstr ""

#: includes/admin.php:500
#: includes/admin.php:488
msgid "Learn more about the %s API"
msgstr ""

#: includes/admin.php:503
#: includes/admin.php:491
msgid "%1$s also offers %2$sa %3$s extension%4$s and %5$san API%6$s for those who need more in-depth usage."
msgstr ""

#: includes/admin.php:509
#: includes/admin.php:497
msgid "If no user roles are selected or user capability is provided, %s will display for all logged-in users."
msgstr ""

#: includes/admin.php:526
#: includes/admin.php:514
msgid "Only show %s for specific user roles"
msgstr ""

#: includes/admin.php:538
#: includes/admin.php:526
msgid "Only show %s for a specific user capability"
msgstr ""

#: includes/admin.php:540
#: includes/admin.php:528
msgid "Add link to %s evalution to the WordPress toolbar"
msgstr ""

#: includes/admin.php:542
#: includes/admin.php:530
msgid "In the front-end, this will allow you to quickly evaluate any page that you're viewing. In the admin, the link will only display on screens where you are editing a post or a page."
msgstr ""

#: includes/admin.php:542, includes/admin.php:555
#: includes/admin.php:530, includes/admin.php:543
msgid "%s can only evaluate publicly-accessible pages."
msgstr ""

#: includes/admin.php:545
#: includes/admin.php:533
msgid "Display %s evaluation when editing content"
msgstr ""

#: includes/admin.php:555
#: includes/admin.php:539
msgid "At this time, the %1$s evaluation iframe cannot be embedded on a site using SSL because the %2$s site does not use SSL."
msgstr ""

#: includes/admin.php:543
msgid "The %1$s evaluation will only display on screens where you are editing a post or a page. <strong>%1$s can only evaluate publicly-accessible pages.</strong>"
msgstr ""

#: includes/admin.php:580
#: includes/admin.php:568
msgid "Visit the %s settings page"
msgstr ""

#: includes/admin.php:568
msgid "Settings"
msgstr ""

Expand Down

0 comments on commit 7ae53ea

Please sign in to comment.