Opened 4 years ago
Last modified 2 weeks ago
#50402 accepted defect (bug)
Admin notices: error messages should not be all bold
Reported by: | afercia | Owned by: | joedolson |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch changes-requested |
Focuses: | ui | Cc: |
Description (last modified by )
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"
.
Change History (22)
This ticket was mentioned in Slack in #design by afercia. View the logs.
4 years ago
#3
@
12 months ago
- Milestone changed from Awaiting Review to 6.5
- Owner set to joedolson
- Status changed from new to accepted
This ticket was mentioned in PR #5651 on WordPress/wordpress-develop by @rajinsharwar.
11 months ago
#4
- Keywords has-patch added
Adding Bold only on the "Error:" text.
Trac ticket: https://core.trac.wordpress.org/ticket/50402
#5
@
11 months ago
As for the current trunk, I found two instances of such inconsistency. I tried to review each instance of the Error: text and make them under the STRONG, and the remaining notice message as normal text. Let me know if any other instance where this was missed.
This ticket was mentioned in PR #5844 on WordPress/wordpress-develop by expedition-robin-martijn.
9 months ago
#6
As described in the Trac ticket below, class="error"
is legacy and should be replaced with class="notice notice-error"
. In this PR, I have done that.
Trac ticket: https://core.trac.wordpress.org/ticket/50402
#7
@
9 months ago
I have updated the error classes as described in the ticket above. First time contributing, so please don't hesitate to let me know if and how I screwed up. ;-)
#8
@
9 months ago
In #57791, we introduced admin notice functions. Could we integrate those functions into the PHP code instead of having the notice code inline?
#9
@
9 months ago
Thanks for your patches @robinmartijn and @rajinsharwar
As @mukesh27 says, we'll need to integrate the new classes into the function calls in most cases. These will also require visual inspection and screenshots to verify that any changes are acceptable.
In the wp_admin_notice()
function, the classes 'notice notice-error' are automatically added by setting the type to 'error', and should be omitted from the paragraph wrapper. If there's a different class on the paragraph inside the error, those are different from the notice classes and should be retained - in most cases, they're likely needed hooks for some JS event or response.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
4 months ago
This ticket was mentioned in Slack in #accessibility by rcreators. View the logs.
4 months ago
This ticket was mentioned in Slack in #core by oglekler. View the logs.
4 months ago
#15
@
4 months ago
- Keywords changes-requested added
It looks like this patch needs new patch and possibly has some dependency from another ticket about errors notifications 🤔
#16
@
4 months ago
- Description modified (diff)
- Milestone changed from 6.6 to 6.7
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.
This ticket was mentioned in Slack in #core by chaion07. View the logs.
6 weeks ago
#18
@
6 weeks ago
Thanks @afercia for reporting this. We reviewed this Ticket during a recent Core Triage session. Based on the feedback received we feel the need for a specific discussion in order to move this Ticket forwards and closer to a resolution. Lets continue the discussion in the comments.
Props to @cbravobernal for the suggestion
Cheers!
Related: #37280