mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Don't write directly to classList in FocusTrap.js
According to [MDN][1] `classList` is a read-only property. To properly write to it you use its [`value`][2] property (`DOMTokenList#value`) [1]: https://developer.mozilla.org/en-US/docs/Web/API/Element/classList [2]: https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/value
This commit is contained in:
parent
bf653e0c7d
commit
7249a732c1
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ function createHiddenFocusableElements(el, binding) {
|
|||
const createFocusableElement = (onFocus) => {
|
||||
const element = document.createElement('span');
|
||||
|
||||
element.classList = 'p-hidden-accessible p-hidden-focusable';
|
||||
element.classList.value = 'p-hidden-accessible p-hidden-focusable';
|
||||
element.tabIndex = tabIndex;
|
||||
element.setAttribute('aria-hidden', 'true');
|
||||
element.setAttribute('role', 'presentation');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue