aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-05-17 11:58:33 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-05-28 15:36:25 +0100
commit303af58ad5088b21cceb1f9b989763b343fce0a7 (patch)
treedff27befcaf81439714364753aa86a0ed1b236a6
parent3d000e4acf1c6427414e8a0712fe135ba215545e (diff)
Provide ARIA roles for message controller box.
-rw-r--r--web/cobrands/fixmystreet/assets.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index d367eae8c..f68ad6caf 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -1016,10 +1016,12 @@ fixmystreet.message_controller = (function() {
var $msg;
if (typeof stopper.message === 'function') {
$msg = stopper.message();
- $msg.attr('id', stopperId);
} else {
- $msg = $('<p id="' + stopperId + '" class="box-warning">' + stopper.message + '</p>');
+ $msg = $('<p class="box-warning">' + stopper.message + '</p>');
}
+ $msg.attr('id', stopperId);
+ $msg.attr('role', 'alert');
+ $msg.attr('aria-live', 'assertive');
if ($id.length) {
$id.replaceWith($msg);