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 }}
Repository navigation
"Dangerous" Buttons should be Identified as such via the screen reader #713
@snide I'm thinking of closing this issue without any code change.
I can't think of a way to "mark it as potentially dangerous" but also:
Be non-committal about in case implementing developers are abusing it just for the color change
be as broad as EUI would need (in that, we don't know if it's dangerous because it's irreversible, or slow, or expensive, or any other possible reason)
Provide a good API
And I can't find anything in the spec or online about other people doing anything like this.
Hey @aphelionz! Thanks for jumping in here! I ran through your example in Voice Over and didn't see any example of a "dangerous" button.
Do you have any recommendations on how to implement it? Things I thought about:
We could add some screen reader only text into the button that says something like "This action may not be reversible" but EUI doesn't have any context on the button use so we don't actually have any idea if that's true. Also with injecting a string in there, there's not a great way for developers to override it. (I guess we could add a prop to override it?)
We could add an aria-describedby that points to some similar text but then we run into issues if the dev wants to provide their own description that's nt related to the "dangerous" nature of this button. So then we could merge IDs into a list to pass into aria-describedby but then what if they did want to replace our text? So we need a new prop again...
I think we might just have to accept that we push this issue onto implementing devs as they can always do either of those two solutions today without any work in EUI.
Admittedly it's been a while since I've reviewed this so things may very well have changed since then.
This is probably the closest you can get:
We could add an aria-describedby that points to some similar text but then we run into issues if the dev wants to provide their own description that's nt related to the "dangerous" nature of this button. So then we could merge IDs into a list to pass into aria-describedby but then what if they did want to replace our text? So we need a new prop again...
But it adds complexity when you're trying to make things more simple! So I think really, ultimately, as long as the interface is accessible and doesn't pigeon-hole anybody, disability or not, then you're OK 👍
On that note, I'm going to close this issue then and hope that our continued education across the elastic orgs enables implementing developers to make good decisions with adding descriptions as needed
Activity
anishagg17 commentedon Mar 12, 2020
@snide is this issue still open?
myasonik commentedon Mar 12, 2020
@snide I'm thinking of closing this issue without any code change.
I can't think of a way to "mark it as potentially dangerous" but also:
And I can't find anything in the spec or online about other people doing anything like this.
aphelionz commentedon Mar 12, 2020
I provided a reference to this: https://gdkraus.github.io/accessible-modal-dialog/ and perhaps that's enough. The idea is that you just want to clearly mark any destructive actions or "one-way" trips in a way that a user with a disability can understand.
myasonik commentedon Mar 12, 2020
Hey @aphelionz! Thanks for jumping in here! I ran through your example in Voice Over and didn't see any example of a "dangerous" button.
Do you have any recommendations on how to implement it? Things I thought about:
aria-describedbythat points to some similar text but then we run into issues if the dev wants to provide their own description that's nt related to the "dangerous" nature of this button. So then we could merge IDs into a list to pass intoaria-describedbybut then what if they did want to replace our text? So we need a new prop again...I think we might just have to accept that we push this issue onto implementing devs as they can always do either of those two solutions today without any work in EUI.
snide commentedon Mar 12, 2020
I think this is a downstream concern best solved by proper text, confirms and
EuiScreenReaderOnlyusage.I can't think of any automatic methods we could do that would work most of the time.
aphelionz commentedon Mar 12, 2020
Admittedly it's been a while since I've reviewed this so things may very well have changed since then.
This is probably the closest you can get:
But it adds complexity when you're trying to make things more simple! So I think really, ultimately, as long as the interface is accessible and doesn't pigeon-hole anybody, disability or not, then you're OK 👍
myasonik commentedon Mar 12, 2020
On that note, I'm going to close this issue then and hope that our continued education across the elastic orgs enables implementing developers to make good decisions with adding descriptions as needed