[wp-trac] [WordPress Trac] #47656: Remove 'Error:' prefixes from error notices as they're redundant

WordPress Trac noreply at wordpress.org
Tue Jun 16 17:36:12 UTC 2020


#47656: Remove 'Error:' prefixes from error notices as they're redundant
-------------------------+-------------------------------------------------
 Reporter:  garrett-     |       Owner:  audrasjb
  eclipse                |
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  5.5
Component:  I18N         |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:  ui, accessibility, administration,
  commit                 |  ui-copy
-------------------------+-------------------------------------------------

Comment (by afercia):

 Thanks for raising your points @johnjamesjacoby and @kebbet.

 I do know use of color is not sufficient. On the other hand, one of the
 points of this change is that the notice content is way more important
 than a plain text prefix or visual effects like bolded text.

 Prefixes like "Error:" or "Warning:" don't add any semantics. The whole
 notice is not guaranteed to be perceived by assistive technology users.
 For example, for screen reader users this is just text placed after (or
 before) the main H1 heading. Sometimes notices appear in the middle of the
 page content too.

 The admin notices accessibility should be improved by other means,
 depending also whether they're PHP-generated notices that appear after a
 page load or JavaScript-generated ones that are "injected" into the DOM.

 There are ways to improve accessibility for both cases, for example:
 - PHP: the notice text should be prepended to the document title, as
 that's the first thing screen readers announce after a page load
 - PHP: the notice text should be added to the main H1 heading as that's
 the part of the content with higher chances to be navigated to
 - JavaScript: notices injected in the DOM should have an aria role `alert`
 or `status` so that they're announced by screen readers
 - in any case, an admin notice should be visually prominent and appear
 within the current viewport for low vision users
 - etc.

 All the above items are slightly outside the scope of this ticket though.
 Of course, I'd be glad to discuss further improvements and create separate
 tickets.

 > is it possible to link to (or create) a ticket or handbook page with
 what the penultimate design is for these types of notices?

 I'd be very in favor of that. Any volunteer is very welcome :)

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


More information about the wp-trac mailing list