WebAccessibilityToolbar
WebAccessibilityToolbar copied to clipboard
Tracking things injected into the pages, so they can be ignored
When WAT scripts inject stuff into the page, such as indicators of heading structure, these are treated as if they're part of the page from the perspective of other WAT scripts. It should be possible, e.g. using the data- attributes, to keep track of WAT-injected elements and ignore them from scripts. I would suggest this could be achieved by the addition of two library functions:
- One function would wrap the creation of elements to be injected and would ensure they are marked in some unique way (e.g. setting a data- attribute).
- Another function would be used to filter those elements out -- it could for example wrap
getElementBy*
and the CSS selector functions.
If WAT scripts were updated to use these wrappers when creating and searching for elements, I think that could solve it.
I'm happy to take this, but it will affect lots of files, so whoever takes it, it'll need some concerted effort.