mirror of
https://github.com/videojs/video.js.git
synced 2025-01-04 06:48:49 +02:00
fix: always set tabIndex to restore keydown a11y (#6871)
Skipping the tabIndex property on created elements due to #6145 optimizations blocks them from receiving keyboard events, due to not being focusable; for example this breaks closing ModalDialog elements by pressing Escape. Fix this by always setting tabIndex, as the element may return the same value even though the property has not been explicitly set. Fixes #6870
This commit is contained in:
parent
861753017e
commit
0140b28cc3
@ -165,7 +165,7 @@ export function createEl(tagName = 'div', properties = {}, attributes = {}, cont
|
||||
// method for it.
|
||||
} else if (propName === 'textContent') {
|
||||
textContent(el, val);
|
||||
} else if (el[propName] !== val) {
|
||||
} else if (el[propName] !== val || propName === 'tabIndex') {
|
||||
el[propName] = val;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user