Skip to content

Commit d57b315

Browse files
committed
Added support for the filter edits above the columns in the grids.
1 parent 6c210fd commit d57b315

File tree

5 files changed

+82
-3
lines changed

5 files changed

+82
-3
lines changed

2023.1.0.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"addonId": "vismaAdministration",
3+
"displayName": "Visma Administration",
4+
"URL": "",
5+
"description": "Fixes accessibility issues in Visma Administration/Fakturering/forening.",
6+
"sha256": "7c9f71312b9cceda344f822402442a87a44b47699d5ff646b0b315bff9116a85",
7+
"homepage": null,
8+
"addonVersionName": "2023.1",
9+
"addonVersionNumber": {
10+
"major": 2023,
11+
"minor": 1,
12+
"patch": 0
13+
},
14+
"minNVDAVersion": {
15+
"major": 2021,
16+
"minor": 1,
17+
"patch": 0
18+
},
19+
"lastTestedVersion": {
20+
"major": 2023,
21+
"minor": 1,
22+
"patch": 0
23+
},
24+
"channel": "stable",
25+
"publisher": "",
26+
"sourceURL": "https://github.com/towebo/vismaadministration-nvdaaddon",
27+
"license": null,
28+
"licenseURL": null
29+
}

2023.2.0.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"addonId": "vismaAdministration",
3+
"displayName": "Visma Administration",
4+
"URL": "",
5+
"description": "Fixes accessibility issues in Visma Administration/Fakturering/forening.",
6+
"sha256": "151fdaa2f664018e68a6d86b58c13afb0385038fb8844b497372b48ce2a310cb",
7+
"homepage": null,
8+
"addonVersionName": "2023.2",
9+
"addonVersionNumber": {
10+
"major": 2023,
11+
"minor": 2,
12+
"patch": 0
13+
},
14+
"minNVDAVersion": {
15+
"major": 2021,
16+
"minor": 1,
17+
"patch": 0
18+
},
19+
"lastTestedVersion": {
20+
"major": 2023,
21+
"minor": 1,
22+
"patch": 0
23+
},
24+
"channel": "stable",
25+
"publisher": "",
26+
"sourceURL": "https://github.com/towebo/vismaadministration-nvdaaddon",
27+
"license": null,
28+
"licenseURL": null
29+
}

addon/appModules/vismaAdmin/__init__.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList):
137137
clsList.insert(0, VismaControlBar)
138138
elif isinstance(obj, IAccessible) and obj.IAccessibleRole == oleacc.ROLE_SYSTEM_CHECKBUTTON:
139139
clsList.insert(0, SystemCheckButton)
140+
elif isinstance(obj, IAccessible) and obj.IAccessibleRole == oleacc.ROLE_SYSTEM_TEXT:
141+
g = obj.parent.parent
142+
if g.windowClassName == "SafGrid":
143+
clsList.insert(0, GridFilterEdit)
140144
except Exception as e:
141145
log.info("Fel i chooseNVDAObjectOverlayClasses: %s" % e)
142146
ui.message("Fel i chooseNVDAObjectOverlayClasses: %s" % e)
@@ -334,7 +338,7 @@ def script_readGridSelection(self, gesture):
334338

335339

336340
def ReadGridSelection(self):
337-
checkbox_cols = ["Markering", "Inaktiv", "Aktivt", "Makulerad", "Fakturerad", "Skriv", "Skriv order", "Skriv följ", "Restn ej", "Skickad", "Levererad", "Order", "Fullständig", "Läs", "Utskrift"]
341+
checkbox_cols = ["Markering", "Inaktiv", "Aktivt", "Makulerad", "Fakturerad", "Skriv", "Skriv order", "Skriv följ", "Restn ej", "Skickad", "Levererad", "Order", "Fullständig", "Läs", "Utskrift", "Belopprabatt", "Restn ant"]
338342

339343
try:
340344
#gridpat = nav._getUIAPattern(UIAHandler.UIA_GridPatternId,UIAHandler.IUIAutomationGridPattern)
@@ -550,3 +554,21 @@ def script_changeItem(self,gesture):
550554
gesture.send()
551555
speech.speakObject(self, reason=controlTypes.OutputReason.FOCUS)
552556

557+
class GridFilterEdit(IAccessible):
558+
559+
def initOverlayClass(self):
560+
try:
561+
UIAClient = UIAHandler.handler.clientObject
562+
grid = self.parent.parent
563+
filter = grid.UIAElement.FindFirst(UIAHandler.TreeScope_Children, UIAClient.CreatePropertyCondition(UIAHandler.UIA_NamePropertyId, "Filter"))
564+
handleCond = UIAClient.CreatePropertyCondition(UIAHandler.UIA_NativeWindowHandlePropertyId, self.windowHandle)
565+
UIAPointer = filter.FindFirstBuildCache(UIAHandler.TreeScope_Children, handleCond, UIAHandler.handler.baseCacheRequest)
566+
txt = UIAPointer.CurrentName
567+
self.name = txt
568+
# This feels wrong but the name won't be spoken when navigating between the filter textboxes with Tab and Shift + Tab without this line.
569+
# Another little tidbit is that you have to press F3 twice to get in some kind of mode so this line makes difference.
570+
ui.message(txt)
571+
except Exception as e:
572+
pass
573+
574+

addon/doc/sv/readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ This add on implements this for NVDA and also provides labelling for many of the
44

55
## Supported Editions And Versions
66
The add on can be used with Visma Administration 2000/1000/500/200, Visma Fakturering and Visma Förening version 2020.0 and higher.
7-

buildVars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _(arg):
2525
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
2626
"addon_description": _("""Fixes accessibility issues in Visma Administration/Fakturering/forening."""),
2727
# version
28-
"addon_version": "2023.1",
28+
"addon_version": "2023.2",
2929
# Author(s)
3030
"addon_author": "Karl-Otto Rosenqvist <karl-otto@mawingu.se>",
3131
# URL for the add-on documentation support

0 commit comments

Comments
 (0)