-
Notifications
You must be signed in to change notification settings - Fork 829
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
[EuiAccordion] Added isDisabled
to disable interaction and subdue trigger
#6095
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_6095/ |
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.
Everything looks good to me, but one thought as I tested with voice over. disabled
elements cannot be tabbed to, so the tooltip will not be triggered or read by keyboard usage. However, focusing the text field does read the associated error message, so I don't think this is something to solve in (or is solvable by) EUI. We may want to add more emphasis around ensuring good error messages to the call out.
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.
LGTM. I agree with @chandlerprall that the tooltip won't fire for screen reader users who are navigating by TAB
key or keyboard users. This puts the onus on good error messages and possibly SR-only helper text. Between those two things, I feel like we account for the missing tooltip.
@1Copenut To confirm, you are ok with the docs as they are even though the tooltip is inaccessible? |
I took a second look at the callout language, and am going to reverse my field. I'm 💯 on the code changes, but the docs should be more explicit about the ramifications of disabling the button. Here's what I'm thinking for a revised callout:
|
I feel like this creates a conflict between screen reader users and sighted users; having to use a tooltip for one and screen-reader-only elements for the other. Is there something that both can benefit from? |
My 2 cents: I don't think there's a need to ask for screen reader text as the disabled accordion doesn't have an affordance. The only indication it exists is visual, and the presence of a decent error message colocated in the accordion should provide context for why it is locked open. IMO, the tooltip's only need is to address the "why can't I click on this" state, which it does. |
We chatted in the Emotion sync about this and decided to remove the tooltip altogether and just lean into error/help text. Pushing an update now |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6095/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6095/ |
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.
👍 LGTM. Thanks @cchaos for the docs update.
New prop
The new top level
isDisabled
prop will propagate this to any<button>
elements asdisabled
, removes theonClick
behavior, and applies specific styling to subdue the basic trigger.Checklist
[ ] Checked for breaking changes and labeled appropriately