Accessibility: Theme Installer, make the "Upload Theme" button... a button.

UI controls that "do something" on a page shouldn't be links. This link behaves
like a toggle to expand the uploader panel and should be a `button` element with
an aria-expanded attribute. Also:

- improves consistency with the Plugin uploader
- keeps the themes list visible when the uploader is open
- displays a notice when JavaScript is off
- adds some `hide-if-no-js` CSS classes
- removes the `themes.router.navigate()` "upload" route: seems unnecessary and breaks history

Fixes #35457.
Built from https://develop.svn.wordpress.org/trunk@37742


git-svn-id: http://core.svn.wordpress.org/trunk@37707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia
2016-06-17 20:47:28 +00:00
parent accf240d37
commit dd5bc0d28e
12 changed files with 32 additions and 50 deletions

View File

@@ -1039,7 +1039,7 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap {
box-sizing: border-box;
display: none;
margin: 0;
padding: 0;
padding: 50px 0;
width: 100%;
overflow: hidden;
position: relative;
@@ -1066,13 +1066,9 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap {
font-size: 18px;
font-style: normal;
margin: 0;
padding: 40px 0 0;
padding: 0;
text-align: center;
}
body.show-upload-theme .upload-theme + .wp-filter,
body.show-upload-theme .upload-theme + .wp-filter + .theme-browser {
display: none;
}
p.no-themes {
clear: both;
@@ -1085,14 +1081,10 @@ p.no-themes {
display: none;
}
body.no-results p.no-themes {
.no-results p.no-themes {
display: block;
}
body.show-upload-theme p.no-themes {
display: none !important;
}
.theme-install-php .add-new-theme {
display: none !important;
}