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

Fix up support of jumping over replaced content (ARIA label etc) when reading in Edge #7341

Merged
merged 1 commit into from Jul 25, 2017

Conversation

michaelDCurran
Copy link
Member

Fixes #7143

  • EdgeTextInfo.UIAElementAtStartWithReplacedContent: Ensure the element we have found in the ancestry does include a valid name, as if it has none, we'd never use it to replace content anyway. This will stop (sometimes large) chunks of the page from being non-navigable.

  • EdgeTextInfo._moveToEdgeOfReplacedContent: Correct logic so that we really land on the edge of replaced content. Previously this would cause the first character after the replaced content to be skipped, and also cause you to be stuck on the first character of the replaced content when moving previous character out of it. The old logic may have been confused by very old builds of Edge with bugs pre Creators Update.

These changes address all the problems mentioned in the summary of Issue #7143 I.e.:
On the page mentioned:

  • h and shift+h now move through all headings, and do not skip or get stuck in a loop
  • Reading down the page with down arrow / review next line no longer skips the entire Main section
  • Pressing shift+1 from the bottom of the page no longer freezes NVDA.

… reading in Edge.

* EdgeTextInfo.UIAElementAtStartWithReplacedContent:  Ensure the element we have found in the ancestry does include a valid name, as if it has none, we'd never use it to replace content anyway. This will stop (sometimes large) chunks of the page from being non-navigable.
* EdgeTextInfo._moveToEdgeOfReplacedContent: Correct logic so that  we really land on the edge of replaced content. Previously this would cause the first character after the replaced content to be skipped, and also cause  you to be stuck on the first character of the replaced content when moving previous character out of it. The old logic may have been confused by very old builds of Edge with bugs pre Creators Update.
name=element.getCachedPropertyValue(UIAHandler.UIA_NamePropertyId)
if name:
ariaProperties=element.getCachedPropertyValue(UIAHandler.UIA_AriaPropertiesPropertyId)
if ('label=' in ariaProperties) or ('labelledby=' in ariaProperties):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while here it might be worth checking for these via EdgeNode._get_ariaProperties or perhaps using splitUIAElementAttribs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a raw UIAElement rather than an NVDAObject, so _get_ariaProperties is not available here.
I could use splitUIAElementAttribs but I'm not too sure its worth the extra processing time where I don't really need the values nor anything else other than checking for those 2 specific keys.

michaelDCurran added a commit that referenced this pull request Jul 12, 2017
@michaelDCurran michaelDCurran merged commit d2976e6 into master Jul 25, 2017
@nvaccessAuto nvaccessAuto added this to the 2017.3 milestone Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants