From 5423bf7f1b0ff6032183eb8b637b0746aa6d5d84 Mon Sep 17 00:00:00 2001 From: Michiel Bijl Date: Fri, 17 Feb 2017 10:46:55 +0000 Subject: [PATCH] Hide alert when empty, manual source code --- examples/alert/css/alert.css | 4 ++++ examples/alert/index.html | 31 ++++++++++++++++++------------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/examples/alert/css/alert.css b/examples/alert/css/alert.css index 07c3f56e27..b11f1faa42 100644 --- a/examples/alert/css/alert.css +++ b/examples/alert/css/alert.css @@ -4,3 +4,7 @@ border-radius: 4px; background: hsl(206, 74%, 90%); } + +[role="alert"]:empty { + display: none; +} diff --git a/examples/alert/index.html b/examples/alert/index.html index 4f55be3c98..aa3f3e075d 100644 --- a/examples/alert/index.html +++ b/examples/alert/index.html @@ -3,12 +3,11 @@ Alert Example | WAI-ARIA Authoring Practices 1.1 - + - - + @@ -25,12 +24,14 @@

Example

+

- This is just a test. + This is just a test. A typical alert is triggered by an event, such as an error, warning condition, or the arrival of information that is important in the context of the user's task.

- + + +