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
Create a global plugin containing the following code:
import globalPluginHandler
class GlobalPlugin(globalPluginHandler.GlobalPlugin):
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
obj.role
Restart NVDA.
Open a Windows command console.
Expected: NVDA should say terminal after announcing the console's title.
Actual: Only the title is announced.
This also happens for Scintilla editor controls.
I suspect this is because the role gets cached on the instance during the choosing of overlay classes and the cache isn't invalidated until the next core cycle. However, role is overridden by the overlay classes, thus making the cached value incorrect. To solve this, we could simply invalidate the cache after applying overlay classes. This would unfortunately often cause more cross-process calls, but I'm not sure there's anything else we can do to fix this.
The text was updated successfully, but these errors were encountered:
Comment 1 by jteh on 2012-07-31 07:54
Actually, we cache properties separately depending on which class they came from. The problem is that IAccessible.role calls super (which gets changed when overlay classes are applied) and super's value might be cached for IAccessible.role.
To generalise, the problem occurs when properties fetched before overlay classes are applied call other properties in the same object which get changed after overlay classes are applied.
The solution is to introduce another type of caching which gets invalidated after choosing overlay classes. This way, properties that call other properties (such as role) can be invalidated, while properties (such as IAcccessibleRole) that are lower level don't have to be invalidated.
Changes:
Changed title from "Roles not spoken for certain focused objects when role property called in chooseNVDAObjectOverlayClasses" to "Cache potentially invalid for properties which call other properties before NVDAObject overlay classes are applied"
Comment 2 by jteh on 2012-08-03 03:18
Let's not over-generalise this. We can easily fix this particular problem by disabling caching for IAccessible.role, which makes sense because it uses lower level properties which are cached anyway.
Changes:
Changed title from "Cache potentially invalid for properties which call other properties before NVDAObject overlay classes are applied" to "Roles not spoken for certain focused objects when role property called in chooseNVDAObjectOverlayClasses"
Reported by jteh on 2012-07-30 10:43
Str:
This also happens for Scintilla editor controls.
I suspect this is because the role gets cached on the instance during the choosing of overlay classes and the cache isn't invalidated until the next core cycle. However, role is overridden by the overlay classes, thus making the cached value incorrect. To solve this, we could simply invalidate the cache after applying overlay classes. This would unfortunately often cause more cross-process calls, but I'm not sure there's anything else we can do to fix this.
The text was updated successfully, but these errors were encountered: