Cms: Notifications accessibility

Created on 16 Nov 2020  路  3Comments  路  Source: craftcms/cms

Description

Regarding the notification messages that appear at the top of the screen. For example, when entries are saved.

Screenshot of 2 notifications, both reading 'test'. First is blue and second is red.

  • Use aria live regions/roles such as status and alert to announce this text to screen readers. (Related: #7139)
  • WCAG use of color failure: background color is used to distinguish between notification types (blue for notice, red for error).
    Recommend adding text or an icon with label to fix.
  • Color contrast of the white text on blue background is insufficient for normal text.
    Recommend using a darker blue for the background color.
  • Timing Adjustable failure: the notification messages display for a few seconds (looking at the code, I think it's 2 seconds for notices, 4 seconds for errors).
    This may not be enough for some users to read all the text. Looking at the linked page, as well as the related discussion on the wcag github repo, I think it makes sense to have user settings so users can set a duration up to 10 times the default duration, or to disable the duration altogether and have the user manually dismiss the notifications. I think it's probably not ideal to have this longer duration or manual dismissal for all users since they could stack up pretty quickly.

Additional info

  • Craft version: 3.5.15.1
accessibility bug

Most helpful comment

A related point which may be interesting for you to hear.

One of the ways in which I work with Craft CMS, is that for multiple editing I may open many edit tabs for different entries at a time - sometimes 10 or 15 or more tabs.
Depending on which environment I am working on, the response time for saving an entry might take some time. Because of this, I may edit an entry, hit cmd + s to save, and switch to the next tab to edit that one, and repeat that flow.

A problem with the timer on the "_Entry saved_" notification is that when I go back to another tab, because it was displayed with a timer and has already been displayed, there's no clear indication as to whether I saved it or not (unless I check the timestamp, and even that may not be obvious enough). So quite often I end up saving again, just to be sure.

It's no biggie, but this particular use case occurs so frequently so it can be a bit annoying not knowing if I recently saved or not. A solution to the accessibility issues may help this use case too.
Or perhaps it just needs to make sure the user has the browser tab active before notifications such as these are displayed.

All 3 comments

A related point which may be interesting for you to hear.

One of the ways in which I work with Craft CMS, is that for multiple editing I may open many edit tabs for different entries at a time - sometimes 10 or 15 or more tabs.
Depending on which environment I am working on, the response time for saving an entry might take some time. Because of this, I may edit an entry, hit cmd + s to save, and switch to the next tab to edit that one, and repeat that flow.

A problem with the timer on the "_Entry saved_" notification is that when I go back to another tab, because it was displayed with a timer and has already been displayed, there's no clear indication as to whether I saved it or not (unless I check the timestamp, and even that may not be obvious enough). So quite often I end up saving again, just to be sure.

It's no biggie, but this particular use case occurs so frequently so it can be a bit annoying not knowing if I recently saved or not. A solution to the accessibility issues may help this use case too.
Or perhaps it just needs to make sure the user has the browser tab active before notifications such as these are displayed.

Good point! I think we can use the page visibility API to ensure that the time is paused while the tab isn't being viewed.

Related: #7572

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattstein picture mattstein  路  3Comments

rynpsc picture rynpsc  路  3Comments

richhayler picture richhayler  路  3Comments

leigeber picture leigeber  路  3Comments

bitboxfw picture bitboxfw  路  3Comments