]> source.dussan.org Git - vaadin-framework.git/commitdiff
Use role=alert for all notifications (#17079)
authorArtur Signell <artur@vaadin.com>
Fri, 10 Jul 2015 21:00:20 +0000 (00:00 +0300)
committerVaadin Code Review <review@vaadin.com>
Mon, 13 Jul 2015 10:33:53 +0000 (10:33 +0000)
Jaws for Windows (at least up to Jaws 16) does not announce any role=status
messages at all so the user will not hear any tray messages or assistive
messages without this change

Change-Id: Ia110d96b8254b98ed66f0765330865099e729abc

WebContent/release-notes.html
shared/src/com/vaadin/shared/ui/ui/UIState.java

index ea65948baae77e9aa29b05cc357382c10a308589..b7cdba78878269faf9307f835fc072980e525453 100644 (file)
             <li>Widgetset files and other pre-compressed resources are sent as gzip to compatible browsers.
                 This may interfere with custom response compression solutions that do not respect the Content-Encoding response header.</li>
             <li>Unused methods related to the "out of sync" message have been removed from SystemMessages class.</li>
+            <li>All notifications use the WAI-ARIA alert role to be compatible with Jaws</li>
         </ul>
         <h3 id="knownissues">Known Issues and Limitations</h3>
         <ul>
index 2f51fef6ee660bcb14abbf059c88e4d094df0b8e..6f7a531eb6023c668c4458ff67758ebae582c739 100644 (file)
@@ -43,12 +43,16 @@ public class UIState extends TabIndexState {
         notificationConfigurations.put("humanized",
                 new NotificationTypeConfiguration("Info: ", null,
                         NotificationRole.ALERT));
+
+        // We use alert instead of status for all notifications because
+        // (at least) Jaws 16 and earlier fail to announce any role=status
+        // message in Chrome/Firefox
         notificationConfigurations.put("tray",
                 new NotificationTypeConfiguration("Status: ", null,
-                        NotificationRole.STATUS));
+                        NotificationRole.ALERT));
         notificationConfigurations.put("assistive",
                 new NotificationTypeConfiguration("Note: ", null,
-                        NotificationRole.STATUS));
+                        NotificationRole.ALERT));
     }
     /**
      * State related to the Page class.