NVDA Screen Reader not reading Javascript Alert() Popup in Chrome - javascript

I've written a javascript alert() message on a Salesforce page which appears on page load. The code simply goes along the lines of:
<script type="text/javascript">
window.onready = function() {
alert('message for user goes here.');
}
<script>
The message appears on page load, however, it isn't being picked up by the NVDA screen reader. It just reads "Unknown" (I can't even tab into it), which isn't very helpful.
How can you get the screen reader to focus/read a javascript alert message? Is this a bug with NVDA/Chrome?
I'm using the latest version of Chrome: 62.0.3202.94. And NVDA: 2017.4

This is a Chrome bug, and a known one. As Monorail has very poor search functions (at least, in my experience), I couldn't find the bug by number, but believe me, it does exist. Per this issue, alert(), confirm() and onBeforeUnload() dialogs are not read in Chrome. JAWS copes with it better than NVDA though: if you Alt+Tab and then Alt+Tab back to Chrome, you'll be getting the ability to tab around the dialog.
I confirmed this issue fixed in Chrome Canary versions 64, so try this or just wait a bit. Yesterday or today I got Chrome updated, now it is Google Chrome Version 63.0.3239.84.

Related

Debugging for MS Edge constant reload - how to trigger debugger?

I am debugging some code on the MS Edge browser, but it reloaded twice and showed a "This page is having a problem loading" message after two tries. The page has been tested on IE11 or lower, Chrome, and Firefox with no issues.
I have been having trouble bringing up the debugger during page execution by placing the debugger statement in various parts of the code. I have placed it in the first line of the script in the body tag, I have placed it in the first line of $(document).ready(); and even in the script tag in the header. I am so surprised when none of the debuggers triggered other than the one in IE11 (both Chrome and Firefox did not trigger either). Edge of course still continued on its reload loop and saying that it has a problem loading.
My question is - am I not doing this right? Is there a list of when a debugger; statement will not trigger? And more importantly, how do I trigger it in Edge before it reloads twice and throw the error page (For reference, pulling up F12 after it throws the error page gives the DOM of the error page, which is not helpful.)
This is an issue with Edge where the console seems to crash along with the browser. I have noticed it numerous times during development and have not been able to find a solution.
Check in every other browser on an empty cache and see if you are getting any errors in console. Older versions of Edge, before the last service pack were very flakey so I would suggest making sure your environment is upto date.

Chrome JavaScript turned off

Okay, here's my problem. I wrote some JavaScript for a page, for some reason the page doesn't work in Chrome. The site does what I expect in Opera, Chromium and Firefox. In the Choom devtools there is a kind of error showing in the source tab showing "JavScript is disabled" in a mouse hover popup:
I turned off all chrome's extensions, Javascript in on in the content settings and I cleared all JavaScript exceptions I had, but this didn't seem to change anything. The weird thing (an other one) is that some other sites give the same alert icon in the devtools (including this one) but JavaScript works just fine.
If you perform the exact same functions in the console then, some of, the functions perform just fine.
Does anyone have an idea what I could be because I am out of idea's and it is really annoying that I have to switch browser to test the page (page is 'live' here). Thanks
Have you checked the DevTools settings? You might have accidentally enabled "Disable Javascript"

Chrome: window.print() print dialogue opens only after page reload (javascript)

I am facing a really weird problem. I am calling window.print() from a javascript file. This is working fine in Safari, IE, Firefox... and until two hours ago it worked in Chrome, too. (Version 29.0.1547.57)
I did not change anything essential in my javascript file (really - I just removed some comments...), but what now happens is really weird: In Chrome, the print dialogue does not open when window.print() is called. Nothing happens. But then, when I press reload, the print dialogue opens immediately.
The behaviour in the other browser did not change. And while debugging in Chrome I can see that window.print() is called as expected and the script goes on after that. Only the print dialogue is not shown until pressing reload.
Has anybody ever experienced something like that? I also tried to call window.print() in setTimeout(), but this did not change anything. When I debug the content of the page which shall be printed appears to be perfectly loaded.
I am sorry to ask, but I did not find anything while researching. Any help would be appreciated!
Thank you!
Wasiim is right, there is a Chrome bug where window.print() does not work when there is a <video> tag in the DOM. I solved it by calling this function:
function printPage() {
window.print();
//workaround for Chrome bug - https://code.google.com/p/chromium/issues/detail?id=141633
if (window.stop) {
location.reload(); //triggering unload (e.g. reloading the page) makes the print dialog appear
window.stop(); //immediately stop reloading
}
return false;
}
From my experience this is due to continued background traffic, e.g. ajax calls and the like that prevent Chrome from feeling the that page is loaded completely. The reload breaks all traffic and thus the print dialog pops up.
This is a particular gotcha in Visual Studio 2013 where BrowserLink continually ticks away in the background.
This can be tested by disabling BrowserLink via the setting below:
<configuration>
<appSettings>
<add key="vs:EnableBrowserLink" value="false"/>
</appSettings>
</configuration>
I have exactly same problem with Chrome. You need to manually reload page:
Print
If by any chance someone is using VS2013 with chrome, this problem is caused by the BrowserLink funcionality.
see SO answer here
Similar behavior in Safari. It is caused by opened HTTP request(s) on background.
When any HTTP request is in progress, window.print() is executed successfully, but no dialog is opened!
You will have this issue, when you use a long polling (for server push). Because client will have already opened HTTP connection for a long time, window.print() will never work.
I am most certain you are experiencing this issue because you have a video element on your page - most probably an MP4.
If you disable this video / or have an OGV video instead, the printing should work fine.
It is a bug in chrome itself due to limitations of Chrome's video implementation. It is also important to note that if the user prints manually with ctrl-p / cmd-p, print functions correctly
http://code.google.com/p/chromium/issues/detail?id=141633
Hope this helps :)

IE Chrome Frame Full Screen

I have a working implementation of full screen working for Safari, Firefox, and Google Chrome. From what I have read it should work for ie with google chrome frame but when I click the full screen button I created nothing happens. Any ideas? Is it not yet supported?
$('#enable_fullscreen').click ->
calculate_presentation_font_size(height)
if docElm.requestFullscreen
docElm.requestFullscreen()
else if docElm.mozRequestFullScreen
docElm.mozRequestFullScreen()
else if docElm.webkitRequestFullScreen
docElm.webkitRequestFullScreen()
Putting an alert in the "webkitRequestFullScreen" if statement shows that it does go to this condition in chrome frame but docElem.webkitrequestFullScreen() is undefined.
I've build it and made it work from this examples.
https://developer.mozilla.org/en-US/docs/DOM/Using_full-screen_mode
The only things I can see missing from your code for the webkit condition is the parameter "Element.ALLOW_KEYBOARD_INPUT" to the webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)
Unfortunately the main problem of chrome frame is the communication with the IE window that literally behave like a difficult child ;-)
For IE you can open a popup window in fullscreen mode by directly calling document.location.href for the source it will open the current page your are on
window.open(document.location.href, 'myAppfullscreen', 'fullscreen=1');

Weird flickering bug in the latest version of Chrome browser

After updating Google Chrome browser to the latest 15.0.874.106 version (under Windows 7), my site is experiencing some weird flickering bug.
The text shadows are displaying completely wrong, the text itself is fuzzy and unclear, some parts of code don't work anymore (e.g. right floating, fixed menu)... etc.
For a couple of seconds the site is displayed fine, then it flickers all of the sudden (while still loading) and then the rendering gets messed up. (I think it has maybe some problems with loading of Google Maps v3)
The funny thing is that the old version of Chrome (before updating, on my other computer) is still displaying the site without any problems, and there haven't been any changes in the code in the meanwhile.
In other browsers (as i said, even in the old chrome) everything is OK. Firebug and Chrome's code inspector (CTRL+SHIFT+J) don't show any errors in the code. I have been doing some digging on the Internet and here as well, and I havent't found anything useful.
You can check it out by yourself by clicking here
Thanks in advance.
I have done same settings changes as mentioned above post and now, that weird flicker got stopped, below are the details....
Open Chrome Browser
Click on Settings menu option
Click on Advance setting link in Settings page
Un-Check "Use Hardware acceleration when available" checkbox
Restart you chrome browser
Happy Browsing....... :)
Also make sure to disable not only accelerated-compositing, but also accelerated-2d-canvas.
This is how I start google-chrome on Linux:
/opt/google/chrome/google-chrome %U --user-data-dir=/root --disable-accelerated-compositing --disable-accelerated-2d-canvas
On Windows, you might want to omit
--user-data-dir=/root
Josip Filipović apology where to do that (in Win7 by entering -disable-accelerated-compositing in properties > target field) that part disables hardware acceleration.

Categories