Open jlp-craigmorten opened 9 months ago
Latest commit: 5d373cd8ad6ebe139703ddfd2fda1058efa2be0b
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Fixes #1026
Updates the
computeAccessibleDescription()
method to handle computation of an accessible description for an element that has not been added to the document.In this fix I have opted to use the
querySelector()
approach, using a polyfill ofCSS.escape()
to handle special characters in the element'sid
(e.g. seeReact.useId()
). There may be other valid approaches that are less involved and more performant.The fix is applied to the
queryIdRefs()
utility, and so also impacts other usage such asaria-owns
andaria-labelledby
evaluation.