Closed pkra closed 3 years ago
We'd need another attribute to serve the equivalent of ID. Is data-id too generic? data-own-id? data-tree-id (but then data-tree instead of data-own)?
Slight snag: aria-activedescendant still needs an ID (I didn't actually turn off IDs during the earlier tests). So we'll need to test switching to a roving tabindex as well.
So we'll need to test switching to a roving tabindex as well.
I'm struggling with this actually. But I had another idea, "roving id", where we could re-use an id across the tree. That way we'd only have a single ID to worry about (and only during exploration). A quick test with NVDA worked but this needs more research.
A quick test with NVDA worked but this needs more research.
Orca seems good. JAWS doesn't seem to like returning to the root; needs looking into.
JAWS doesn't seem to like returning to the root; needs looking into.
Actually NVDA also failed. That's likely because a node can't be its own active-descendant (as per spec, anyway). Quick test on VO also didn't seem much worse. More testing needed in any case.
Reconsidering roving tabindex after realizing I had not read the APG pattern properly. It looks (much) simpler after all.
To recap: the second attempt with roving tabindex works well. NVDA, JAWS, Narrator seem ok on Chrome and FF, Orca on FF has a minor issue (returning to root is silent), VO is ok on Chrome, FF (issue like Orca) and bareable on Safari, ChromeVox (ChromeOS) is also ok.
Maybe this should become breaking change after all. Switching from aria-activeDescendant to a roving tabindex appoach is a rather large change and while not formally changing the API it might break things.
For example, our docs use :focus
to style the background of the root which will break as (DOM) focus starts to move around. Hardly a huge change but nevertheless breaking.
Thinking about this some more, I think we can remove aria-owns support altogether. Aria-owns is only necessary on the tree root so authors should only have to duplicate aria-owns as (part of) data-owns at the root.
That would make this a truly breaking change (but also much simpler).
As per https://github.com/krautzource/aria-tree-walker/issues/12#issuecomment-789595374 pp we often do not need aria-owns but can use a custom attribute, thus reducing ID related overhead for authors.
We should probably continue to support aria-owns so this should be a feature (and not a breaking change).