Re: [svg-aam] Should SVG with no accessible children have role=img? (#12)

As I understand it, Chromium (at least on Windows) currently exposes all svgs as role image.

I see problems with this if the svg mutates to contain accessible children (and there's no reason that can't happen). Consider this:

`data:text/html,<svg id="svg"><title>title</title></svg><script>setTimeout(() => svg.innerHTML += '<rect aria-label="rect"></rect>', 1000);</script>`

The svg initially contains no accessible children, but after a second, it mutates to contain an accessible child. If we have different role mappings for svg here, the role has to change. This is a challenge for some platforms at least, particularly with roles as different as image and document.

To deal with that, should the browser recreate the whole subtree? This would require the browser to check the parent every time an accessible is added/removed from an svg subtree to see whether it needs to be recreated. There's probably no perf issue there, but it will definitely require special case code with regard to tree management, so we need to be sure this is really what we want.

-- 
GitHub Notification of comment by jcsteh
Please view or discuss this issue at https://github.com/w3c/svg-aam/issues/12#issuecomment-968412540 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 15 November 2021 01:02:00 UTC