You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
Right now, findFirstFocusableNode and findLastFocusableNode will focus disabled nodes. This is problematic because it breaks tabbability. Take for example the Polaris ActionList component when the first list item is disabled:
By changing const FOCUSABLE_SELECTOR = '...,button...'
to const FOCUSABLE_SELECTOR = '...,button:not(:disabled)...'
Tabbability remains intact and behavior is as expected:
I'm wondering if it makes sense to return a disabled node for any of the disableable selectors (a, input, select, textarea)? If not, when I make the PR I'll specify :not(:disabled) on those as well.
The text was updated successfully, but these errors were encountered:
Right now,
findFirstFocusableNode
andfindLastFocusableNode
will focus disabled nodes. This is problematic because it breaks tabbability. Take for example the PolarisActionList
component when the first list item isdisabled
:By changing
const FOCUSABLE_SELECTOR = '...,button...'
to
const FOCUSABLE_SELECTOR = '...,button:not(:disabled)...'
Tabbability remains intact and behavior is as expected:
I'm wondering if it makes sense to return a disabled node for any of the disableable selectors (a, input, select, textarea)? If not, when I make the PR I'll specify
:not(:disabled)
on those as well.The text was updated successfully, but these errors were encountered: