krautzource / aria-tree-walker

A lightweight walker for labeled ARIA trees
https://krautzource.github.io/aria-tree-walker/
Apache License 2.0
2 stars 0 forks source link

support data-owns #25

Closed pkra closed 3 years ago

pkra commented 3 years ago

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).

pkra commented 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)?

pkra commented 3 years ago

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.

pkra commented 3 years ago

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.

pkra commented 3 years ago

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.

pkra commented 3 years ago

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.

pkra commented 3 years ago

Reconsidering roving tabindex after realizing I had not read the APG pattern properly. It looks (much) simpler after all.

pkra commented 3 years ago

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.

pkra commented 3 years ago

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.

pkra commented 3 years ago

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).