Opened 3 years ago
Last modified 2 years ago
#50442 new enhancement
Add prefixes to all admin notices (Warning, Error, Success, Info)
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | |
Focuses: | ui, ui-copy | Cc: |
Description (last modified by )
This is a continuation #47656
From @afercia comment (ticket:47656#comment:47)
- Make sure all the Error and Warning notices use respectively an "Error:" and "Warning:" text prefix
- Further discuss whether also the "Success" and "Info" notices should use a similar text prefix
- Update documentation related to admin notices, for example: https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices and https://developer.wordpress.org/reference/hooks/admin_notices/
- Create a new issue on the Gutenberg GitHub to add text prefixes for the editor notices: right now, none of them uses a prefix (see screenshot below)
I would like to add
- Combine strings constructed like
__('Error:') . __('any string')
into one string for better context for translators.
Change History (3)
Note: See
TracTickets for help on using
tickets.
I understand the reasoning behind having mandatory Error and Warning prefixes. I don't hold an opinion either way - but I understand why it can be considered beneficial. It might not be pretty. It might be redundant for some messages (eg. strings that already contain the word 'error' in them) but they're a good marker/label for those notices. Good for accessibility. They grab attention regardless of coloring scheme. And they're unambiguous.
However mandatory 'Info' and 'Success' prefixes would just be annoying.
Adding the word 'Info' to what is already an information string does not add any new information. It's already information. It's not only redundant it's stupid.
The only difference between Info and Success notices is that Success notices accompany an action while Info notices are passive notices. There is no real accessibility need (none that I know or can think of) to disambiguate them from Info notices. Not in the way that Error and Warning need to stand out.
-1 for adding mandatory 'Info' and 'Success' prefixes.