问题
One of the requirements of Section 508 is that pages be readable without stylesheets:
§ 1194.22 (d) Documents shall be organized so they are readable without requiring an associated style sheet.
We're currently facing a problem where Google Maps do not work without styles enabled (go figure). All the different pieces of the map just print out in order with no meaning. I've attached a sample image below.
Is there any easy way to deal with this? The only thing I can think of is to use JavaScript to test to see if CSS is disabled (a terrible thing to do, I know, I know) and then remove the map div and replace it with a static map that shows the same content. (If JavaScript is disabled too it's a moot point as the map won't even load.) Obviously the static map doesn't incorporate all the same functionality (zoom, pan, etc.), but it provides a readable page. So:
- Is there another way to make Google Maps 508 compliant regarding styles disabled?
- If not, how would one go about testing for CSS being disabled to do the fix described above?
Example map without styles:
回答1:
The Standard you are pointing to is mainly for static content. Since a Google Map is highly scripted, you would call upon the Standards in 1194.21 - Software Applications, and have a <noscript>
tag following the map saying something like "Google map showing . An accessible version is at ___."
Next when testing the Map, it most likely fail to be compliant, so you should request an equivalent facilitation exception for the map from the agency's Section 508 coordinator. This allows you to serve up a Google Map, but you provide an equivalent method of getting the information. If the static method that Albert pointed to is acceptable, a link to it should be placed in proximity to the Google one,
回答2:
gmaps for business does not offer this option: https://developers.google.com/maps/documentation/business/accessibility
that link is to google maps for business, which i'm assuming you are not using, but its the only maps api link under the a11y policies: http://www.google.com/accessibility/policy/
there is google earth, but that's not what you want i don't think. this is sticky, and not best-practice, but you gotta do what you gotta do...since you can detect when css is off, i would run that function first on page load, if it is, serve up gmaps with a static image map fallback, if its not, only serve up the static map. i wrote a post about using static images as fallbacks, which you can use. NOTE: this doesn't include the entire functionality i just mentioned, just loading gmaps with static image fallback: http://bowdenweb.com/wp/2011/05/optimize-google-maps.html
来源:https://stackoverflow.com/questions/15659051/google-maps-508-accessibility-without-styles