[wp-trac] [WordPress Trac] #37231: Allow heading level to be specified when calling `do_meta_boxes()`

WordPress Trac noreply at wordpress.org
Wed Jun 29 15:41:26 UTC 2016


#37231: Allow heading level to be specified when calling `do_meta_boxes()`
-----------------------------------------------+---------------------------
 Reporter:  jdgrimes                           |      Owner:
     Type:  enhancement                        |     Status:  new
 Priority:  normal                             |  Milestone:  Awaiting
Component:  General                            |  Review
 Severity:  normal                             |    Version:  trunk
  Focuses:  ui, accessibility, administration  |   Keywords:
-----------------------------------------------+---------------------------
 In #33557 the `do_meta_boxes()` function
 [https://core.trac.wordpress.org/changeset/35128#file3 was updated] to use
 `h2` headings instead of `h3`, for better accessibility for the post meta
 boxes. However, plugins use meta boxes on a variety of different admin
 screens with different structures, with the result that the correct
 heading level will vary from one group of meta boxes to the next. I
 propose that we introduce a new `$heading_level` parameter to the
 `do_meta_boxes()` function. That will let the heading level be specified
 for each group of meta boxes independently, resulting in improved document
 structure of plugin admin screens and thus better accessibility.

 The only thing that will need to be considered is that the CSS styles
 currently probably only apply to `h2` and `h3` (back-compat) meta box
 headings. I'd need them to also work with `h4` headings as well. I'm not
 sure if any JS would be affected, but I figure that most JS will be using
 classes to identify meta box headers.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37231>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list