Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of getting link destination of graphic links #14783

Merged
merged 3 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions source/globalCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -3670,6 +3670,16 @@ def script_reportLinkDestination(
ti.expand(textInfos.UNIT_CHARACTER)
obj: NVDAObject = ti.NVDAObjectAtStart
presses = scriptHandler.getLastScriptRepeatCount()
if (
obj.role == controlTypes.role.Role.GRAPHIC
and (
obj.parent
and obj.parent.role == controlTypes.role.Role.LINK
)
):
beqabeqa473 marked this conversation as resolved.
Show resolved Hide resolved
# In Firefox, graphics with a parent link also expose the parents link href value.
# In Chromium, the link href value must be fetched from the parent object. (#14779)
obj = obj.parent
if (
obj.role == controlTypes.role.Role.LINK # If it's a link, or
or controlTypes.state.State.LINKED in obj.states # if it isn't a link but contains one
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ This only worked for Bluetooth Serial ports before. (#14524)
Instead NVDA reports that the link has no destination. (#14723)
- Several stability fixes to input/output for braille displays, resulting in less frequent errors and crashes of NVDA. (#14627)
- NVDA again recovers from many more situations such as applications that stop responding which previously caused it to freeze completely. (#14759)
- The destination of graphic links are now correctly reported in Chrome and Edge. (#14779)
-


Expand Down