Changeset 56018 – WordPress Trac (original) (raw)

Timestamp:

06/24/2023 02:30:31 PM (3 years ago)

joedolson

Message:

Editor: Improve accessibility of new custom field UI.

Add labels; change Enter new/Cancel link to a button; move focus to input when creating new field; move Add Custom Field out of fields table.

Props jane, batmoo, karmatosed, franrosa, sabernhardt, annashopina, oglekler, joedolson.
Fixes #15631.

Location:

trunk/src

Files:

Legend:

Unmodified

Added

Removed

r52332 r56018
748 748 } );
749 749
750 $element.on( 'click', 'a[data-wp-lists^="add:' + list.id + ':"], input[data-wp-lists^="add:' + list.id + ':"]', function() {
750 $element.on( 'click', '[data-wp-lists^="add:' + list.id + ':"], input[data-wp-lists^="add:' + list.id + ':"]', function() {
751 751 return list.wpList.add( this );
752 752 } );
r54220 r56018
1069 1069 }
1070 1070
1071 #postcustom #postcustomstuff .add-custom-field {
1072 padding: 12px 8px 8px;
1073 }
1074
1071 1075 #side-sortables #postcustom #postcustomstuff .submit {
1072 1076 margin: 0;
1119 1123 }
1120 1124
1121 #postcustomstuff #newmetaleft a {
1125 #postcustomstuff #newmetaleft a,
1126 #postcustomstuff #newmeta-button {
1122 1127 display: inline-block;
1123 1128 margin: 0 8px 8px;
r55988 r56018
725 725 if ( $keys ) {
726 726 natcasesort( $keys );
727 $meta_key_input_id = 'metakeyselect';
728 } else {
729 $meta_key_input_id = 'metakeyinput';
730 727 }
731 728 ?>
734 731
735 732
736
733
737 734
738 735
754 751 ?>
755 752
756
757 <a href="#postcustomstuff" class="hide-if-no-js" onclick="jQuery('#metakeyinput, #metakeyselect, #enternew, #cancelnew').toggle();return false;">
753
754
758 755
759 </a>
756 </button>
760 757
761 758
762 759
763 760
764
761
762
763
765 764
766
767 <tr><td colspan="2">
768
765
766 </table>
767
769 768 <?php
770 769 submit_button(
780 779 ?>
781 780
782
783
784
785
786 781 <?php 787 788 782 } 789 783

Note: See TracChangeset for help on using the changeset viewer.