-
Notifications
You must be signed in to change notification settings - Fork 106
fix(dropdown): trigger button should never be disabled #2671
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
Conversation
🦋 Changeset detectedLatest commit: 7894a07 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
http://v4-archive.patternfly.org/v4/components/dropdown#disabled-toggles demonstrates a disabled trigger button, as such we must align with upstream behaviours. if this is an accessibility issue upstream, we should file there update: @nikkimk received the go ahead from upstream to make this change. thanks for reaching out to them :) |
bennypowers
left a comment
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.
please add unit tests
… dropdown-disabled
|
If a keyboard user is able to open the menu, then a mouse click should do the same. BOTH shouldn't be able to select a sub item. |
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.
(oops approved wrong PR)
@hellogreg @zeroedin and I decided that disabled menu should open for both keyboard and mouse but that menu items can't be clicked |
78b0079 to
d856e4f
Compare
hellogreg
left a comment
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.
Passed the usual browser and screen reader tests this afternoon.
Lighted Grid, Tron Motorbike.
bennypowers
left a comment
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.
Oof GitHub left all these comments pending until now. 😐 Sorry
- move disabled context to pf-dropdown element - use pfv4 css tokens - correct toggle styling for variants, in particular the layout
menu's aria-disabled state is set on internals
|
@bennypowers in the DP's disabled example, the second menu item has a pointer cursor. |
|
A little weirdness here with VoiceOver. The first time a menu item receives focus, VO announces, "[text], menu item." But on subsequent focus, it just reads the text.
This may not be a showstopper. Other menu button examples (e.g., WAI's Navigation Menu Button) don't announce "menu item" with the initial text at all. And VoiceOver does ultimately indicate it is a menu item (as it does in the WAI example):
But the inconsistency might be worth investigating--especially if it causes any side effects. If we're okay with launching it with this, I can open another issue afterward. Windows and mobile testing results to follow... |
|
Windows (Chrome/JAWS and Firefox/NVDA) and mobile (Android and iOS) working as expected. |



What I did
Testing Instructions
Notes to Reviewers