Add aria-hidden to resize listener object. Fixes #3948.

pull/3949/head
pngwn 5 years ago
parent 39bbac4393
commit e4078f14a8

@ -237,6 +237,7 @@ export function add_resize_listener(element, fn) {
const object = document.createElement('object');
object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');
object.setAttribute('aria-hidden', 'true');
object.type = 'text/html';
object.tabIndex = -1;

@ -0,0 +1,8 @@
export default {
async test({ assert, target }) {
const object = target.querySelector('object');
assert.equal(object.getAttribute('aria-hidden'), "true");
assert.equal(object.getAttribute('tabindex'), "-1");
}
};

@ -0,0 +1,10 @@
<script>
let offsetWidth = 0;
let offsetHeight = 0;
</script>
<div bind:offsetHeight bind:offsetWidth>
<h1>Hello</h1>
</div>
Loading…
Cancel
Save