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

Update code to use new cache of idRefs to improve performance #2647

Open
straker opened this issue Nov 17, 2020 · 0 comments
Open

Update code to use new cache of idRefs to improve performance #2647

straker opened this issue Nov 17, 2020 · 0 comments
Labels
performance Performance related issues

Comments

@straker
Copy link
Contributor

straker commented Nov 17, 2020

From @WilcoFiers in regards to #2635:

I think there are a lot more places in axe-core that now we have a cache of ID references we could speed up. Probably best to open a tech debt issue for that one instead of pile it onto this PR. Here's a list though:

  • checks
    • aria-required-parent-evaluate
    • explicit-evaluate
    • hidden-explicit-label-evaluate
    • multiple-labels
    • duplicate-id-evaluate
  • matches
    • duplicate-id-active-matches
    • duplicate-id-misc-matches
    • scrollable-region-focusable-matches
  • commons
    • text.labelVirtual
    • dom.findElmsInContext
    • dom.isVisible (usemap lookup)

To make that easier, we can probably simplify by having something like a idrefsReverse function, that takes a node (with an ID) and an attribute and looks up any element references the ID with that attribute. I'll leave it up to you if you want to do that in this PR or another.

const virtualControls = idrefsReverse(ancestorNode, 'aria-labelledby')
	.map(control => getNodeFromTree(control));
@straker straker added the tech debt Technical debt related tasks label Nov 17, 2020
@straker straker added performance Performance related issues and removed tech debt Technical debt related tasks labels Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance related issues
Projects
None yet
Development

No branches or pull requests

1 participant