Assigned
Status Update
Comments
ka...@google.com <ka...@google.com> #2
We are building a polygon array with a click event: https://developers.google.com/maps/documentation/javascript/examples/polygon-arrays
However, looking for keyboard accessibility, we are not able to trigger the information dialog using a keyboard similar to how to map markers can be triggered using arrow keys:https://developers.google.com/maps/documentation/javascript/examples/marker-accessibility
Is there something we can do about it?
Thank you!
Map version: 3.49.12
However, looking for keyboard accessibility, we are not able to trigger the information dialog using a keyboard similar to how to map markers can be triggered using arrow keys:
Is there something we can do about it?
Thank you!
Map version: 3.49.12
ka...@google.com <ka...@google.com> #3
Thanks for your suggestion!
We'll be reviewing this for further consideration. Please star this issue to get updates and leave comments for additional information. Please note that starring the issue also provides our product team with valuable feedback on the importance of the issue to our customers.
al...@gmail.com <al...@gmail.com> #4
✨
al...@gmail.com <al...@gmail.com> #5
Sorry, I tried to attach an image via the email functionality. I have reattached here
Description
There exists a bug in main.js file of the google maps v3 embed api when using a strict CSP.
The steps to reproduce this issue is as follows:
I am not sure if this affects any of the previous version of the embed API, or any of the other ways to load the library.
A production website that shows the error is here:https://www.placard-printing.co.uk/info/contact-us?test=1
if you omit the test parameter or set it to any value other than 0, it will apply my work around to fix the issue.
The issue itself seems to be in this function in the main.js file (sorry, I can only see the compiled code)
or more specifically this part:
if we look at the
nba
function, it is this:This function is trying to find an element in the dom, and capture and return its nonce value. This is used to allow the script or style tag to be used in a CSP secure context.
The problem lies when there isn't any style tags present in the dom. The nba function will return an empty string and therefore the style tag will not be accepted by the CSP. My workaround is to inject an empty style tag with a nonce attribute in the dom whenever I need to use the library. Simply:
However, a fix could be implemented by simply falling back to a link tag or a script tag instead. (I have implemented this fix locally on my machine using a local override, however, I guess it would need to go through a round of testing).
or the full function:
My CSP policy for reference:
and the recommended CSP policy by google: