mapbox-gl-accessibility icon indicating copy to clipboard operation
mapbox-gl-accessibility copied to clipboard

Use localized name property by default

Open 1ec5 opened this issue 8 years ago • 1 comments

When Mapbox GL Language is present, default to the name_* property that corresponds to the user’s current locale. We could keep the accessibleLabelProperty property around for data visualization use cases that aren’t so heavily focused on the Mapbox Streets source.

/cc @tristen @lukasmartinelli

1ec5 avatar Nov 17 '17 03:11 1ec5

The iOS implementation in mapbox/mapbox-gl-native#9950 additionally transliterates the name into Latin script using ICU if the user’s language is written in a Latin alphabet. This ensures that the labels remain comprehensible in a screen reader, since most screen readers are only capable of reading one language at a time, even if the user can comprehend multiple languages and multiple scripts.

https://github.com/mapbox/mapbox-gl-native/blob/dcd7da14f6627a09a5840a3046b5708449962f69/platform/ios/src/MGLMapAccessibilityElement.mm#L52-L67

However, I don’t believe there are any client-side facilities for transliteration on the Web platform. There may be server APIs for transliteration, but that might be out of scope for this plugin.

1ec5 avatar Nov 17 '17 03:11 1ec5