1

Is it possible to leave page instead of prompting a default alert box but just appending a message in html page as alert box cannot be read by screen readers like ChromeVox?

$(window).bind("beforeunload",function() {
    $(window).unload(function() {
        return 'Are you sure to leave page?';
    });
});
Kent
  • 11
  • 1
  • 1
    Note that ChromeVox is something of an outlier here - most mainstream screenreaders live outside the browser, and can handle these popups fine. The [2016 WebAim screenreader survey](http://webaim.org/projects/screenreadersurvey6/) - note, not scientifically accurate as users self-report - had ChromeVox trailing well behind majors such as JAWS and NVDA. Unless there's a reason you want to support ChromeVox specifically, this likely isn't an issue. Also, FWIW, [ChromeVox Next](http://www.chromevox.com/next.html) will apparently support this. – BrendanMcK Nov 07 '16 at 10:18
  • 1
    FWIW, I believe this is a valid question; not a duplicate, as 276660 does not address the issue here of how to deal with beforeunload with ChromeVox. – BrendanMcK Nov 07 '16 at 10:22

0 Answers0