Open Malvoz opened 3 years ago
This would require translations to be packaged with the mapml-viewer
. I believe @prushforth wanted to keep translations (the strings for various languages themselves) in the extension, with the viewer only being shipped with English,
I think it's important to come to an consensus on where the translation information itself should be kept.
Although since this is just a prototype of how web maps in browsers would work, these attributes could be used by the extension to set the language. The attributes would then only work when the extension is installed.
I've updated this issue to focus on supporting HTML attributes on MapML elements in general, as opposed to only i18n-related attributes.
To satisfy a11y and i18n requirements - HTML attributes such as the following should be supported on MapML elements:
lang
dir
translate
style
(for e.g. CSSwriting-mode
,direction
,text-orientation
)aria-*
Example
lang
attribute usage:<layer- lang="en">
<div class="leaflet-layer mapml-layer" lang="en">
<mapml- lang="en">
<div class="leaflet-layer mapml-layer" lang="en">
<map-feature lang="en">
<g ... lang="en">
(?)<map-featurecaption lang="en">
<g ... lang="en">
(?)<map-properties lang="en">
<div class="mapml-popup-content">
, it's problematic to setlang
here because this container also holds themapml-focus-buttons
. Need a new<div>
container as child of<div class="mapml-popup-content">
for<map-properties>
content (e.g.class="mapml-feature-properties" lang="en"
).<map-a lang="en">
<g ... lang="en">
/<path ... lang="en">
(nested<map-a>
)<map-span lang="en">
<map-span lang="en">
(There may be use cases for these attributes on other MapML elements, TBD.)
The above seems unnecessarily complex, implementing this may be more easily achieved if this polyfill used a "live DOM model" approach, but I think that requires forking Leaflet (or other lib).
MapML parity (TODO):