<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[36964] trunk/src: Accessibility: Improve accessibility for the Plugin details modal.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/36964">36964</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/36964","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>afercia</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-03-10 22:36:25 +0000 (Thu, 10 Mar 2016)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Accessibility: Improve accessibility for the Plugin details modal.
The plugin details modal can be invoked from several screens. There's now a new
`.open-plugin-details-modal` CSS class to be used in combination with the
`.thickbox` CSS class that adds everything needed for accessibility.
- Adds an ARIA role `dialog` and an `aria-label` attribute to the modal
- Adds a `title` attribute to the iframe inside the modal
- Constrains tabbing within the modal
- Restores focus back in a proper place when closing the modal
Also, improves a bit the native Thickbox implementation: it should probably be
replaced with some more modern tool but at least keyboard focus should be moved
inside the modal.
Fixes <a href="https://core.trac.wordpress.org/ticket/33305">#33305</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminaboutphp">trunk/src/wp-admin/about.php</a></li>
<li><a href="#trunksrcwpadmincsscommoncss">trunk/src/wp-admin/css/common.css</a></li>
<li><a href="#trunksrcwpadminimportphp">trunk/src/wp-admin/import.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpplugininstalllisttablephp">trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswppluginslisttablephp">trunk/src/wp-admin/includes/class-wp-plugins-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesdashboardphp">trunk/src/wp-admin/includes/dashboard.php</a></li>
<li><a href="#trunksrcwpadminincludesupdatephp">trunk/src/wp-admin/includes/update.php</a></li>
<li><a href="#trunksrcwpadminjsplugininstalljs">trunk/src/wp-admin/js/plugin-install.js</a></li>
<li><a href="#trunksrcwpadminupdatecorephp">trunk/src/wp-admin/update-core.php</a></li>
<li><a href="#trunksrcwpincludesjsthickboxthickboxcss">trunk/src/wp-includes/js/thickbox/thickbox.css</a></li>
<li><a href="#trunksrcwpincludesjsthickboxthickboxjs">trunk/src/wp-includes/js/thickbox/thickbox.js</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminaboutphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/about.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/about.php 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/about.php 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,7 +139,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'height' => 550
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $plugin_link = '<a href="' . esc_url( add_query_arg( $url_args, network_admin_url( 'plugin-install.php' ) ) ) . '" class="thickbox">WordPress REST API</a>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $plugin_link = '<a href="' . esc_url( add_query_arg( $url_args, network_admin_url( 'plugin-install.php' ) ) ) . '" class="thickbox open-plugin-details-modal">WordPress REST API</a>';
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $plugin_link = '<a href="https://wordpress.org/plugins/rest-api">WordPress REST API</a>';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadmincsscommoncss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/common.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/common.css 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/css/common.css 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2814,67 +2814,67 @@
</span><span class="cx" style="display: block; padding: 0 10px"> display: none;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.about-php .tb-close-icon,
-body.plugin-install-php .tb-close-icon,
-body.import-php .tb-close-icon,
-body.plugins-php .tb-close-icon,
-body.update-core-php .tb-close-icon,
-body.index-php .tb-close-icon {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/* only on these screens */
+.about-php #TB_closeWindowButton,
+.plugin-install-php #TB_closeWindowButton,
+.import-php #TB_closeWindowButton,
+.plugins-php #TB_closeWindowButton,
+.update-core-php #TB_closeWindowButton,
+.index-php #TB_closeWindowButton {
</ins><span class="cx" style="display: block; padding: 0 10px"> left: auto;
</span><span class="cx" style="display: block; padding: 0 10px"> right: -30px;
</span><span class="cx" style="display: block; padding: 0 10px"> color: #eee;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- -webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
- transition: color .1s ease-in-out, background .1s ease-in-out;
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+body.about-php #TB_closeWindowButton:hover,
</ins><span class="cx" style="display: block; padding: 0 10px"> body.about-php #TB_closeWindowButton:focus,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.about-php #TB_closeWindowButton:focus .tb-close-icon,
-body.about-php .tb-close-icon:focus,
-body.about-php .tb-close-icon:hover,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.plugin-install-php #TB_closeWindowButton:hover,
</ins><span class="cx" style="display: block; padding: 0 10px"> body.plugin-install-php #TB_closeWindowButton:focus,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.plugin-install-php #TB_closeWindowButton:focus .tb-close-icon,
-body.plugin-install-php .tb-close-icon:focus,
-body.plugin-install-php .tb-close-icon:hover,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.import-php #TB_closeWindowButton:hover,
</ins><span class="cx" style="display: block; padding: 0 10px"> body.import-php #TB_closeWindowButton:focus,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.import-php #TB_closeWindowButton:focus .tb-close-icon,
-body.import-php .tb-close-icon:focus,
-body.import-php .tb-close-icon:hover,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.plugins-php #TB_closeWindowButton:hover,
</ins><span class="cx" style="display: block; padding: 0 10px"> body.plugins-php #TB_closeWindowButton:focus,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.plugins-php #TB_closeWindowButton:focus .tb-close-icon,
-body.plugins-php .tb-close-icon:focus,
-body.plugins-php .tb-close-icon:hover,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.update-core-php #TB_closeWindowButton:hover,
</ins><span class="cx" style="display: block; padding: 0 10px"> body.update-core-php #TB_closeWindowButton:focus,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.update-core-php #TB_closeWindowButton:focus .tb-close-icon,
-body.update-core-php .tb-close-icon:focus,
-body.update-core-php .tb-close-icon:hover,
-body.index-php #TB_closeWindowButton:focus,
-body.index-php #TB_closeWindowButton:focus .tb-close-icon,
-body.index-php .tb-close-icon:focus,
-body.index-php .tb-close-icon:hover {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.index-php #TB_closeWindowButton:hover,
+body.index-php #TB_closeWindowButton:focus {
</ins><span class="cx" style="display: block; padding: 0 10px"> color: #00a0d2;
</span><span class="cx" style="display: block; padding: 0 10px"> outline: none;
</span><span class="cx" style="display: block; padding: 0 10px"> -webkit-box-shadow: none;
</span><span class="cx" style="display: block; padding: 0 10px"> box-shadow: none;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-body.about-php .tb-close-icon:before,
-body.plugin-install-php .tb-close-icon:before,
-body.import-php .tb-close-icon:before,
-body.plugins-php .tb-close-icon:before,
-body.update-core-php .tb-close-icon:before,
-body.index-php .tb-close-icon:before {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+body.about-php .tb-close-icon,
+body.plugin-install-php .tb-close-icon,
+body.import-php .tb-close-icon,
+body.plugins-php .tb-close-icon,
+body.update-core-php .tb-close-icon,
+body.index-php .tb-close-icon {
+ display: none;
+}
+
+body.about-php #TB_closeWindowButton:after,
+body.plugin-install-php #TB_closeWindowButton:after,
+body.import-php #TB_closeWindowButton:after,
+body.plugins-php #TB_closeWindowButton:after,
+body.update-core-php #TB_closeWindowButton:after,
+body.index-php #TB_closeWindowButton:after {
</ins><span class="cx" style="display: block; padding: 0 10px"> content: "\f335";
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- font-size: 32px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ font: normal 32px/29px 'dashicons';
+ speak: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* move plugin install close icon to top on narrow screens */
</span><span class="cx" style="display: block; padding: 0 10px"> @media screen and ( max-width: 830px ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- body.about-php .tb-close-icon,
- body.plugin-install-php .tb-close-icon,
- body.import-php .tb-close-icon,
- body.plugins-php .tb-close-icon,
- body.update-core-php .tb-close-icon,
- body.index-php .tb-close-icon {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ body.about-php #TB_closeWindowButton,
+ body.plugin-install-php #TB_closeWindowButton,
+ body.import-php #TB_closeWindowButton,
+ body.plugins-php #TB_closeWindowButton,
+ body.update-core-php #TB_closeWindowButton,
+ body.index-php #TB_closeWindowButton {
</ins><span class="cx" style="display: block; padding: 0 10px"> right: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> top: -30px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminimportphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/import.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/import.php 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/import.php 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -101,7 +101,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty($action) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_main_site() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $action = '<a href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug .
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox" title="' .
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal" title="' .
</ins><span class="cx" style="display: block; padding: 0 10px"> esc_attr__('Install importer') . '">' . $data[0] . '</a>';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $action = $data[0];
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpplugininstalllisttablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -476,7 +476,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> '&TB_iframe=true&width=600&height=550' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: Plugin name and version. */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $action_links[] = '<a href="' . esc_url( $details_link ) . '" class="thickbox" aria-label="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $action_links[] = '<a href="' . esc_url( $details_link ) . '" class="thickbox open-plugin-details-modal" aria-label="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !empty( $plugin['icons']['svg'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $plugin_icon_url = $plugin['icons']['svg'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -504,7 +504,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="plugin-card-top">
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="name column-name">
</span><span class="cx" style="display: block; padding: 0 10px"> <h3>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox open-plugin-details-modal">
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php echo $title; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <img src="<?php echo esc_attr( $plugin_icon_url ) ?>" class="plugin-icon" alt="">
</span><span class="cx" style="display: block; padding: 0 10px"> </a>
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswppluginslisttablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-plugins-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-plugins-list-table.php 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/includes/class-wp-plugins-list-table.php 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -742,7 +742,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Details link using API info, if available
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $plugin_data['slug'] ) && current_user_can( 'install_plugins' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $plugin_meta[] = sprintf( '<a href="%s" class="thickbox" aria-label="%s" data-title="%s">%s</a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $plugin_meta[] = sprintf( '<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
</ins><span class="cx" style="display: block; padding: 0 10px"> esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] .
</span><span class="cx" style="display: block; padding: 0 10px"> '&TB_iframe=true&width=600&height=550' ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> esc_attr( sprintf( __( 'More information about %s' ), $plugin_name ) ),
</span></span></pre></div>
<a id="trunksrcwpadminincludesdashboardphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/dashboard.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/dashboard.php 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/includes/dashboard.php 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1245,7 +1245,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800';
</span><span class="cx" style="display: block; padding: 0 10px"> echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) .
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ' <a href="' . $ilink . '" class="thickbox" aria-label="' .
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ' <a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
</ins><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: plugin name */
</span><span class="cx" style="display: block; padding: 0 10px"> esc_attr( sprintf( __( 'Install %s' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminincludesupdatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/update.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/update.php 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/includes/update.php 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -339,7 +339,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( 'update_plugins' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>.' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> $plugin_name,
</span><span class="cx" style="display: block; padding: 0 10px"> esc_url( $details_url ),
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: plugin name, 2: version number */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -348,7 +348,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( empty( $r->package ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> $plugin_name,
</span><span class="cx" style="display: block; padding: 0 10px"> esc_url( $details_url ),
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: plugin name, 2: version number */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -357,7 +357,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> $plugin_name,
</span><span class="cx" style="display: block; padding: 0 10px"> esc_url( $details_url ),
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: plugin name, 2: version number */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -469,7 +469,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can('update_themes') ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>.'),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.'),
</ins><span class="cx" style="display: block; padding: 0 10px"> $theme_name,
</span><span class="cx" style="display: block; padding: 0 10px"> esc_url( $details_url ),
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: theme name, 2: version number */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -478,7 +478,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( empty( $r['package'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> $theme_name,
</span><span class="cx" style="display: block; padding: 0 10px"> esc_url( $details_url ),
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: theme name, 2: version number */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -487,7 +487,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: theme name, 2: details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> $theme_name,
</span><span class="cx" style="display: block; padding: 0 10px"> esc_url( $details_url ),
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: theme name, 2: version number */
</span></span></pre></div>
<a id="trunksrcwpadminjsplugininstalljs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/plugin-install.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/plugin-install.js 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/js/plugin-install.js 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,14 +1,23 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/* global plugininstallL10n, tb_click */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/* global plugininstallL10n, tb_click, tb_remove */
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* Plugin Browser Thickbox related JS*/
</span><span class="cx" style="display: block; padding: 0 10px"> var tb_position;
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery( document ).ready( function( $ ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ var tbWindow,
+ $focusedBefore,
+ $iframeBody,
+ $tabbables,
+ $firstTabbable,
+ $lastTabbable;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> tb_position = function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var tbWindow = $( '#TB_window' ),
- width = $( window ).width(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var width = $( window ).width(),
</ins><span class="cx" style="display: block; padding: 0 10px"> H = $( window ).height() - ( ( 792 < width ) ? 60 : 20 ),
</span><span class="cx" style="display: block; padding: 0 10px"> W = ( 792 < width ) ? 772 : width - 20;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ tbWindow = $( '#TB_window' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( tbWindow.length ) {
</span><span class="cx" style="display: block; padding: 0 10px"> tbWindow.width( W ).height( H );
</span><span class="cx" style="display: block; padding: 0 10px"> $( '#TB_iframeContent' ).width( W ).height( H );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -38,16 +47,111 @@
</span><span class="cx" style="display: block; padding: 0 10px"> tb_position();
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $( '.plugin-card, .plugins .plugin-version-author-uri' ).on( 'click', 'a.thickbox', function( e ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Custom events: when a Thickbox iframe has loaded and when the Thickbox
+ * modal gets removed from the DOM.
+ */
+ $( 'body' )
+ .on( 'thickbox:iframe:loaded', tbWindow, function() {
+ iframeLoaded();
+ })
+ .on( 'thickbox:removed', function() {
+ // Set focus back to the element that opened the modal dialog.
+ // Note: IE 8 would need this wrapped in a fake setTimeout `0`.
+ $focusedBefore.focus();
+ });
+
+ function iframeLoaded() {
+ var $iframe = tbWindow.find( '#TB_iframeContent' );
+
+ // Get the iframe body.
+ $iframeBody = $iframe.contents().find( 'body' );
+
+ // Get the tabbable elements and handle the keydown event on first load.
+ handleTabbables();
+
+ // Set initial focus on the "Close" button.
+ $firstTabbable.focus();
+
+ /*
+ * When the "Install" button is disabled (e.g. the Plugin is already installed)
+ * then we can't predict where the last focusable element is. We need to get
+ * the tabbable elements and handle the keydown event again and again,
+ * each time the active tab panel changes.
+ */
+ $( '#plugin-information-tabs a', $iframeBody ).on( 'click', function() {
+ handleTabbables();
+ });
+
+ // Close the modal when pressing Escape.
+ $iframeBody.on( 'keydown', function( event ) {
+ if ( 27 !== event.which ) {
+ return;
+ }
+ tb_remove();
+ });
+ }
+
+ /*
+ * Get the tabbable elements and detach/attach the keydown event.
+ * Called after the iframe has fully loaded so we have all the elements we need.
+ * Called again each time a Tab gets clicked.
+ * @todo Consider to implement a WordPress general utility for this and don't use jQuery UI.
+ */
+ function handleTabbables() {
+ var $firstAndLast;
+ // Get all the tabbable elements.
+ $tabbables = $( ':tabbable', $iframeBody );
+ // Our first tabbable element is always the "Close" button.
+ $firstTabbable = tbWindow.find( '#TB_closeWindowButton' );
+ // Get the last tabbable element.
+ $lastTabbable = $tabbables.last();
+ // Make a jQuery collection.
+ $firstAndLast = $firstTabbable.add( $lastTabbable );
+ // Detach any previously attached keydown event.
+ $firstAndLast.off( 'keydown.wp-plugin-details' );
+ // Attach again the keydown event on the first and last focusable elements.
+ $firstAndLast.on( 'keydown.wp-plugin-details', function( event ) {
+ constrainTabbing( event );
+ });
+ }
+
+ // Constrain tabbing within the plugin modal dialog.
+ function constrainTabbing( event ) {
+ if ( 9 !== event.which ) {
+ return;
+ }
+
+ if ( $lastTabbable[0] === event.target && ! event.shiftKey ) {
+ event.preventDefault();
+ $firstTabbable.focus();
+ } else if ( $firstTabbable[0] === event.target && event.shiftKey ) {
+ event.preventDefault();
+ $lastTabbable.focus();
+ }
+ }
+
+ // Open the Plugin details modal.
+ $( '.thickbox.open-plugin-details-modal' ).on( 'click', function( e ) {
+ // The `data-title` attribute is used only in the Plugin screens.
+ var title = $( this ).data( 'title' ) ? plugininstallL10n.plugin_information + ' ' + $( this ).data( 'title' ) : plugininstallL10n.plugin_modal_label;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> e.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px"> e.stopPropagation();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Store the element that has focus before opening the modal dialog, i.e. the control which opens it.
+ $focusedBefore = $( this );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> tb_click.call(this);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('#TB_title').css({'background-color':'#23282d','color':'#cfcfcf'});
- $('#TB_ajaxWindowTitle').html( '<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).data( 'title' ) );
- $('#TB_iframeContent').attr( 'title', plugininstallL10n.plugin_information + ' ' + $(this).data( 'title' ) );
- $('#TB_closeWindowButton').focus();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Set ARIA role and ARIA label.
+ tbWindow.attr({
+ 'role': 'dialog',
+ 'aria-label': plugininstallL10n.plugin_modal_label
+ });
+
+ // Set title attribute on the iframe.
+ tbWindow.find( '#TB_iframeContent' ).attr( 'title', title );
</ins><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* Plugin install related JS */
</span></span></pre></div>
<a id="trunksrcwpadminupdatecorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/update-core.php 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-admin/update-core.php 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -284,7 +284,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $details_name = sprintf( '<span class="screen-reader-text">%1$s</span>', esc_attr( $plugin_data->Name ) );
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: Plugin name 2: Plugin version */
</span><span class="cx" style="display: block; padding: 0 10px"> $details_text = sprintf( __( 'View %1$s version %2$s details.' ), $details_name, $plugin_data->update->new_version );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $details = sprintf( '<a href="%1$s" class="thickbox">%2$s</a>', esc_url( $details_url ), $details_text );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $details = sprintf( '<a href="%1$s" class="thickbox open-plugin-details-modal">%2$s</a>', esc_url( $details_url ), $details_text );
</ins><span class="cx" style="display: block; padding: 0 10px"> $checkbox_id = "checkbox_" . md5( $plugin_data->Name );
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span></span></pre></div>
<a id="trunksrcwpincludesjsthickboxthickboxcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/thickbox/thickbox.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/thickbox/thickbox.css 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-includes/js/thickbox/thickbox.css 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,14 +43,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> float: right;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-#TB_closeAjaxWindow {
- float: right;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+#TB_closeWindowButton {
+ position: absolute;
+ left: auto;
+ right: 0;
+ width: 29px;
+ height: 29px;
+ border: 0;
+ padding: 0;
+ background: none;
+ cursor: pointer;
+ outline: none;
+ -webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
+ transition: color .1s ease-in-out, background .1s ease-in-out;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-#TB_closeAjaxWindow a {
- text-decoration: none;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> #TB_ajaxWindowTitle {
</span><span class="cx" style="display: block; padding: 0 10px"> float: left;
</span><span class="cx" style="display: block; padding: 0 10px"> font-weight: 600;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -115,6 +122,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .tb-close-icon {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ display: block;
</ins><span class="cx" style="display: block; padding: 0 10px"> color: #666;
</span><span class="cx" style="display: block; padding: 0 10px"> text-align: center;
</span><span class="cx" style="display: block; padding: 0 10px"> line-height: 29px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -133,6 +141,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> -moz-osx-font-smoothing: grayscale;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.tb-close-icon:hover {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+#TB_closeWindowButton:hover .tb-close-icon,
+#TB_closeWindowButton:focus .tb-close-icon {
</ins><span class="cx" style="display: block; padding: 0 10px"> color: #00a0d2;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesjsthickboxthickboxjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/thickbox/thickbox.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/thickbox/thickbox.js 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-includes/js/thickbox/thickbox.js 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -41,6 +41,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var $closeBtn;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> try {
</span><span class="cx" style="display: block; padding: 0 10px"> if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery("body","html").css({height: "100%", width: "100%"});
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -137,7 +139,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> TB_WIDTH = imageWidth + 30;
</span><span class="cx" style="display: block; padding: 0 10px"> TB_HEIGHT = imageHeight + 60;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><div class='tb-close-icon'></div></a></div>");
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div>");
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery("#TB_closeWindowButton").click(tb_remove);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -202,10 +204,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> urlNoQuery = url.split('TB_');
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery("#TB_iframeContent").remove();
</span><span class="cx" style="display: block; padding: 0 10px"> if(params['modal'] != "true"){//iframe no modal
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><div class='tb-close-icon'></div></a></div></div><iframe frameborder='0' hspace='0' allowTransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
</ins><span class="cx" style="display: block; padding: 0 10px"> }else{//iframe modal
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery("#TB_overlay").unbind();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowTransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }else{// not an iframe, ajax
</span><span class="cx" style="display: block; padding: 0 10px"> if(jQuery("#TB_window").css("visibility") != "visible"){
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -259,6 +261,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $closeBtn = jQuery( '#TB_closeWindowButton' );
+ /*
+ * If the native Close button icon is visible, move focus on the button
+ * (e.g. in the Network Admin Themes screen).
+ * In other admin screens is hidden and replaced by a different icon.
+ */
+ if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) {
+ $closeBtn.focus();
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> } catch(e) {
</span><span class="cx" style="display: block; padding: 0 10px"> //nothing here
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -273,7 +285,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function tb_remove() {
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery("#TB_imageOff").unbind("click");
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery("#TB_closeWindowButton").unbind("click");
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("tb_unload").unbind().remove();});
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ jQuery( '#TB_window' ).fadeOut( 'fast', function() {
+ jQuery( '#TB_window, #TB_overlay, #TB_HideSelect' ).trigger( 'tb_unload' ).unbind().remove();
+ jQuery( 'body' ).trigger( 'thickbox:removed' );
+ });
</ins><span class="cx" style="display: block; padding: 0 10px"> jQuery( 'body' ).removeClass( 'modal-open' );
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery("#TB_load").remove();
</span><span class="cx" style="display: block; padding: 0 10px"> if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
</span></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php 2016-03-10 22:08:16 UTC (rev 36963)
+++ trunk/src/wp-includes/script-loader.php 2016-03-10 22:36:25 UTC (rev 36964)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -580,9 +580,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'saved' => __( 'Changes saved.' ),
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), false, 1 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 );
</ins><span class="cx" style="display: block; padding: 0 10px"> did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'plugin_information' => __('Plugin Information:'),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'plugin_information' => __( 'Plugin:' ),
+ 'plugin_modal_label' => __( 'Plugin details' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'ays' => __('Are you sure you want to install this plugin?')
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>