lauriii / umami

[Deprecated] Umami is now included in Drupal Core. All further work happens there.
https://www.drupal.org/project/issues/drupal?component=Umami+demo
GNU General Public License v2.0
18 stars 5 forks source link

Focus styles for buttons #132

Closed cehfisher closed 6 years ago

cehfisher commented 6 years ago

Making a stand-alone ticket to tackle this accessibility issue.

From @fuzzbomb:

Still need focus styles for buttons, currently, rely on color change only. (Can't recall whether the styles sheets are suppressing user agent defaults or not.)

Work has started on this with possibly too great a hover/focus change. Might want to wind this one in and keep the green/white but have a darker border. Or if folks like this (and I'm having second thoughts) then great.

From @kjays:

Work has started on this with possibly too great a hover/focus change. Might want to wind this one in and keep the green/white but have a darker border. Or if folks like this (and I'm having second thoughts) then great.

cehfisher commented 6 years ago

I am seeing focus styles for buttons, but I think the issue is when a link is used instead of a true

fuzzbomb commented 6 years ago

I think some HMTL was stripped out of your comment, so I can't exactly make sense of what you meant.

The pink "button" is actually a link

It behaves as a link, so <a> is the correct element - that part is working fine. Do you think we should keep the "button" styling or make it more like the "View Recipe >" link style? There might be some button styling classes we can re-use.

I see a focus style on this link. In Firefox, it's the 1px dotted outline, so it's not a very obvious focus style. in Chromium it's the blue outline, and against the wooden table image, it's even harder to see than the Firefox one!

markconroy commented 6 years ago

I have that banner button/link set like this now:

default: screen shot 2018-01-12 at 16 48 38

hover/focus: screen shot 2018-01-12 at 16 48 42

Is that enough for this issue to close?

cehfisher commented 6 years ago

Was the mark-up changed to

markconroy commented 6 years ago

Hi Carrie,

I didn't change the markup, I just added a hover/focus state css to .block-banner-block .field--name-field-content-link a. There is no button class there, it's just styling the (entity reference field) field.

I'm happy to take your lead on suggestions.

cehfisher commented 6 years ago

This is one of those "best case scenario" type of fixes. Your fix is a great start, but much more we could do in the future. I'd say either close this ticket and we can reopen at at later date, or add a tag indicating that this ticket is a future improvement.

markconroy commented 6 years ago

I'll close for now, as issues are moving to Drupal.org.

fuzzbomb commented 6 years ago

Follow-up on d.o

https://www.drupal.org/project/drupal/issues/2938194