Problem/Motivation

When we hover on save button in comment form while adding link it shows odd behaviour and is not looking nice.Attaching a video for reference.

Steps to reproduce

1.Create an article node.
2.Add a comment.
3.Click on add link icon present on the right side of the italic icon.
4.Add link there, hover on save button.
5.On hover button becomes a little small.

Proposed resolution

We have to handle on hover change in border property for button and font-weight property of button text.

Issue fork drupal-3211395

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tushar_sachdeva created an issue. See original summary.

aaron.ferris’s picture

Seems these buttons are inheriting hover & focus styles from jQuery UI

.ui-button:hover,
.ui-button:focus {
  border: 1px solid #cccccc/*{borderColorHover}*/;
  background: #ededed/*{bgColorHover}*/ /*{bgImgUrlHover}*/ /*{bgHoverXPos}*/ /*{bgHoverYPos}*/ /*{bgHoverRepeat}*/;
  font-weight: normal/*{fwDefault}*/;
  color: #2b2b2b/*{fcHover}*/;
}

core/assets/vendor/jquery.ui/themes/base/theme.css

Feels like we need to declare these properties in the button:hover/button:focus rulesets.

aaron.ferris’s picture

Something like the attached patch.

I've checked this with both a button, and primary button inside a dialog and it seems to be OK - the background: none gets overridden by the button--primary:hover/focus rule.

aaron.ferris’s picture

Status: Active » Needs review
Sakthivel M’s picture

FileSize
1.88 MB
1.18 MB

@aaron.ferris Thanks for the patch, it applied successfully and looks good to me. I have attached video here.

marking as RTBC.

Sakthivel M’s picture

Status: Needs review » Reviewed & tested by the community
kiran.kadam911’s picture

Patch works! Things are looking good after a patch.

Before patch:

After patch:

RTBC +1

Thanks!

lauriii’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs subsystem maintainer review

Would be great to have one of the subsystem maintainers review this change since it impacts all buttons using this variation.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mitthukumawat’s picture

FileSize
10.83 KB
14.49 KB

Patch applied cleanly for me and resolved the issue of save button state on hover.

chetanbharambe’s picture

Assigned: Unassigned » chetanbharambe
chetanbharambe’s picture

Verified and tested patch #3.
Patch applied successfully and looks good to me.

Testing Steps:
# Goto: admin/content
# Create an article node.
# Add a comment.
# Click on the add link icon
# Add link there, hover on save button.
# On hover, button becomes a little small

Can be a move to RTBC.

chetanbharambe’s picture

Assigned: chetanbharambe » Unassigned
Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs review

Moving back to needs review to address #8.

mherchel’s picture

Priority: Normal » Minor
xjm’s picture

Priority: Minor » Major
Issue tags: +Accessibility, +Olivero stable blocker

I didn't check with tooling, but looking at the videos and screenshots, I strongly suspect the current behavior shows a contrast ratio violation. That makes this a major bug, an accessibility gate violation, and a stable blocker.

xjm’s picture

Title: On hover state of save button in comment form while adding link shows odd behavior. » Comment form save button has incorrect background color and contrast ratio violation on hover
mherchel’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs subsystem maintainer review
FileSize
17.97 KB

Patch #3 looks perfect. RTBC

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

This seems like a really nice improvement! I checked the color contrast of the color used on hover, and it seems like it's not sufficient. We should probably wait until #3211616: Olivero: a11y color contrast test fail for primary button on hover has landed and use the color from there on the hover.

Gauravvvv’s picture

On hover button is using --color--blue-50 variable, Updated it with newly added variable color --color--blue-10 Please review.

Gauravvvv’s picture

Status: Needs work » Needs review

Gauravvvv’s picture

FileSize
1.01 KB

Added interdiff for #3. Please review

chetanbharambe’s picture

Status: Needs review » Needs work
FileSize
549.7 KB
596.67 KB
530 KB

Hi @Gauravmahlawat
Patch applied successfully but Some test cases are getting failed on patch #23

Testing Steps:
# Goto: admin/content
# Create an article node.
# Add a comment.
# Click on the add link icon
# Add link there, hover on save button.
# On hover, the button becomes a little small

Also, I have checked the variation which is addressed in #8
On hover button is using --color--blue-50 variable, Updated it with newly added variable color --color--blue-10

Please refer attached screenshots for the same.
test cases are getting failed on patch #23 so moving to needs work as the patch needs to be re-rolled again.

andy-blum’s picture

Status: Needs work » Needs review

New patch is sort of a reroll of #20. Non-reroll changes include:

  1. Removed the change to variables.pcss.css as it's not needed since #3211616: Olivero: a11y color contrast test fail for primary button on hover
  2. Removed changes to node-teaser.pcss.css as they are not related to this issue
andy-blum’s picture

It tends to help when you actually upload the patch.

mherchel’s picture

Status: Needs review » Needs work

Tests failed :(

andy-blum’s picture

andy-blum’s picture

Status: Needs work » Needs review
Gauravvvv’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
857.62 KB

Patch #28, resolved the jerk and color accessibility issue of the save button state on hover.

Adding after patch screen recording. Moving to RTBC.

  • lauriii committed 8c2a124 on 9.3.x
    Issue #3211395 by Gauravmahlawat, andy-blum, aaron.ferris, Sakthivel M,...

  • lauriii committed efb1a0f on 9.2.x
    Issue #3211395 by Gauravmahlawat, andy-blum, aaron.ferris, Sakthivel M,...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8c2a124 and pushed to 9.3.x. Also cherry-picked to 9.2.x because Olivero is experimental. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.