Skip to content

Commit

Permalink
access focus improvements
Browse files Browse the repository at this point in the history
C-Loftus committed Feb 22, 2024

Verified

This commit was signed with the committer’s verified signature.
Blarse Egor Ignatov
1 parent 259ba2b commit 8a97377
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nvda/.addOn/sight-free-talon-server/buildVars.py
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ def _(arg):
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description": _("""Server to Communicate With Talon Through the Screen Reader"""),
# version
"addon_version": "1.0",
"addon_version": "0.15",
# Author(s)
"addon_author": "Colton Loftus https://colton.bio/contact/",
# URL for the add-on documentation support
@@ -37,7 +37,7 @@ def _(arg):
# Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional)
"addon_minimumNVDAVersion" : "2019.3",
# Last NVDA version supported/tested
"addon_lastTestedNVDAVersion" : "2023.3.0",
"addon_lastTestedNVDAVersion" : "2023.3.3",
# Add-on update channel (default is None, denoting stable releases,
# and for development releases, use "dev".)
# Do not change unless you know what you are doing!
7 changes: 4 additions & 3 deletions utils/access-focus.py
Original file line number Diff line number Diff line change
@@ -4,17 +4,18 @@
mod = Module()

def get_every_child(element: ax.Element):
if element.children:
if element:
for child in element.children:
yield child
if child.is_keyboard_focusable:
yield child
yield from get_every_child(child)

ctx = Context()

mod.list("dynamic_children", desc="List of children of the active window")

@ctx.dynamic_list("user.dynamic_children")
def dynamic_children() -> dict[str,str]:
def dynamic_children(_) -> dict[str,str]:
root = ui.active_window().element
elements = list(get_every_child(root))

2 changes: 2 additions & 0 deletions utils/access-focus.talon
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
^access {user.dynamic_children}$:
user.focus_element_by_name(dynamic_children)


0 comments on commit 8a97377

Please sign in to comment.