Make WordPress Core


Ignore:
Timestamp:
10/14/2016 10:39:49 PM (9 years ago)
Author:
azaozz
Message:

Accessible Tags autocomplete:

  • Replace suggest.js with UI Autocomplete.
  • Use the same settings like in the editor link toolbar.
  • Abstract it and add in a new file, tags-suggest.js. Then make it a dependency for the Tags postbox(es) and Quick and Bulk Edit.
  • Add data-wp-taxonomy on all input elements to improve handling in the UI for custom taxonomies.

Props afercia, azaozz.
See #33902.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r38700 r38797  
    432432    <div class="ajaxtag hide-if-no-js">
    433433        <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $taxonomy->labels->add_new_item; ?></label>
    434         <p><input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" aria-describedby="new-tag-<?php echo $tax_name; ?>-desc" value="" />
     434        <p><input data-wp-taxonomy="<?php echo $tax_name; ?>" type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" aria-describedby="new-tag-<?php echo $tax_name; ?>-desc" value="" />
    435435        <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" /></p>
    436436    </div>
Note: See TracChangeset for help on using the changeset viewer.