[wp-trac] [WordPress Trac] #39441: Improve the Settings API for accessibility and ease of use.

WordPress Trac noreply at wordpress.org
Mon Jan 16 18:34:41 UTC 2017


#39441: Improve the Settings API for accessibility and ease of use.
-------------------------------------+-------------------------------------
 Reporter:  flixos90                 |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Plugins                  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  settings-api has-patch   |     Focuses:  accessibility,
  2nd-opinion                        |  administration
-------------------------------------+-------------------------------------

Comment (by flixos90):

 [attachment:39441.2.diff] is a minor update over the first iteration.

 * adds support for a new `input_class` key in the `$args` array of
 `add_settings_field()`
 * properly fills the `label_for` key with the value of the `input_id` key
 * automatically adds an `id` attribute to the field description and the
 same value to the field's `aria-describedby`
 * implements `render_settings_field_select()` (just another test
 implementation)
 * moves settings field callback switch clause into `add_settings_field()`
 as it should be part of the argument parsing

 The small test plugin `settings-api-tests.php` is no longer available on
 the ticket. It is now available on https://github.com/felixarntz/settings-
 api-tests for collaboration.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39441#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list