Re: [w3ctag/design-reviews] Reference Target (Issue #961)

One issue with using selectors in place of IDs is that selectors don't come with the same constraints as IDs. In particular, almost anything about the element can affect whether it matches a selector, and many selectors can match any number of elements.

This would be an issue for things like `aria-activedescendant`, which need to match exactly one element, and which need to trigger live updates to the accessibility tree. We could certainly specify that only the first element which matches the selector should be used (like we do in the case of multiple elements with the same ID), but triggering the live updates may become very costly, since whenever anything changes within the relevant tree, we'll essentially have to run `querySelector()` to check whether the active desendant has changed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/961#issuecomment-2481735961
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/961/2481735961@github.com>

Received on Monday, 18 November 2024 01:14:01 UTC