You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
open question.
There is a culture text attribute in UIA, but TTS engines aren't using it. They're using heuristics instead to determine language. Not convinced that mapping this is valuable. Would like input...
Assuming an author specifies lang for the page or a passage, and that there's a mapping from the value of lang to a Microsoft Locale ID, wouldn't mapping it via UIA_CultureAttributeId at least make it easier for TTS engines or other AT to consume, as opposed to relying on heuristics? Does mapping it like that have a cost?
I guess the same question goes for mapping dir via UIA_TextFlowDirectionsAttributeId?
Few things changed since asking the question - at the very least Narrator is considering supporting mixed-language texts and I'm sure other ATs would be interested as well to support full Microsoft Office document fidelity. For the Edge web platform this would be exposed in two ways (identical values, only difference is how you get them):
While mapping those value we've realized one complication - HTML attributes are not inherited and to implement this in a way that makes sense we walk the tree to find the nearest ancestor with lang attribute. I don't think we've tried Firefox, but in Chrome on Windows at least I believe Blink maps lang attribute to (non-standard) CSS -webkit-locale property and gets cascade for free. We didn't check but I won't be surprised if Blink actually maps -webkit-locale and not lang itself.
As for UIA_TextFlowDirectionsAttributeId as a mapping for dir attribute - that does make sense, no objection.
Jason, let me know if I should capture both attributes in the mapping specification for UIA - I'm happy to.
Activity
jasonkiss commentedon Dec 21, 2016
Assuming an author specifies
langfor the page or a passage, and that there's a mapping from the value oflangto a Microsoft Locale ID, wouldn't mapping it via UIA_CultureAttributeId at least make it easier for TTS engines or other AT to consume, as opposed to relying on heuristics? Does mapping it like that have a cost?I guess the same question goes for mapping
dirvia UIA_TextFlowDirectionsAttributeId?@boggydigital, any perspective?
boggydigital commentedon Dec 28, 2016
Few things changed since asking the question - at the very least Narrator is considering supporting mixed-language texts and I'm sure other ATs would be interested as well to support full Microsoft Office document fidelity. For the Edge web platform this would be exposed in two ways (identical values, only difference is how you get them):
Both values are LCIDs (https://msdn.microsoft.com/en-us/library/cc233965.aspx).
While mapping those value we've realized one complication - HTML attributes are not inherited and to implement this in a way that makes sense we walk the tree to find the nearest ancestor with lang attribute. I don't think we've tried Firefox, but in Chrome on Windows at least I believe Blink maps lang attribute to (non-standard) CSS -webkit-locale property and gets cascade for free. We didn't check but I won't be surprised if Blink actually maps -webkit-locale and not lang itself.
As for UIA_TextFlowDirectionsAttributeId as a mapping for dir attribute - that does make sense, no objection.
Jason, let me know if I should capture both attributes in the mapping specification for UIA - I'm happy to.
UIA mappings for lang and dir attributes / issue #19
jasonkiss commentedon Apr 27, 2017
Thanks @boggydigital. I've updated those mappings in the above commit. Closing, but if the language needs tweaking, we can do that.