[wp-trac] [WordPress Trac] #50402: Admin notices: error messages should not be all bold

WordPress Trac noreply at wordpress.org
Thu Jun 20 19:28:02 UTC 2024


#50402: Admin notices: error messages should not be all bold
-----------------------------------------+------------------------
 Reporter:  afercia                      |       Owner:  joedolson
     Type:  defect (bug)                 |      Status:  accepted
 Priority:  normal                       |   Milestone:  6.7
Component:  Administration               |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch changes-requested  |     Focuses:  ui
-----------------------------------------+------------------------
Changes (by sabernhardt):

 * milestone:  6.6 => 6.7


Old description:

> Splitting this out from #47656.
>
> While there are cases where the admin notices error messages may
> legitimately use bold form ''some'' terms within the message, the whole
> message shouldn't be bold.
>
> The vast majority of the error admin notices are just text with a normal
> font weight. The `<strong>` element does add semantic (strong) emphasis
> but that's an addition that brings in very little vale. Visually: the
> bold message is inconsistent with most of the error admin notices.
>
> Some examples:
>
> {{{
> echo '<div class="error"><p><strong>' . __( 'You cannot install a network
> of sites with your server address.' ) . '</p></div>';
> }}}
>
> and
>

> {{{
> echo '<div class="error"><p><strong>' . __( 'The network could not be
> created.' ) . '</strong></p>';
> }}}
>

> These "all bold" admin notices should be adjusted to remove the all-bold
> effect.
>

> Worth also reminding the CSS class `class="error"` is legacy and should
> be replaced with `class="notice notice-error"`.

New description:

 Splitting this out from #47656.

 While there are cases where the admin notices error messages may
 legitimately use bold form ''some'' terms within the message, the whole
 message shouldn't be bold.

 The vast majority of the error admin notices are just text with a normal
 font weight. The `<strong>` element does add semantic (strong) emphasis
 but that's an addition that brings in very little value. Visually: the
 bold message is inconsistent with most of the error admin notices.

 Some examples:

 {{{
 echo '<div class="error"><p><strong>' . __( 'You cannot install a network
 of sites with your server address.' ) . '</p></div>';
 }}}

 and


 {{{
 echo '<div class="error"><p><strong>' . __( 'The network could not be
 created.' ) . '</strong></p>';
 }}}


 These "all bold" admin notices should be adjusted to remove the all-bold
 effect.


 Worth also reminding the CSS class `class="error"` is legacy and should be
 replaced with `class="notice notice-error"`.

--

Comment:

 The dependency mentioned earlier was the `wp_admin_notice()` function,
 which is included in recent versions.

 PR 5844 is closed, but I do not recommend editing the (classes for)
 upgrade notices in bundled themes. Those error messages only appear when
 trying to activate the theme in an **older** version of WordPress.

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


More information about the wp-trac mailing list