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

Don't add aria-owns attributes for non-existent elements (PR 15237 follow-up) #15311

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Currently when the TextAccessibilityManager.enabled method is called, we'll update aria-owns for any pre-existing elements. This obviously makes sense when e.g. zooming/rotating in the viewer, since the annotationLayer/annotationEditorLayer is kept in those cases.
However when the page is fully reset, e.g. as result of going out-of-view and thus being evicted from the cache, we still keep the #textNodes-Map around. This causes us to set the aria-owns attribute (in the textLayer) for an element that doesn't actually exist any more, which as far as I'm concerned seems incorrect. In this case the element will simply, as already implemented, be re-inserted when the annotationLayer/annotationEditorLayer renders again.

…follow-up)

Currently when the `TextAccessibilityManager.enabled` method is called, we'll update `aria-owns` for any pre-existing elements. This obviously makes sense when e.g. zooming/rotating in the viewer, since the annotationLayer/annotationEditorLayer is kept in those cases.
However when the page is *fully* reset, e.g. as result of going out-of-view and thus being evicted from the cache, we still keep the `#textNodes`-Map around. This causes us to set the `aria-owns` attribute (in the textLayer) for an element that doesn't actually exist any more, which as far as I'm concerned seems incorrect. In this case the element will simply, as already implemented, be re-inserted when the annotationLayer/annotationEditorLayer renders again.
@Snuffleupagus Snuffleupagus force-pushed the text-a11y-removed-element branch from 8378c35 to 6c4561f Compare August 13, 2022 19:52
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/10c5a97c00aa6fe/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/5e39b68e4532f6a/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/10c5a97c00aa6fe/output.txt

Total script time: 4.91 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/5e39b68e4532f6a/output.txt

Total script time: 6.47 mins

  • Integration Tests: FAILED

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

Good catch, thank you.

@calixteman
Copy link
Contributor

Do you think I should make a new release ?
FYI, I'm in pto for the next two weeks and I'd like let the Firefox built-in viewer in a good state.

@Snuffleupagus Snuffleupagus merged commit 2b66ed5 into mozilla:master Aug 14, 2022
@Snuffleupagus
Copy link
Collaborator Author

Do you think I should make a new release ?

You mean update the version in Firefox? (Since the next release of the general PDF.js library isn't due just yet :-)
Unless the updatebot will handle that, and all I have to do is approve the patch in Phabricator, it probably wouldn't hurt to do one more Firefox update now.

FYI, I'm in pto for the next two weeks and I'd like let the Firefox built-in viewer in a good state.

Enjoy your time off!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants