a11y: make order notes metabox accessible

This commit is contained in:
Rami Yushuvaev 2016-11-05 18:56:03 +02:00
parent a81a988628
commit e71cae8d8f
3 changed files with 5 additions and 4 deletions

View File

@ -1149,7 +1149,7 @@ jQuery( function ( $ ) {
var wc_meta_boxes_order_notes = {
init: function() {
$( '#woocommerce-order-notes' )
.on( 'click', 'a.add_note', this.add_order_note )
.on( 'click', 'button.add_note', this.add_order_note )
.on( 'click', 'a.delete_note', this.delete_order_note );
},

File diff suppressed because one or more lines are too long

View File

@ -74,16 +74,17 @@ class WC_Meta_Box_Order_Notes {
echo '</ul>';
?>
<div class="add_note">
<h4><?php _e( 'Add note', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Add a note for your reference, or add a customer note (the user will be notified).', 'woocommerce' ) ); ?></h4>
<p>
<label for="add_order_note"><?php _e( 'Add note', 'woocommerce' ); ?> <?php echo wc_help_tip( __( 'Add a note for your reference, or add a customer note (the user will be notified).', 'woocommerce' ) ); ?></label>
<textarea type="text" name="order_note" id="add_order_note" class="input-text" cols="20" rows="5"></textarea>
</p>
<p>
<label for="order_note_type" class="screen-reader-text"><?php _e( 'Note type', 'woocommerce' ); ?></label>
<select name="order_note_type" id="order_note_type">
<option value=""><?php _e( 'Private note', 'woocommerce' ); ?></option>
<option value="customer"><?php _e( 'Note to customer', 'woocommerce' ); ?></option>
</select>
<a href="#" class="add_note button"><?php _e( 'Add', 'woocommerce' ); ?></a>
<button type="button" class="add_note button"><?php _e( 'Add', 'woocommerce' ); ?></button>
</p>
</div>
<?php