Skip to content

Commit d4743fc

Browse files
Incubates #6271
2 parents ecc85aa + 49779ee commit d4743fc

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

‎source/NVDAObjects/UIA/__init__.py‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
import braille
2727

2828
#: The UI Automation text units (in order of resolution) that should be used when fetching formatting.
29-
UIAFormatUnits=[UIAHandler.TextUnit_Format,UIAHandler.TextUnit_Word,UIAHandler.TextUnit_Character]
29+
UIAFormatUnits=[
30+
UIAHandler.TextUnit_Format,
31+
UIAHandler.TextUnit_Word,
32+
UIAHandler.TextUnit_Character
33+
] if UIAHandler.isUIAAvailable else None
3034

3135
class UIATextInfo(textInfos.TextInfo):
3236

@@ -182,7 +186,16 @@ def _get_UIAElementAtStart(self):
182186
def _get_bookmark(self):
183187
return self.copy()
184188

185-
UIAControlTypesWhereNameIsContent={UIAHandler.UIA_ButtonControlTypeId,UIAHandler.UIA_HyperlinkControlTypeId,UIAHandler.UIA_ImageControlTypeId,UIAHandler.UIA_MenuItemControlTypeId,UIAHandler.UIA_TabItemControlTypeId,UIAHandler.UIA_TextControlTypeId,UIAHandler.UIA_SplitButtonControlTypeId}
189+
UIAControlTypesWhereNameIsContent={
190+
UIAHandler.UIA_ButtonControlTypeId,
191+
UIAHandler.UIA_HyperlinkControlTypeId,
192+
UIAHandler.UIA_ImageControlTypeId,
193+
UIAHandler.UIA_MenuItemControlTypeId,
194+
UIAHandler.UIA_TabItemControlTypeId,
195+
UIAHandler.UIA_TextControlTypeId,
196+
UIAHandler.UIA_SplitButtonControlTypeId
197+
} if UIAHandler.isUIAAvailable else None
198+
186199

187200
def _getControlFieldForObject(self, obj,isEmbedded=False,startOfNode=False,endOfNode=False):
188201
"""

0 commit comments

Comments
 (0)