Skip to content

"Dangerous" Buttons should be Identified as such via the screen reader #713

Closed

Description

@aphelionz

Steps to reproduce (assumes ChromeVox or similar)

  1. Open https://elastic.github.io/eui/#/layout/modal in a new tab.
  2. Tab to the "Show dangerous ConfirmModal" button
  3. Press enter

Actual Result

Only the "Yes, Do It" button is focused and read

Expected Result

The screen reader should read the button text, but also indicate that this action could be dangerous, or permanent,or otherwise.

Suggested Fix
Try the example here: http://gdkraus.github.io/accessible-modal-dialog/ with ChromeVox

Category: #688: Elastic UI Buttons Accessibility,
Relevant WCAG Criteria: 3.3.2 Input Assistance: Labels or Instructions

Activity

  1. added
    documentation
    on Jun 8, 2018
  2. anishagg17 commented on Mar 12, 2020

    @anishagg17
    Contributor

    @snide is this issue still open?

  3. myasonik commented on Mar 12, 2020

    @myasonik
    Contributor

    @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.

  4. aphelionz commented on Mar 12, 2020

    @aphelionz
    Author

    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.

  5. myasonik commented on Mar 12, 2020

    @myasonik
    Contributor

    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.

  6. snide commented on Mar 12, 2020

    @snide
    Contributor

    I think this is a downstream concern best solved by proper text, confirms and EuiScreenReaderOnly usage.

    I can't think of any automatic methods we could do that would work most of the time.

  7. aphelionz commented on Mar 12, 2020

    @aphelionz
    Author

    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 👍

  8. myasonik commented on Mar 12, 2020

    @myasonik
    Contributor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitydocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions