-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add opts.disabled for the Dashboard #2768
Conversation
So they can be grayscaled via css
Nice! I slightly modified this:
¹ Note: I had to add classes to |
@@ -502,6 +504,12 @@ module.exports = class Dashboard extends Plugin { | |||
} | |||
} | |||
|
|||
disableAllFocusableElements = (disable) => { | |||
const focusableNodes = toArray(this.el.querySelectorAll(FOCUSABLE_ELEMENTS)) | |||
focusableNodes.forEach(node => node.setAttribute('tabindex', disable ? '-1' : '0')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@goto-bus-stop what do you think of this? I’ve checked and we mostly have tabindex=0
on FOCUSABLE_ELEMENTS, nothing else is used, so not worth storing the previous value before changing it to -1
?
P.S. TIL “The maximum value for tabindex is 32767”.
@nqst what do you think?
Closes #1530