ziolko / aria-devtools

Easily spot missing ARIA labels, misused ARIA roles, and incomplete keyboard support in your web applications.
https://chrome.google.com/webstore/detail/aria-devtools/dneemiigcbbgbdjlcdjjnianlikimpck?hl=en
MIT License
385 stars 12 forks source link

Add ability to traverse through Shadow DOM #38

Closed arminbashizade closed 1 year ago

arminbashizade commented 1 year ago

test on this page: https://js-odeam3.stackblitz.io (source code)

ziolko commented 1 year ago

@arminbashizade This is great stuff. I am shocked that so little code was required to support shadow DOM. Thanks for this contribution and sorry for the late reply.

Unfortunately, the test page you've provided doesn't seem to contain any content. I will test it on https://www.webcomponents.org/ and if everything is good I will merge and release it either today or tomorrow.

arminbashizade commented 1 year ago

@ziolko my bad I'd forgot to save the files in Stackblitz 😅 you can try again now

ziolko commented 1 year ago

This is obviously a great improvement. Unfortunately, due to https://github.com/WICG/webcomponents/issues/204 it fails to observe shadow DOM roots created after ARIA DevTools was enabled on the page (you can see an example at https://stackblitz.com/edit/js-ukrqkc?file=index.js). Do you have an idea how this could be improved?

Anyway, I'd like to merge and release this change. I keep list of contributors at https://github.com/ziolko/aria-devtools#contributors- . Are you OK with adding you there?

arminbashizade commented 1 year ago

This is obviously a great improvement. Unfortunately, due to WICG/webcomponents#204 it fails to observe shadow DOM roots created after ARIA DevTools was enabled on the page (you can see an example at https://stackblitz.com/edit/js-ukrqkc?file=index.js). Do you have an idea how this could be improved?

@ziolko I pushed some changes that would recreate the AOM tree when observed mutation includes addition/deletion of shadow roots, not sure if that's the most efficient way or if I can update just part of the tree, though. Let me know if I can improve that.

Anyway, I'd like to merge and release this change. I keep list of contributors at https://github.com/ziolko/aria-devtools#contributors- . Are you OK with adding you there?

of course, I'd be happy to be included.

ziolko commented 1 year ago

Looks great! I will release it tomorrow and should appear on Chrome store in the next few days.

ziolko commented 1 year ago

@arminbashizade I have released a new version and added you to the list of contributors. Thanks you for this PR and for your help!