@@ -167,9 +167,20 @@ def _normalizeControlField(self, attrs): # noqa: C901
167167 attrs ["roleTextBraille" ] = roleTextBraille
168168 if attrs .get ("IAccessible2::attribute_dropeffect" , "none" ) != "none" :
169169 states .add (controlTypes .State .DROPTARGET )
170- if role == controlTypes .Role .LINK and controlTypes .State .LINKED not in states :
171- # This is a named link destination, not a link which can be activated. The user doesn't care about these.
172- role = controlTypes .Role .TEXTFRAME
170+ if role == controlTypes .Role .LINK :
171+ if controlTypes .State .LINKED not in states :
172+ # This is a named link destination, not a link which can be activated. The user doesn't care about these.
173+ role = controlTypes .Role .TEXTFRAME
174+ else :
175+ attrs ["value" ] = self .NVDAObjectAtStart .value
176+ documentConstantIdentifier = self .obj .documentConstantIdentifier
177+ value = attrs .get ("value" , "" )
178+ if (
179+ value
180+ and documentConstantIdentifier
181+ and value .startswith (f"{ documentConstantIdentifier } #" )
182+ ):
183+ states .add (controlTypes .State .INTERNAL_LINK )
173184 level = attrs .get ("IAccessible2::attribute_level" , "" )
174185 xmlRoles = attrs .get ("IAccessible2::attribute_xml-roles" , "" ).split (" " )
175186 landmark = next ((xr for xr in xmlRoles if xr in aria .landmarkRoles ), None )
@@ -210,6 +221,7 @@ def _normalizeControlField(self, attrs): # noqa: C901
210221 attrs ["detailsRoles" ] = set (self ._normalizeDetailsRole (detailsRoles ))
211222 if config .conf ["debugLog" ]["annotations" ]:
212223 log .debug (f"detailsRoles: { attrs ['detailsRoles' ]} " )
224+ log .info (attrs )
213225 return super ()._normalizeControlField (attrs )
214226
215227 def _normalizeDetailsRole (self , detailsRoles : str ) -> Iterable [Optional [controlTypes .Role ]]:
0 commit comments