cisagov / manage.get.gov

A Django-based domain name registrar to communicate with an EPP registry
https://get.gov
Other
60 stars 18 forks source link

Disabled 'buttons' accessibility research #1707

Open rachidatecs opened 9 months ago

rachidatecs commented 9 months ago

Issue description

We want to make sure our pattern of showing 'disabled' buttons follows best accessibility practices.

Currently, we are using this markup on the domain managers page:

<a class="usa-button--unstyled disabled-link usa-tooltip text-no-underline "
          data-position="bottom"
          title="Domains must have at least one domain manager"
          aria-disabled="true"
          data-tooltip="true"
          >
          Remove
</a>

We know buttons with a disabled attribute are not ideal, but are they better than an anchor with no href?

What about a simple span with an aria-label and or title?

Acceptance criteria

Additional context

The literature states that if an action is disabled, do not show it. We think that in the context of our app, it makes sense to have an indication of the disabled action that's both visual and accessible.

Suggest reaching out to Aaron who may be able to shortcut our research.

Links to other issues

1484

Relates to #1917

abroddrick commented 2 weeks ago

@AnnaGingle have you looked at this ticket? Is there any insights that you can give off the top of your head for better approaches and that we should capture here?

vickyszuchin commented 3 days ago

Added "refinement" tag, this is pending @AnnaGingle to review ticket and add insight as needed cc: @Katherine-Osos

AnnaGingle commented 3 days ago

Best practices: