Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification banner #2

govuk-design-system opened this issue Jan 11, 2018 · 78 comments

Notification banner #2

govuk-design-system opened this issue Jan 11, 2018 · 78 comments
component Goes in the 'Components' section of the Design System


Copy link

govuk-design-system commented Jan 11, 2018

Also known as: alert


An on-screen alert to notify users that something important has happened.

For example:

  • an action was successful
  • an action was not successful
  • a deadline is imminent
  • a payment is overdue


Anything else

Copy link

NickColley commented Apr 3, 2018

One proposal:

The alert component would be a top level component that is generic that does not have any understanding of the context it's used in.

This component would have different variants called 'danger', 'success'. Similar to the digital marketplace implementation.

We'd then move 'Error summary' component and 'Confirmation panel' component into patterns that use 'danger' variant and 'success' variant respectively.

Copy link

stevenaproctor commented Apr 4, 2018

@NickColley Should we be using colour, especially red, this way? Because red can cause stress, especially when a page loads and it is not connected to what they have done, like the way error messages work. Should we be recommending this amount of red?

There is something about the red button that would make me think I was doing something destructive like deleting something.

I realise the red, amber, green and blue are enhancements and everything should make sense without the colour so should not affect people who are colour blind.

Copy link

NickColley commented Apr 4, 2018

@stevenaproctor thanks for the points. 👍 💯

Should we be using colour, especially red, this way?

One nice thing about the current error summary component is that it indicates it's usage in the name, so you wouldn't accidentally use it to display something that is not an error.

If we were to do this I suspect we'd need to be careful with the guidance to help people choose the right variant for their use case.

In terms of increased amount of colour, we could consider doing alerts more in line with the current error summary component, which does not change the text colour.

There is something about the red button that would make me think I was doing something destructive like deleting something.

We could remove the buttons from the scope of this component, then consider updates to the 'Button' component separately in the future.

Copy link

I'd like to do some work with making these more consistent and maybe reducing them down to a simpler set of banners and notifications, but I'm not sure they would make sense as a single component;

  1. I think the information design requirements for the different types of banners and notifications probably needs to be different, they're doing different things and have different urgencies. An error message preventing you from submitting a form probably needs be different from a generic site-wide notification banner, or a success confirmation with follow actions.
  2. There's probably a case that the markup would need to be different for different types of notification too? or at least have very different levels of urgency within the document tree?

Copy link

tombye commented Apr 6, 2018

I've done some research on this pattern that might prove useful, talking to the designers involved and looking through the references in the description.


Across all the references linked to in the description, I found the following themes:

Visual patterns

Alerts in transactions have a complete solid border:

Success alert on the Digital Marketplace

Most of those on content pages just have a different background colour:


GOV.UK has a variant called notice, like those for transactions but with a thiner border:


Those on dashboards have a border on the left, like the inset text pattern, with a background colour to match the border but with a lighter hue.

Service notice on Universal Credit


Rural payments, Pay, Notify and Registers all also use tick and cross icons to indicate success and failure.


Colour is used fairly consistently.

  • red indicates something that should be acted on immediately or will have an immediate effect on the user
  • green indicates success
  • blue marks the banner information as context for that in the page and not based on a user action

Where orange is used, the intention was often unclear and in a few place it indicated the alert contained information which should just be part of the page content.

Types of alert

The types of alert seem tied to the type of page.

Description Type of page Services
Your action was successful Transaction Digital Marketplace, Notify, Rural Payments (DEFRA)
Your action was not successful Transaction Digital Marketplace, Notify, Rural Payments (DEFRA)
Information you need before using this page Transaction Digital Marketplace
Information you need before reading this page Content Digital Marketplace, GOV.UK
Notice about the service process Dashboard Prepare for Universal Credit (DWP)
Notice to draw attention to a part of the page Dashboard Bereavement Support Payment (DWP), Rural Payments (DWP)

Your action was successful

Digital Marketplace success alert
Rural Payments success alert

Your action was not successful

Digital Marketplace error alert
Rural Payments error alert

This banner should include information (including links) on how to be successful.

Digital Marketplace, Registers, Notify and Pay use this to ask users to confirm an action and so include
a button for that confirmation.

Information you need before using this page

Digital Marketplace transaction information alert

Use cases

Digital Marketplace have forms with pre-filled fields, based on information users have already given them. They use a banner to let users know where the answers came from.

Information you need before reading this page

Digital Marketplace content information alert

Use cases

Digital Marketplace show services that are no longer available to buy on their procurement frameworks. They use this banner to mark them as different to those still available.

GOV.UK display policies from previous governments and so use this banner to mark them as different from those of the current government.

Notice about the service process

Universal Credit service notice alert
Universal Credit service warning alert

Notice to draw attention to a part of a dashboard

Rural Payments notice about part of the page
Bereavement Payments notice about part of the page

Technical implementation

ARIA use

ARIA attributes should be added to give alerts accessible names.

Those that need immediate attention should have a role of alert.

Other alerts should have a role of region and an aria-label attribute set to "notice".


Alerts that need immediate attention should have focus shifted to them when the page loads or when the action they relate to completes, if that doesn't involve a new load.

Additional notes

@abbott567 mentioned the DWP patterns page isn't used for all DWP projects, just the 'Prepare for Universal Credit' service.

The following people helped out with this (thanks!) and all have experience of implementing this pattern:

Copy link

@tombye Impressively comprehensive.

Red works well with validation error messages and similar use cases where the red is connected to something you have just done. But when a page, like a dashboard, loads and the red is there in a notice it could inadvertently cause people stress. It might not be obvious why the red is there.

If the colour is there to draw attention, all notices could be blue to signify 'this is a notice' without any extra effects. The meaning will come from the content.

If we want to use red, we could be less intrusive but still effective. We want people to do something but we do not want to cause stress. In the HMRC example mentioned in the description, the alert would be better and more accessible without all the red content.

In the example under 'Your action was not successful' with the red button, you cannot say no. And it is not as accessible as it could be.

The button is not linked to the question in any obvious way and the label does not make sense out of context. It could say 'Yes, delete testing' and you could have another button that says 'No, do not delete testing' but that is not how yes-no questions are usually handled.

This type of action would be more accessible as a separate, standard yes-no question with radio buttons. The screen would come immediately after someone tries to delete something.

Copy link

@stevenaproctor we had a blue notice at the top in bereavement to inform agents that a claim needed attention, and it tanked in session after session. Agents just couldn’t see it. It was like they were banner blind or something. Literally staring at the page and not seeing it for minutes. Was really awkward.

However, the red notice in the example above about the overpayments did work, they saw that straight away. But we do use it sparingly. It’s only ever shown under really niche conditions. Most people will never see it.

I think that we’d have to be really careful in the guidance if we go ahead, because alerts are really open to being abused when plain content may actually be better.

Copy link

@abbott567 I have no doubt it draws people's attention and guidance about when to use and not to use it is super important.

When we tested alerts in tax credits, people rarely saw those at the top of the screen because they do look a little banner-y. But when we moved them further down the screen so they were under the <h1> they were seen more often that not.

Copy link

quis commented Apr 9, 2018

@tombye This is an awesome piece of work 👏

Copy link

For anyone interested, this is the blue banner we tried that nobody saw. I can't remember the exact figures, but it was definitely more than 50% of people that didn't interact with it or even see it.

It got to the point where we literally sat in research sessions saying "Do you think there might be anything else you need to do on this page?" and... nothing. haha


Copy link

kr8n3r commented Apr 27, 2018

Alert/Notification on Civil service Live
screen shot 2018-04-27 at 09 43 03

@ignaciaorellana ignaciaorellana added the help-wanted Extra attention is needed label May 2, 2018
Copy link

Civil Service Learning


@joelanman joelanman reopened this May 16, 2018
Copy link

Also Civil Service Learning

@timpaul timpaul added component Goes in the 'Components' section of the Design System and removed candidate labels May 21, 2018
Copy link

jfranciswebdesign commented May 22, 2018

Companies House

We're testing this pattern as part of our accounts filing service (currently in Beta) - testing well with all users so far (including those reliant on assistive technology and those with low digital skills) - the common reactions tend to be "Yes, I've seen this type of thing before" or "Yes, that's what I expected".


Copy link


Knowing the colour of the banner shouldn't be the aim - the aim should be understanding of the alert.

This gets interesting when trying to comply with It seems to me that user will need to know which type of banner (green/success, red/error) they're dealing with so that the user can

rely heavily on their familiarity with

the component when interpreting it - in this case I think the user needs to be able to understand that this is the same "green/success" banner they might have encountered earlier in the service journey.

Copy link

christopherthomasdesign commented Aug 25, 2020

GOV.UK Design System working group review

Representatives from the GOV.UK Design System working group reviewed a new 'notification banner’ component in August 2020.

All members in the group agreed that the component met the criteria for a new inclusion in the Design System.

The working group also made the following recommendations.

Scope of the component

There was a range of feedback on the scope of the component and how it relates to other components in the Design System. The main themes were:

  • unclear distinction between the ‘success’ variant of the notification banner and the existing ‘panel’ component
  • unclear distinction between the ‘error’ variant of the notification banner and the existing ‘error summary’ component
  • possible confusion with the 'warning text’ component
  • whether banners with ‘alert’ behaviour (i.e. taking focus on page load and using role=alert) are sufficiently different in behaviour to be a separate ‘alert’ component

As there isn’t clear consensus on how best to fit the component with existing ones , the Design System team will decide on a way forward for the first iteration of the component. We'll focus on causing least disruption for teams and reducing the chance of having to reverse a decision (i.e. deprecating a component then find we actually need it later).


  • Clarify what to do with service-wide 'status' messaging in banners (e.g. coronavirus delays)
  • Add clearer guidance and examples about how to handle multiple banners on a page
  • Provide clearer guidance on placement of notification banners
  • Explain how long notification banners should persist in different contexts


  • Explore use of icons or other visual indicators (such as consistent content) to make the difference between the notification banner variants clearer


  • Create nunjucks macros for the component
  • Remove aria-labelledby from the markup for the red and the green banners as they’re not landmarks
  • Explain what the different role= attributes do in the code comments because it’s not clear to everyone

Next steps

Based on this feedback the GOV.UK Design System team have agreed to:

  • Decide on what the notification banner does or does not replace
  • Explore use of icons or other visual indicators for notification banners
  • Draft a new version of the notification banner guidance incorporating the working group's feedback
  • Publish the first version of the component and guidance

Copy link

We have iterated our use of notifications that are based on the status of the system.

Iteration 1: blue banner above the h1


We also tried with a button inside like this:


We found that some users didn't spot the banner which we thought might be some sort of banner blindness.

Iteration 2: remove banner and put below h1


This worked better than the banner but we still found some users missed it.

Iteration 3: add h2 and use inset text component


Then we changed to this and haven't seen any users miss it. This is what we've settled on.

Copy link

vanitabarrett commented Nov 6, 2020

Accessibility review

The Design System team took the latest iteration of the notification banner for an internal accessibility review. We were hoping to have addressed some of the feedback we had from the last accessibility review.

Differentiating between the types of banners

The last accessibility review raised concerns about being unable to programatically and visually tell the difference between the types of banners, especially by users who can’t perceive the colour difference. Following that feedback, we have changed the design so that each banner has a title (defaults: “Important”, “Success”, “Error”). This content means the banner no longer relies solely on colour to convey meaning.

Screenshot 2020-11-06 at 10 56 03

Screenshot 2020-11-06 at 10 59 06

Blue banner

As mentioned at the previous review, a navigation banner at the top of the page (above the page title) could cause screenreader users to miss it entirely if they choose to navigate to the first H1 and then continue to navigate through the page.


For dynamic banners which are added as a result of user interaction, we move focus to the banner. It was agreed that this is the correct thing to do as it will make the new banner clear to users who would otherwise not spot the banner appearing at the top of the page (e.g: screenreader users, users on a mobile device, and users using screen magnifiers)

We currently set role=‘alert’ and tabindex=‘-1’ so that we can focus the banner using JavaScript (we need both due to a bug with some screenreader, Anika thought this might be Voiceover on Mac/iOS). Tabindex -1 allows us to set focus programatically, but means that if a user navigates away from the banner they are unable to tab back to it. This probably isn't an issue as the banner isn't really an interactive element, but it's something to keep an eye out for in user research.

We also keep the tabindex="-1" after the banner has lost focus, which means that clicking on the banner gives it a yellow focus border. This could be confusing as it implies it's interactive (see the above point).

Action: test removing the tabindex onBlur so the banner doesn't display a focus outline. Confirm whether Voiceover on Mac/iOs requires role=‘alert’ and focus. Make note of any instances of a user trying to tab back to the notification banner / think it's an interactive element in user research.

Use of multiple banners

Using multiple banners of the same type is not advised - we would recommend merging banners of the same type into one. Although rare, there may be cases where multiple banners of different types are used on the same page.

We tested a scenario with a success banner and an error summary (also uses role=alert and has auto-focus behaviour). In this example, the error summary was above the success banner and was auto-focused. Admittedly, the scenario we tested in was a bit of a stretch and unlikely to be something you would want to do in a real service. The main concern is that users may see the first banner and skip past it if there is a clear action within that banner. This is especially true for an error summary which links to an input field.

Action: consider interaction between error summary and notification banner - should they ever be used together? More generally, observe how users interact with the notification banner in user research - do they skip straight to main content if there is a clear action, or continue to navigate through the page.


The notification banner has title text which uses a heading element. There are examples where you might want to style banner content underneath this (paragraph) so that it looks like a heading. It’s always a bit tricky when elements look like something they’re not. This probably wouldn’t be an issue for screenreader users specifically, but is likely to affect people who change the look of sites with custom stylesheets (or those who have disabled CSS).

Copy link

CharlotteDowns commented Nov 23, 2020

Release of notification banner using the experimental label

The notification banner component has been published in the Design System as experimental because more research is needed to validate it.

The notification banner component tells the user about something they need to know about, but that’s not directly related to the page content.

Problems we looked to solve

What we decided and what has changed

  • The notification banner can be used to tell the user about a problem that’s affecting the service as a whole (for example, delays in processing applications because of an emergency). We retired the 'Understand the impact of an emergency on your service' pattern as we believe the following use cases can be covered by a notification banner component:
    • This service is affected by a pandemic
    • This service is closing soon
    • We'll soon be making changes to this service, and everyone needs to know about them
  • Within the guidance for the notification banner we advise services to use notification banners sparingly. Notification banners of the same type on the same page should be combined into a single notification banner with the message re-written. If you need to show notification banners of different types on the same page, place the more immediately relevant banner at the top. See visual examples of positioning a notification banner in the guidance.
  • We decided not to publish a red banner variation as errors usually require on the page actions where the error summary component is more appropriate. For service errors we suggest using the problem with the service page.
  • Position a notification banner immediately before the page h1. The notification banner should be the same width as the page content to provide a consistent experience for users across services.
  • We found that across one thing per page user journeys, notification banners did not need to persist across different pages. We advise to remove banners when they are no longer useful.
  • Icons are helpful but take up a lot of space within the notification banner and can have different meanings depending on the context, we decided to use a piece of content instead.
  • We decided to go with 1 component, not 2. Neutral / success banners have a lot more in common than not, separating them could be confusing and make the banner variations harder to find. The ‘alert’ behaviour is configurable as we cannot assume all ‘success’ banners need to have alert behaviour applied to them, although this will be on as default.

How we went about building it

How you can help our ongoing user research

This component is experimental because:

  • we have confidence that it works in some contexts, but not in others
  • we're actively asking for service teams who try it in new contexts to share their results with us
  • we would like teams to contribute specific examples of red banners if they have used them so we can learn about other use cases

Share your research or feedback by commenting on this issue or propose a change – read more about how to propose changes in GitHub

Copy link

We are looking at using the notification banner in this scenario but in DWP we have the summary panel at the top of the page which is the same colour. Any thoughts on avoiding this – alternative default colour for pages where there are two elements like this maybe?


@hannalaakso hannalaakso added the awaiting triage Needs triaging by team label Jan 26, 2021
@trang-erskine trang-erskine removed the awaiting triage Needs triaging by team label Feb 1, 2021
Copy link

What an interesting challenge @neil-holroyd and thank you for raising it. Could you help me learn a little bit more about the service and the action in which you want the user to take? I guess you may not have implemented the notification banner component yet but it would be really helpful to get some user research to strengthen this need. If teams are facing a similar design scenario we'd be interested to hear about it too.

Copy link

Hi @CharlotteDowns, I have been head down in a new project so apologies for the late reply. The service is a caseload management system for NSJSA. This instance occurs when a customer calls and the agent goes to their claim but it is allocated to a different service centre – then they can only do any updates on the case if they allocate it to themselves. Upon doing so the actions for this page will be in view. At the moment this is a prototype and we have done a playback to the user groups. All feedback has been positive overall. At the time of testing we didn't have a UR in place so it was more of a general playback. This summary panel is quite a commonly used mechanism across WA so this may occur across a few services.

Copy link

In December 2020 the Design System team tested the notification banner, in 8 usability sessions, with users who use assistive technology. We used the Blue Badge journey to test the banner alongside other components and patterns.

We tested with participants who had little or no vision and used screen readers (NVDA and Jaws) and ZoomText. Some participants had dyslexia and used Text-to-Speech and Read and Write Gold.

Screenshot 2021-02-18 at 12 22 04
First important Banner
The first important banner was seen and referred to as 'covid message'

Screenshot 2021-02-18 at 12 22 48
Success Banner (which appeared above the first important banner when users added healthcare professional details)

The success banner read out well for one participant, who was an NVDA user "you heard it say alert successfully added. I didn’t have to do anything which was double confirmation. When they get screen readers to read that out that is doubly handy." Participants had both the completed tag and the success banner to confirm that had added details successfully. P5 expected the success banner after adding contact details.

Screenshot 2021-02-18 at 12 25 20
Second Important banner

Second important message (Covid and disposal of blue badge) Most participants missed the second banner. One participant who was a screen reader user skipped straight past the message as she wanted to move on the next task and was going through the headings. Two participants said they missed the additional information when they were asked about it. One participant thought the information inside the banner was in the wrong place and should have had a more prominent place at the end of a journey.

Copy link

CharlotteDowns commented Jun 17, 2021

The Department For Education used the notification banner in a prototype journey for teacher training, but it was consistently missed by lots of of users, so they’re removing it: DFE-Digital/publish-teacher-training-prototype#99

Copy link

Hi all, we are currently developing a feature on UC that allows agents to create and modify diary schedules and there are some instances where we believe the most suitable component to use would be a red version of the notification banner. For example, if the user tries to save a schedule a red banner would allow us to clearly indicate that there has been an error related to the save action. Importantly, this can not be achieved using the error validation summary component as that contains a link to fix the error on the page, which is not appropriate in this case. For this case we are A. Informing the user that the save action has failed and why, and B. Presenting three possible ways to fix the problem (clicking on the link to review the conflicting schedule, changing the dates, or setting the ad hoc checkbox to override the existing schedule). Please see the attached design for context.

Red notification

Copy link

Has anyone looked into a floating notification banner? So for context below the banner is several blocks of content that can grow depending on the user. Sometimes this means the notification banner scrolls off the screen. In our case, the notification banner has a link and in UR we have seen users failing to see the link as it is now off-screen.
I am not aware of floating/ sticky elements other than a sticky header which wasnt progressed -

Copy link

Is the link in the green notification box (under 'reacting to something the user has done') meant to be green (#00703c)?

This seems to contradict the design system guidance that links should be blue by default and I can't find any discussion about these links needing to be green anywhere.

Copy link

Hi @andrewhick, thanks for getting in touch. It is intentional. Like with the error summary, we style the links to be in a consistent colour with the border. This is to make the components more cohesive visually – we found that using blue links with a different border colour made them look a bit broken. We're confident that the context, colouring and underlines used still make it clear enough that it's a link, and haven't observed any issues specifically with links in usability testing to date.

@christopherthomasdesign christopherthomasdesign added published and removed help-wanted Extra attention is needed labels Sep 26, 2022
Copy link

We have removed the 'Experimental' tag from components, patterns, and guidance in the Design System 😌.

The tag was being used on the notification banner component to raise awareness that more research is needed to validate it. However, we recently published new guidance on how to share findings from users which we hope will make it easier to collect more information about how our Design System is being used across services.

If your team has used this component please let us know 💪🏻.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
component Goes in the 'Components' section of the Design System

No branches or pull requests