[wp-trac] [WordPress Trac] #50486: Improve the admin notices accessibility

WordPress Trac noreply at wordpress.org
Tue Aug 17 14:57:54 UTC 2021


#50486: Improve the admin notices accessibility
----------------------------+--------------------------------
 Reporter:  afercia         |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  ui, accessibility
----------------------------+--------------------------------

Comment (by psykro):

 Replying to [comment:5 ryokuhi]:
 > Hello @psykro,
 > You can find a screenshot in ticket:47656#comment:29: I think this is an
 example both of an inline notice and of a notice that is printed in the
 middle of the page and not right after the H1 element.

 Thanks, @ryokuhi I see that this code is in the /wp-admin/plugin-
 editor.php file, like 283

 https://github.com/WordPress/wordpress-
 develop/blob/6d574d7cabfaf6cc9797d2119ba1a10d9cd78fa3/src/wp-admin/plugin-
 editor.php#L283

 The "problem" we have here is that it seems there are two ways that
 WordPress core renders admin notices from the PHP side.

 1. using the admin_notices action hook
 2. hardcoded inline in specific pages (like the plugin-editor.php)

 So the first, and most important step will be to look for any instances
 where notices are hardcoded in this way, and replace them with
 admin_notices callback functions.

 Once all admin notices are registered in the same way, we can apply rules
 to all admin notices, and be sure that they will all receive the same
 updates/changes.

 Please let me know if you have any questions here.

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


More information about the wp-trac mailing list