Skip to content

Commit

Permalink
Show the label for archives block dropdown (#30527)
Browse files Browse the repository at this point in the history
* Show the label for archives block dropdown
  • Loading branch information
JustinyAhin authored May 23, 2021
1 parent 4905e74 commit 83e7425
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/archives/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function render_block_core_archives( $attributes ) {

$label = esc_html( $label );

$block_content = '<label class="screen-reader-text" for="' . $dropdown_id . '">' . $title . '</label>
$block_content = '<label for="' . $dropdown_id . '">' . $title . '</label>
<select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value="">' . $label . '</option>' . $archives . '</select>';

Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/archives/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.wp-block-archives-dropdown {
label {
display: block;
}
}
1 change: 1 addition & 0 deletions packages/block-library/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
display: none;
}

@import "./archives/style.scss";
@import "./audio/style.scss";
@import "./button/style.scss";
@import "./buttons/style.scss";
Expand Down

0 comments on commit 83e7425

Please sign in to comment.