Skip to content

Commit

Permalink
Add labels to user note textareas
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwoodnz committed Dec 11, 2023
1 parent 98ea323 commit 436e836
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ public static function wp_editor_comments( $comment = false ) {
echo "<ul class='tablist' style='display: none;'>";
echo '<li><a href="#comment-form-comment">' . __( 'Write', 'wporg' ) . '</a></li>';
echo '<li><a href="#comment-preview">' . __( 'Preview', 'wporg' ) . '</a></li></ul>';
echo '<label class="screen-reader-text" for="comment">' . esc_html__( 'Note', 'wporg' ) . '</label>';
}

echo '<div class="comment-form-comment tab-section" id="comment-form-comment">';
Expand Down Expand Up @@ -379,6 +380,11 @@ public static function wp_editor_feedback( $comment, $display = 'show', $edit =
ob_start();
echo "<div id='feedback-editor-{$comment_id}' class='feedback-editor{$class}'{$display}>\n";
echo "<form id='feedback-form-{$instance}{$form_type}' class='feedback-form' method='post' action='{$action}' name='feedback-form-{$instance}'>\n";
printf(
"<label class='screen-reader-text' for='feedback-comment-%s'>%s</label>",
esc_attr( $instance ),
esc_html__( 'Feedback', 'wporg' ),
);
wp_editor( $content, 'feedback-comment-' . $instance, array(
'media_buttons' => false,
'textarea_name' => 'comment',
Expand Down

0 comments on commit 436e836

Please sign in to comment.