3 ms·
Good question... I haven't thought about it deeply, but I would say that using this lib itself won't have impact on accessibility: if the HTML fragments are car
by josephernest 3y ago
Good question... I haven't thought about it deeply, but I would say that using this lib itself won't have impact on accessibility: if the HTML fragments are carefully crafted to take accessibility into account, then after HTML fragments swapping the DOM will keep this aspect.
I would say the construction of the HTML fragments (done by the user of this lib) is the most impactful part.
Since the URL can change after a HTML-fragment-swapping with this lib, I can imagine that screenreaders will detect the URL change and take the new layout into consideration, is that right?
- simonw 3y agoI'm not 100% sure myself. My understanding is that if you swap out a piece of the page you need to sleet screenreader users to the change, but I don't know the best way to do that - I presume it involves ARIA attributes.