Problem/Motivation

This is a followup from #3217926: Olivero: Rename and consolidate all color CSS variable names..

With the color consolidation in #3217926: Olivero: Rename and consolidate all color CSS variable names., there is no longer a differentiation in background color between the hover and drag states within tabledrag.

There should be a slight change of background color, and text needs to still meet contrast minimums

Steps to reproduce

  1. Fresh install of Drupal, with patch applied
  2. On /admin/appearance, set administration theme to "Olivero"
  3. On /admin/structure/block, use the tabledrag to re-order the blocks. Note the color differences

Issue fork drupal-3260118

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:

Comments

mherchel created an issue. See original summary.

kostyashupenko made their first commit to this issue’s fork.

kostyashupenko’s picture

Status: Active » Needs review
kristen pol’s picture

Thanks for the MR.

1. Code changes seem straight forward.

2. MR applies to Drupal 10 only. Need MR or patch for 9.3 and 9.4.

[drupal-9.4.x-dev/9.4.x] [drupal-9.4.x-dev]$ patch -p1 < 1733.diff 
patching file core/themes/olivero/css/base/variables.css
Hunk #1 FAILED at 138.
1 out of 1 hunk FAILED -- saving rejects to file core/themes/olivero/css/base/variables.css.rej
patching file core/themes/olivero/css/base/variables.pcss.css
Hunk #1 FAILED at 99.
1 out of 1 hunk FAILED -- saving rejects to file core/themes/olivero/css/base/variables.pcss.css.rej
patching file core/themes/olivero/css/components/tabledrag.css
Hunk #1 FAILED at 28.
1 out of 1 hunk FAILED -- saving rejects to file core/themes/olivero/css/components/tabledrag.css.rej
patching file core/themes/olivero/css/components/tabledrag.pcss.css
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file core/themes/olivero/css/components/tabledrag.pcss.css.rej

3. Tagging for issue summary as it could use the issue summary template and have explicit steps to reproduce.

4. This can be tested on Drupal 10 with steps to reproduce.

mherchel’s picture

Thanks for the review @Kristen Pol!

We don't need a patch for 9.x, though, because the changes that caused this (#3217926: Olivero: Rename and consolidate all color CSS variable names.) were D10 only.

kristen pol’s picture

Good to know, thanks!

andy-blum’s picture

Status: Needs review » Needs work

This will need rebased to 10.1.x (it may be easier to open a new MR than to attempt a rebase for over a year of commits).

Also, steps to reproduce would be super helpful

ameymudras’s picture

Version: 10.0.x-dev » 10.1.x-dev
Status: Needs work » Needs review
StatusFileSize
new3.17 KB

Uploading a patch for 10.1.x

Bushra Shaikh’s picture

Assigned: Unassigned » Bushra Shaikh
andy-blum’s picture

Per #1 the text-to-background contrast ratio is fine, what I'm not sure about is if the differences between the different background colors is enough. The background-color differences are between 1.06 and 1.12, but I'm not sure if the background colors need to have any specific CCR amount.

Per accessibleweb:

You need to maintain 3:1 contrast ratio during all of that elements states (focus, hover, active, etc). The requirement doesn’t mean that states need to contrast 3:1 with each other. For instance, an element's hover state does not need to contrast 3:1 with its focus state, or even its resting state.

However, WCAG SC 1.4.1:

Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A)

We change the mouse cursor over the tabledrag handle, which is another visual indicator of interactivity, but there's no non-color visual difference while and element is "active". But I'm also not sure we need one. Tagging for a11y review, and per @xjm's comments in other issues, accessibility issues are not minor. Screenshots attached.

andy-blum’s picture

Assigned: Bushra Shaikh » Unassigned
bnjmnm’s picture

We change the mouse cursor over the tabledrag handle, which is another visual indicator of interactivity, but there's no non-color visual difference while and element is "active". But I'm also not sure we need one.

We don't need a non-color visual difference, but the reasoning is a little fuzzier than just "Meets WCAG 123". We already have the "show row weights" alternative to address accessibility limitations. I suspect it was created with mouse/pointer related disabilities in mind, but it also happens to be quite good for users with color or contrast perception issues. There's nothing wrong with implementing the approach here IMO, especially since it is addressing a recent regression.

I would like to see a tabledrag-specific followup created, however. I was initially going to say this is fine because seeing table row move as you drag is the non-color indicator. Then I realized the table row doesn't really move with the drag action until the mouse has traveled a decent distance. Compare that to the Sort A List example on this page. That an unambiguous not-color-only visual queue, and tabledrag would feel much nicer were it to do that.

andy-blum’s picture

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

Per my review in #11, and @bnjmnm's review in #13, moving to RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: 3260118-9.patch, failed testing. View results

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.