Merge pull request #4016 from bgoscinski/patch-1

Don't write directly to classList in FocusTrap.js
pull/3999/head
Tuğçe Küçükoğlu 2023-06-20 11:25:45 +03:00 committed by GitHub
commit 20f559163a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ function createHiddenFocusableElements(el, binding) {
const createFocusableElement = (onFocus) => { const createFocusableElement = (onFocus) => {
const element = document.createElement('span'); 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.tabIndex = tabIndex;
element.setAttribute('aria-hidden', 'true'); element.setAttribute('aria-hidden', 'true');
element.setAttribute('role', 'presentation'); element.setAttribute('role', 'presentation');