Problem/Motivation
When a toolbar tray is open, the currently active tray is indicated as the "'odd one out". The current design uses a mild background gradient on the active button.

Here the shortcuts tray is open, and is visually indicated as the active tray using a slightly different background colour. People who have difficulty perceiving this colour difference may not know which top-level item the current tray belongs to.
Some scenarios where this can have a negative impact:
- People with visual impairments (various kinds).
- Using your device in an environment with bright ambient lighting (near a window on a sunny day, for example).
- Devices with a limited or adjusted colour space (e.g. using Windows high-colour themes, or macOS greyscale, or some other colour adjustment).
This doesn't satisfy two WCAG success criteria:
SC 1.4.1 Use of Color (level A).
SC 1.4.11 Non-text contrast (level AA). If we regard the current background gradient as indicating a state of a UI control (in this case "open" vs. "closed") then the colour difference doesn't have enough contrast.
Proposed resolution
Add a new signifier to the active toolbar tray, which doesn't rely on colour differences alone. Make more effective use of shape signifiers too.
A couple of ideas:
- #7 adds a thick white border to the active toolbar button
- #22 inverts the contrast of the active toolbar button
After much back and forth, there's now consensus that the approach proposed in #22 is the most accessible solution, and the design has been okayed.
Remaining tasks
Design.Update CSS.- Decide if we need any tests for this CSS-only fix.
- Front end framework manager review:
- Is
filter: invert(100%);legit CSS for core? We no longer support IE11, right? - Should we touch stable* or leave them unfixed?
- Is
- RTBC
- Commit
User interface changes
Improve the way the active toolbar tray is conveyed, for better visual accessibility.
Seven
Before

After

Claro
Before

After

API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|
Issue fork drupal-3097907
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
Comment #2
andrewmacpherson commentedUsing major for WCAG level-A issues.
Comment #3
andrewmacpherson commentedComment #5
andrewmacpherson commentedA good issue to work on during the Accessibility Bug Bash at DrupalCon Global 2020.
Whatever solution is found here, check that it works when WIndows High-Contrast theme is used.
It would be a good idea to check what's going on with toolbar styles in Claro too.
Comment #6
tanubansal commentedIts the same in Claro theme too
Comment #7
rudolfbykerThe simplest solution is:
This is visible with low constrast simulation in NoCoffee. I don't have a Windows machine readily available to test with.
This makes the whole toolbar 4px higher, and makes the button content to not look vertically centered any more. I'll work a bit on that and see if I can improve it.
Comment #8
rudolfbykerPatch
Comment #9
avpadernoComment #10
krishnarp commentedI'm working on this as part of DrupalCon Global 2020 Contribution Sprints. I am expecting to finish this within the next 2 hours.
Comment #11
krishnarp commentedApplied the patch on a fresh Drupal 9.1.x checkout.
The patch given in comment #8 applied successfully.
Tested to be working fine on both Seven and Claro themes.
Attaching screenshots of the same.
Comment #13
avpadernoThe failure is caused by the Composer Scaffold.
I am not sure it's related with this patch.
There are also 2 coding standards issues.
Comment #14
komalk commentedComment #15
paulocsPatch #14 looks good to me.
Follow images with the tests.
Comment #16
tanubansal commentedAfter adding patch #14, it looks good for me
RTBC + 1
Comment #17
abhijith s commentedComment #18
abhijith s commentedThe patch #14 works fine after applying on Drupal 9.1.x-dev.
Comment #19
lauriiiWould be great to get a review on the design changes from a designer familiar with the Seven styleguide
Comment #20
abhinand gokhala k commentedComment #21
larowlanAre there aria
these changes are all out of scope here
same here
Comment #22
andrewmacpherson commentedI'm not sold on the bottom white border, because it blends in with the light background of the tray below it. So it's a little bump. I was hoping for something more obvious than this.
The current design uses a mildly different background, by way of a gradient. We could make that a much more obvious difference by using reversing the colour on the active toolbar button. Something like this:
Here the active button has a white background, to convey the tab-like relationship of the toolbar trays. I made the screenshot by fiddling with CSS in dev tools. The icon isn't visible here, because we'd need a dark version.
#21.3 - keep ARIA out of scope here; this issue is just about the visual signifier. There's another issue under the parent plan which will put the programmatic relationships in place; see #3090120: Improve accessibility semantics for Toolbar buttons with trays.
Comment #23
avpadernoYes, totally changing the background color is better than adding a white border. I find the screenshot in comment #22 clearer.
Comment #24
dww#22 looks good (icon notwithstanding, etc). But isn't that still "Active toolbar tray is indicated by color alone" ? It's a more dramatic color change, so it's certainly better, but it's still only color.
Comment #25
avpadernoReading Using CSS to change the presentation of a user interface component when it receives focus, I take that using colors to indicate an active element is not an issue. The issue is rather the chosen color. From their example, I get that changing the background color is preferable.
Should the IS be edited to make clearer what the proposed solution is? (The title doesn't seem to reflect what the proposed solution is, as the patch is still introducing a color change.)
Comment #26
andrewmacpherson commentedRe. #24:
No, that isn't really the point. The mockup in #22 isn't about using a better colour to indicate the active tray; it's about a more effective use of shape:
The earlier design in #7 did these too, but the shape was smaller; the upside-down "T" was more like a small bump, and I think it became a bit cluttered with the white border and the gradient.
The upside-down "T" shape can work robustly with accessibility features which use an alternative colour space, for example invert-colours and greyscale on various operating systems. With careful use of CSS borders and/or contrast inversion this can translate well to Windows' high-contrast mode (a.k.a. forced-colours).
Re. #25:
WCAG technique C15 isn't relevant here. It's about focus, and this issue isn't.
For WCAG conformance, there's a requirement to indicate focus visibly. However there's NO requirement to indicate the active toolbar tray at all. Yet since we do indicate it, we have to do so in a way which satisfies SC 1.4.1 "Use of color".
Technique C15 is considered "sufficient" to address SC 2.4.7 "Focus Visible", but note that isn't considered sufficient to satisfy SC 1.4.1 "Use of Color". That's what the "advisory" classification means; using a colour difference to indicate focus can help, so long as it isn't the only signifier.
For another thing, C15 isn't a very well-written WCAG technique in my view. The example you link to indicates focus by adding a yellow background for the input's label. On it's own this can satisfy SC 2.4.7 "focus visible", but it actually fails SC 1.4.11 "non-text contrast" because the yellow focus signifier has low contrast against the white page background. I should file a bug report with the W3C for that.
Yes, probably. #23 and #24 are two favourable comments. It's a fairly bold change, so it might need a design review. I'm not sure who to ping about that. I've added a brief note about the two approaches from #7 and #22 for now.
I think bug report titles are supposed to reflect the bug, not the solution.
Comment #27
dwwFair enough. I'm always learning when it comes to Accessibility, so thanks for clarifying.
That said, how is this "shape" going to work when the trays are in the sidebar?
Comment #28
andrewmacpherson commentedRe. #27:
There are 2 signifiers at work here. Each will distinguish the active toolbar tray clearly, but they work together synergistically.
Comment #29
dwwNeeds updated screenshots, and perhaps new tests, but here's an initial implementation of #22.
Totally different approach from previous patches, so interdiff is pointless.
Comment #30
dwwTested with Seven and Claro. Embedding screenshots in the summary.
Needs screenshots;)All working fine, except for the disruption for contrib modules that add their own toolbar trays. Those are going to need new #000000 versions of their icons, and updated CSS to point to them. Not sure what to do about that.
p.s. I'm not messing with the hover/focus styles here. I presume that's out of scope. Those are the same washed-out slightly-different gradients.
Comment #31
dwwRe: "the disruption for contrib modules that add their own toolbar trays"
What if we add a new class to the toolbar as part of this change? Not sure what to call it. Then contrib (Devel, Toolbar Responsive Search, etc) that add a toolbar tray can target that class to know which version of the icon to use.
Comment #32
dwwSomething like so? Maybe won't fly. But then e.g. toolbar_responsive_search can do this:
Then it'd work for any version of core, before or after this change. Given how much effort we put into the 'continuous upgrade path' and letting contrib releases be compatible with multiple versions of core, it seems like it'd be nice to enable this to happen more painlessly for toolbar-providing contribs.
Thoughts?
Thanks!
-Derek
Comment #33
abhijith s commentedApplied patch #32 and it works fine.But for the toolbars added by contrib modules,the toolbar icon will be hidden.


Including screenshot after applying this patch:
Screenshot when the active toolbar is from a contrib module:
Comment #34
dwwRe: #33 Thanks for testing. Indeed, contrib will be broken until they update. That's what I'm saying in #31. #32 would allow #3163252: Support both normal and inverted colors for active toolbar tray in which case you'd see the icon for contrib, too. You can try installing https://www.drupal.org/project/toolbar_responsive_search and https://www.drupal.org/files/issues/2020-08-04/3163252-2.patch if you want to see it in action.
Cheers,
-Derek
Comment #35
abhijith s commentedNow it works with toolbar icons of contrib modules.I have added some changes to #32 .



Including screenshots after applying this patch:
screenshot 2:
mobile view:
Comment #36
dwwThanks, @Abhijith S!
Interesting! Things I Learn. ;)
If that's widely supported by browsers, that would indeed be much simpler than messing with new versions of the icons, both for core and contrib.
https://caniuse.com/#feat=css-filters seems pretty decent, although (as usual) IE11 doesn't handle this. There are a lot of hits on there for "filter", I hope that's the correct one. ;)
Interdiff is nearly the whole patch, but attaching here for reference.
Curious to hear what other folks think.
Thanks,
-Derek
Comment #37
dwwConfirming that #35 works great on a site with unpatched devel and toolbar_responsive_search, although only tested with modern Chrome and FF.
Comment #38
anu.a_95 commentedPatch #35 applies cleanly and as per the design expectations in #22. Toolbars of contributed modules are also covered in the patch (including inverting their icon colors).
Comment #39
dwwNo core themes are overriding these styles:
We probably shouldn't touch stable* for this, although as a major accessibility bug, these are the sorts of issues where we've modified those themes.
Tagging for @lauriii's sign-off on:
A) Is
filter: invert(100%);legit enough CSS for core?B) Should we touch stable* or leave them unfixed?
Also, Remaining tasks has this:
Do we actually need that? We're not changing any class behavior, just making the style changes more obvious. Seems weird to test that the CSS colors the box white and the text black -- I don't think core tests need to verify CSS like this, but I could be wrong. Can any core committer confirm?
Thanks!
-Derek
Comment #40
lauriiiTagging for subsystem maintainer review to get sign off on the design change either from Toolbar subsystem maintainer or a usability topic maintainer.
Leaving the needs frontend framework manager tag to check whether this should be applied to Stable after we know the full scope of the changes.
IE 11 doesn't support the filter property https://caniuse.com/#feat=css-filters.
Comment #41
ckrinaWe've discussed this during today's UX meeting and we agreed that we're going to propose some designs for this based on the Drupal Design System as the work that needs to happen in #3070493: Introduce a mechanism to provide an alternate Claro design for the toolbar in the future. We'll take into account the options suggested here.
We'll do this next week during the Claro sprint on 25 and 26th of August, and since the Toolbar is one of the most prioritary design issues we have we expect to have a design solution for this issue by then.
Anyway, if anybody wants to keep working on this before that feel free to do so!
Comment #42
dww@lauriii re: #40: Thanks for reviewing. Indeed, at #36 I made the same observation about IE11 not supporting
filter: invert(). The question still stands: "is this legit for core?" Does core actually care if this doesn't work on IE11? If so, would the approach in #32 be better? Otherwise, do you have a suggestion on how to implement this that is committable?@ckrina re: #41: Thanks for that link! Nice to know Claro is thinking about this.
@all: No one should be confused that #41 means this issue shouldn't be fixed independently of Claro, or that this is somehow blocked on Claro's toolbar redesign. This is an existing, major accessibility bug that we can (should?) fix in core ASAP, and hopefully backport to 8.9.x. When we do, Claro's toolbar will immediately be improved in this regard, too (see screenshots in summary).
Thanks,
-Derek
Comment #43
ckrina@dww sorry, I forgot to mention on my comment specifically about the design proposed: it has some things that feels a bit off. The vertical line ends up in a middle of an odd white space and doesn't look "finished". A possible visual solutions discussed during the call was maybe adding a vertical top line, but we weren't sure how it would look like. I think this requires some explorations to find a visually working solution. As a designer, a don't feel comfortable with how the proposed solution looks like, although it's the path to follow and just needs some refinements (so thank to everybody that has worked on this!). If this issue needs to go in ASAP I won't oppose, but if we really can have a visual solution next week on the Claro design sprint (or someone else solves it sooner) I'd really appreciate if we can wait until then.
Comment #44
dwwAhhh, thanks for #43! That's very helpful. That's only a concern for horizontal tray layout, but it's still worth fixing. I agree this isn't yet ideal. Perhaps the thin grey line could work, although it kinda breaks up the inverted-T thing that @andrewmacpherson has been advocating for. But we don't have the inverted-T in the vertical tray layout, anyway, so having a light grey line in there on horizontal to keep things looking more slick seems okay.
As always, I defer to the actual accessibility experts in the room. ;)
To keep this moving, here's a trivial implementation + screenshot. It's not being smart about only adding the line for horizontal trays, but maybe this is okay.
Thoughts?
Thanks,
-Derek
Comment #45
dwwLooks okay with vertical trays, too:
Comment #47
dwwRandom Fail. :/ Re-queueing #44.
Comment #48
nod_Design change is OK with me
Comment #49
abhijith s commentedApplied patch #44. The horizontal border is working fine.



Screenshot 1:
Screenshot 2:
mobile view:
Comment #51
tanubansal commentedTested #44 on 9.1
RTBC + 1
Comment #52
mgiffordtagging
Comment #53
guilhermevp commentedPatch applies cleanly in 9.2.x, and works as intended.
Attached images as evidence, as stated in comment #49.
Comment #54
gauravvvv commentedColor contrast passed the a11y color test. Adding screenshots for reference.
RTBC+1
Comment #55
dwwThis fixes the stylelint problems that Drupal CI is now complaining about. Trivial re-ordering of the CSS properties I added in #44. No other changes, so leaving as RTBC.
Thanks,
-Derek
Comment #57
alexpottCan't the background-image be removed now - a white gradient on white is still just white - right?
This change is no fixing / changing Claro but the issue summary claims to be. Either the issue summary needs an update or Claro needs fixing.
Comment #58
dwwIndeed, good point. ;) This fixes #57. Still looks fine:
Comment #59
dwwWhoops, Claro. When I last worked on this for real, Claro wasn't overriding all those styles, so the module fix was sufficient. That's what the screenshots from #30 were showing. However, #3070493: Introduce a mechanism to provide an alternate Claro design for the toolbar in the future changed all that, and now we have to do more work to keep Claro looking right. Oh well. So here's a new patch that duplicates the work for the module styles into Claro's custom CSS world.
Comment #60
guilhermevp commentedClaro theme are now also complying with the design changes of toolbar.
Comment #62
dwwRandom fail:
Back to RTBC.
Comment #63
bnjmnmThe code has been RTBC for some time. Tagging "needs accessibility review" so the issue creator @andrewmacpherson can approve the solution.
If this is still waiting accessibility signoff on Jan 1, 2022, I can take care of it in my role as maintainer. I want @andrewmacpherson to have an opportunity to do this first since it's an issue he filed + I'd like to avoid the detail oriented wrath I'll likely incur were I to make the call right now.
Comment #64
vikashsoni commented@komalk Thanks for the patch
Applied successfully
After patch active tab in toolbar giving expected result
for ref sharing screenshots.....
Comment #65
bnjmnm@vikashsoni I'm removing credit for #64
In
Comment #67
rainbreaw commentedSigning off on "needs accessibility review" based on the solution of inverting the active tab to the opposite colors, which now makes it very clear. We reviewed this together in office hours, both Mike and Rain agreed.
Comment #68
dwwPer the accessibility office hours discussion, I opened #3270230: Toolbar focus styles are not sufficiently obvious to know where your focus is as a child follow-up issue.
Also, restoring RTBC, since the accessibility review was the only thing needed per #63.
Thanks!
-Derek
Comment #69
ckrinaI'm really sorry to remove the RTBC, but this is a design change that has an important visual impact in core's main navigation. The information received to solve the accessibility problem is really valuable, but there is a design process missing where other solutions need to be considered too. From dark to complete white is a huge visual change that might look right from a first look, but it breaks the black region the toolbar defines. Solutions like the one Gin Toolbar provides are more up-to-date with modern design navigation patterns.
So moving to Needs work to find a good design solution first.
Comment #70
saschaeggiI agree with @ckrina. To follow the correct process, this would first need design exploration to being in sync with the process. But anyway it seems this is based on the Seven toolbar and not the upcoming Claro implementation, which is due with #3020422: Toolbar style update.
I also agree this is an important topic we should look into it and improve it, but we might need to wait until
#3020422got merged. So we can either move this toPostponedor close it and create a new follow-up to the Claro implementation.Comment #71
dww@ckrina and @saschaeggi: I hear your concerns that the Claro-specific portion of this patch isn't totally perfect, or necessarily in alignment with Claro's overall design. However, I strongly disagree with the change in status, the proposal on scope/dependencies/blockers, and the idea that there are any problems with the process we've followed in this issue.
This issue is a major accessibility bug in the core Toolbar. The component is "toolbar.module", not "Claro theme". This bug exists regardless of what admin theme a site is using. The primary fix here needs to be to the CSS in core/modules/toolbar/css/*. The secondary fix is making sure that if any stable core themes override those styles, to fix those, too. The tertiary concern is fixing experimental admin themes. The issue was opened only a few months after the very first commit of Claro to core.
@ckrina was involved in earlier design iterations (see #41, #43, etc). I happily incorporated the feedback into the patch (#44). But as I wrote at the end of #42 (which is still true today, except for the backport target):
The official Toolbar maintainer, @nod_, signed off on the design at #48 and removed the "Needs subsystem maintainer review" tag. If there were fundamental problems with the design here for Toolbar itself (or Seven), those can/should have been raised 2 years ago.
Claro went its own way with #3070493: Introduce a mechanism to provide an alternate Claro design for the toolbar in the future so we had to update this patch at #59 and later to keep the Claro fixes in line with the rest of the fixes to core.
Meanwhile, the Claro team is already planning to further override the "core" Toolbar styles at #3020422. At #3020422-114: Toolbar style update I commented that the current designs over there look like they would re-introduce this accessibility bug. Claro is always welcome to adopt whatever design it wants and override core styles. So long as the Claro-specific design for the toolbar is at least as accessible as what we're doing here, huzzah. If Claro decided to undo this work and introduce a toolbar design that was less accessible in this regard, I would open a follow-up issue to #3020422, with "Claro theme" as the component, and a title something like "New Claro toolbar designs from #3020422 are an accessibility regression for weak affordance and fails WCAG color criteria from #3020422". Whether that issue would be a Claro stable-blocker would be up to the release managers. But hopefully we never get to that point, and #3020422 will take this issue into account when designing the Claro-specific toolbar styles. To help ensure that's true, I'm moving the "Needs design" tag over there, and I just tagged that issue for "Needs accessibility review" to verify whatever design y'all come up with is at least as accessible as what we're doing here.
There's no reason to continue to block this issue from being fixed while Claro sorts out their Toolbar designs. Assuming this ticket lands first 🤞, it will be trivial to revert the Claro-specific CSS changes in here as part of introducing your whole new design. I'd be happy to rebase/reroll that effort once this lands. But at least in the interim, the Toolbar will be more accessible to folks using Claro on an experimental basis.
If Claro was already marked stable, I'd agree that we'd need more Claro-specific design sign-off in this issue. But that's not yet true, so that's an invalid concern/complaint.
We definitely do *not* want the scope of #3020422 to morph into "Make a whole new Toolbar design for Claro, plus fix accessibility bugs in the module CSS, Seven, et al". That's a mess. Let's fix the underlying bug here. Claro can and will override these styles once y'all agree on your new design. But please do not stand in the way of fixing Toolbar's own CSS (and Seven) while that happens.
I don't want to get in a pushing match over the RTBC status, so I'll return this to "Needs review" and tag for both product manager and release manager sign-off. The core toolbar maintainer thinks this is ready. The accessibility team thinks this is ready. The Bug Smash Initiative thinks it's ready. IMHO, all the "Needs design" (for Claro) work should be happening in #3020422, not here.
Thanks,
-Derek
Comment #72
dwwHeh, although #3255809: Add nightwatch tests for toolbar added new tests that are now failing, causing the once green patch to now always trigger "Build Successful" failures:
So back to NW for that. 😉
Comment #73
dwwThe additional 1px border suggested in #43 and added in #44 apparently changes the expected top offset in the new
modules/toolbar/tests/src/Nightwatch/Tests/toolbarApiTest.jstest added at #3255809. I hope fixing the expectation is okay, instead of trying to add the border without it taking up any space or something. I confess to not really understanding Nightwatch yet at all (this is the first time I've ever looked at it or run the tests locally). But this is at least passing again locally. Thoughts?Thanks!
-Derek
Comment #74
lauriiiWhile this is an accessibility bug, the change does have implications to usability and design. How I interpreted #69 was that there are concerns that the white background on the proposed resolution breaks the black toolbar region in half, making it not look like a one consistent area anymore – which is a usability concern.
Based on how I understand #69, I don't think the concern has anything to do with Claro or the Drupal design system. Claro was simply brought up because some exploration was done there, and @ckrina recommended that we would take a look what was done there because that could help provide some direction. If it's not helpful, I'd assume it would be fine to completely ignore what is happening there.
I want to stress that I 100% agree this issue should be focused on fixing the major bug – any other design changes are outside of the scope here, and need to happen in #3020422: Toolbar style update. While I agree with that, I also think that we should avoid causing usability regressions while we make this change, so it is good to have a review from an expert on that area.
@dww Please note that @ckrina is also a Usability topic maintainer, which is an overarching role that gives her the right to veto issues that impact her topic, even if the issue is signed-off by a subsystem maintainer. Therefore, the "Needs design" tag should be either removed by a Usability topic maintainer or a core committer. Please refer to https://www.drupal.org/contribute/core/maintainers#responsibility-assign... for more information about the governance.
Comment #75
ckrina@dww first of all, and as I said, I'm really sorry for changing the issue state. I don't want to dismiss all the work you've all done here.
But please understand the proposed changes constitute a huge visual change and I can't sign-off on something I don't agree. And while I said the direction made sense, I always stated there was still the need for some design work. A bottom line was added after my comments that solved one of the problems, but sadly it added other ones. Ideally, a design process would have caught that without giving you all so much work. But a design proposal that aims for this bigger visual changes needs more time and we don't have many designers helping.
So: would it be possible to find a solution that solves the accessibility concerns without changing the look&feel so much?
Comment #76
dwwRe: #74: Indeed, I completely misunderstood #69 and #70 to be Claro-specific. I didn't realize @ckrina was speaking from their Usability maintainer role, I thought we were getting all confused on scope and process, and trying to impose Claro's design system on toolbar.module's CSS. Sorry to everyone for getting a little too worked up and not reading more closely.
Also, thanks to everyone who jumped in the next morning in the #admin-ui Slack meeting to discuss this topic (and loop me into that discussion). I was a little disheartened that the "Needs design" tag was going to doom this issue to another 2-3 years of not getting fixed, and was very happily surprised to see that projection also proved false before I even woke up. 😅 As my partner and I like to say to each other, "projection overruled". 😉
At #3020422-118: Toolbar style update, @saschaeggi posted this as a proposal that could address both the accessibility and UX concerns in here:
Since that's an attempt at a "quickfix" design for this bug fix, I'm posting my feedback here.
and the original proposed resolution says:
The bright blue is certainly a high enough contrast to handle 1.4.11, but it's still only a color difference. It seems like 1.4.1 would remain unsolved. @andrewmacpherson kept advocating for the "inverted T" as a shape, not just a different color than the non-active items. That's why breaking the line and messing with the design was intentional, but also why y'all don't seem to like it. 😉
I don't consider myself nearly knowledgable enough to say one way or the other. I think this would need to go back for accessibility review to be sure, ideally with Andrew involved (if possible). So, re-tagging for "Needs accessibility review", although it might be hard to do that review unless we invest the energy to implement this new design.
Otherwise, I'm happy with the above screenshot, and it does look like it would at least satisfy WCAG 1.4.11, although I'm not sure about 1.4.1. Is it worth implementing this as a patch so we can play with it for real on test sites? I'd love to get a little more sign-off that it's worth exploring as a viable solution from the Accessibility folks, first. But I'm willing to do it if it'll help move the whole process along.
Thanks,
-Derek
p.s. Since core uses "American English" spellings, I guess our commit messages should, too. 😉 s/colour/color/ in the title.
Comment #77
dwwAlso, for now, removing the "Needs product manager review" and "Needs release manager review" tags that I erroneously added in #71 when I thought we needed the Core governance system to have those folks sort out disagreements between subsystem maintainers and "sub teams" (e.g. Claro vs. Accessibility). Now that we're all on the same page on the scope, we don't need any of those folks to be "tie-breakers" for this. Hopefully in the near future, UX team, Accessibility Team and Toolbar maintainer(s) will all be in agreement on what to do.
Thanks/sorry,
-Derek
Comment #78
gauravvvv commentedComment #82
dwwWe looked at this issue again at today's #accessibility office hours, with the following folks on the call:
- Mike Gifford (@mgifford)
- Ofer Shaal (@shaal)
- Rolf Koller (@rkoller)
- Mike Herchel (@mherchel)
- Me (@dww)
Crediting everyone who participated. Unfortunately, neither @rainbreaw nor @andrewmacpherson could make it this time.
I didn't have a mockup or patch for it, but I proposed a way to maintain both color and shape to tie the active tab and active tray together: use a
border-topof ~3px of the same color blue as the active tab across the entire open subtray.At least in horizontal view, that still has an element of the T shape from @andrewmacpherson, but mostly ties in with the design mockups from @saschaeggi.
It's not as ideal with the vertical toolbar. @rkoller suggested we extend the border from the active tab back to the edge of the screen (including the same border-top on the open vertical toolbar tray). @shaal is planning to mock-up both of these and post image(s). Once we have a screenshot, hopefully @mgifford will be able to remove the "Needs accessibility review" tag based on that approach, and the UX team can remove "Needs design". Then we just have to figure out the best way to implement it (making sure RTL keeps working), get frontend review, final reviews, RTBC, and commit. 😅
Thanks!
-Derek
Comment #83
shaalHere are a few sample screenshots (draft)
Comment #84
mgiffordIf we can get this codified, I'm happy to take off Needs Accessibility Review.
Thanks @dww & @shaal
Comment #85
saschaeggiFirst of all, thanks for picking this up in the #accessibility office hours! 🙌
As it seems the examples were done with the original toolbar design in mind (for Seven), I've quickly adopted it to see how it will look like with the Claro toolbar redesign in mind.
I think the
proposed 3px linemight not be as visible as intented with the Claro's toolbar redesign (WDYT?) and we should take that into account for sure. While adapting the proposed solution I quickly came up with some new ideas and just wanted to quickly drop them here more or less uncommented 🙂Comment #86
shaalI like the inverted triangle indicator, but how can that be displayed when the menu is narrow, and the parent menu is far on the right? (like the `devel` menu example in the screenshots I posted yesterday)
Comment #87
ckrina@saschaeggi nice idea, I really like it! @shaal's point makes a lot of sense, but I still think it'd be useful to have this inverted triangle as an indicator because it would reinforce the active element. Also, I think using this instead of the 3px line plays better with the overall styles of the design system.
Comment #88
dwwOk, but the triangle only works reliably for horizontal toolbar.
If we do that for vertical toolbar, there’s nothing to associate the active tab with the open tray in some cases.
But I’m running out of steam to keep trying to make everyone happy here. 😉 I’m tired of trying to find perfect, and am more than happy to settle for good enough. If the better color contrast of blue + a shape change (that makes sense in most cases) is enough, great. It’s just very slow to iterate on this issue with monthly accessibility calls, and intermittent input for UX / design. It’d sure be great if @andrewmacpherson could weigh in, and/or we get both designers & accessibility folks on the same call or something.
I’m not at DrupalCon, so I can’t try to facilitate a face-to face among relevant parties. If anyone is able to try to get in-person agreement, that’d be amazing.
Thanks, -Derek
Comment #89
rkolleri also like the idea of the inverted triangle for the horizontal toolbar. and about @dww's point in regards of the missing association for the vertical toolbar i agree. would it make sense to perhaps combine the concept of the 3 or 4 pixel line with the triangle indicator for that case? connect the parent menu item, like in @shaals example
devel, with the vertical toolbar by the pixel line and use the triangle indicator pointing downward in that case to the vertical toolbar. that way the parent menu item and the vertical sidebar would be associated and it would be played with the presentation of the triangle between toolbar states?Comment #90
dwwRe-reading #88, apologies that any frustration is leaking out into my communications here. I also forgot to write some things I was thinking that add much-needed context:
@saschaeggi: Thanks for the quick review and creative list of alternate proposals!
@ckrina: Thanks for reviewing and giving design direction.
@shaal: Thanks for raising the concern I share on the triangle shape.
Sorry for the previous omissions and tone, and I'm excited that this issue is really moving forward! Wish I was at DC to try to get everyone together on this myself, and I hope someone else is able to do so.
Thanks again!
Comment #91
dwwp.s. Re: #89: Indeed, perhaps the blue line would be the same height as the triangle?
However, in #87 @ckrina is against the solid blue line in general design system aesthetics. So I'm not sure where we go from here.
Hopefully between DC, a possible multi-party call, Slack, or comments here, we can converge on something mutually agreeable soon. 🤞
Thanks!
Comment #93
dwwI pinged @andrewmacpherson in Slack a while ago about this. He wrote the following comments and asked me to paste them into the issue for posterity.
(I think we're all clear on that already -dww)
So, still not sure how to proceed. I'd really appreciate it if @andrewmacpherson, @ckrina and any other interested parties would be willing to directly discuss this issue so I don't have to keep trying to play "operator" and pass messages between y'all. I'd truly love to finally fix this bug, but I can't do it on my own.
Thanks!
-Derek
Comment #95
mgiffordComment #96
camilledavis commentedHow would the blue active state work with the green focus ring from the Toolbar Style Update, since the green and blue don't have sufficient contrast with each other?
I can think of two solutions...
1. Have the focus ring for the active blue button be a lighter color. But it seems confusing to have the focus ring be a different color depending on the button.
2. Go back to the active state proposed in #44 (White background, black text). Then, the same green focus state will work everywhere.
Comment #97
camilledavis commentedCross-posted from slack:
@saschaeggi: the focus ring we use in Claro has a 2px white inset/offset so it passes the contrast.
Camille Davis: Is there somewhere I can grab that css from?
@saschaeggi: https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/themes/clar...
Note:
/**
* Default focus styles for focused elements.
*
* This is applied globally to all interactive elements except Toolbar and
* Settings Tray since they have their own styles.
*/
so that’s maybe what we want to change cc @ckrina
Camille Davis: thanks! So if that was applied to the toolbar it could go two ways, not sure which is best. Inside, you could see the whole focus ring. Outside, it would match the other focus styles.
Comment #98
ckrina+1 to this change as long as this visual language pattern is limited to the existing Toolbar.
And to answer @camilledavis, I would go with the inside focus ring, but just for the Toolbar and its specific placement.
I hope this solves the accessibility concerns.
Comment #99
camilledavis commented@ckrina Should the focus ring replace the current focus state (underline, slight change in background color) entirely? Or appear in addition to it?
Comment #100
saschaeggi@camilledavis it should be additional to underline & bg color
Comment #101
camilledavis commentedWhat about the tray -- should the focus ring cover the gray border on the left and right?
And here's what it looks like with admin_toolbar module enabled... should the focus ring cover the borders on all sides here?
Comment #102
saschaeggi@camilledavis that would be nice 👍
Comment #103
camilledavis commented@saschaeggi Just opened an MR for the focus ring on 9.5.x on this issue 3270230 - Toolbar focus styles are not sufficiently obvious to know where your focus is
Comment #105
camilledavis commentedHere's an MR for the blue active tab in Claro 9.5
It currently has no visible focus state (aside from the underline). At first I tried with this css:
So that the active tab turned slightly lighter while under focus, as it did previously. However this causes it to fail WCAG AA contrast requirements for small text. So I ended up changing the style to just background: #1d7aff so the transparent overlay doesn't get applied on focus.
Looks like this:
With the focus styles from https://www.drupal.org/project/drupal/issues/3270230 it will look like this:
Comment #106
camilledavis commentedComment #107
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #108
camilledavis commentedOh hold on I think I grabbed the wrong blue color from @saschaeggi's png... now I'm trying to grab the color from https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/%F0%9F%92%A7-Drupal-... but getting a few different values
Does anyone have the exact hex/rgb code?
Edit: from @saschaeggi on slack:
Color would be --color-blue-500
Focus would be --color-green-500
Comment #109
camilledavis commentedUpdated the active background to --color-blue-500.
However I couldn't find --color-green-500 in Claro 9.5, to include it I think I'd have to add new variables to the MR.
Even if I did, the green background on focus isn't an accessible state change by itself, the button would still require the white-in-green focus ring from https://www.drupal.org/project/drupal/issues/3270230 to be accessible
Comment #111
athyamvidyasagar commentedWCAG contrast issue is fixed.
Comment #112
camilledavis commentedComment #114
smustgrave commentedLeft a comment in the MR. Hiding patches
THe issue summary doesn't say what the exact solution will be good. Has that been decided?
Unfortunately seems this issue has been spammed with screenshots, so requesting no more unless a new solution has been identified
Comment #116
kostyashupenkoChanges in last commit contained unnecessary extra line breaks, now removed.
@camilledavis you can review available scripts in package.json, we have to lint code every time before push
Restoring needs review
Comment #117
smustgrave commentedForgot to tag in #114
Comment #118
camilledavis commentedComment #119
camilledavis commented@kostyashupenko The stylelint from my package.json doesn't flag line breaks... I have 15.10.1
Also the build:css script automatically adds linebreaks so shouldn't those be kept?
Comment #120
mgiffordAdding reference to Windows High Contrast Mode.
Comment #121
camilledavis commentedAdded fallback for people not using Claro
Comment #122
mgiffordMy only concern with this change to:
background: #004eff;
background: var(--color-blue-500);
is that I'd like to know what the ratios are to the foreground color.
#004eff has lots of room with a foreground of #fff
https://www.whocanuse.com/?bg=004eff&fg=ffffff&fs=16&fw=
I need to know what the values would be for var(--color-blue-500).
Knowing this I think we can remove the Needs accessibility review tag.
Comment #123
avpadernoThat variable is set with
--color-blue-500: #004eff;(line 46 on core/themes/claro/css/base/variables.pcss.css).Comment #124
camilledavis commentedJust ran into an issue when adding this patch to a site that has Claro as the admin theme, but has a different theme set for non-admin pages.
In the patch I’ve updated 2 toolbar.theme.css file — one in Claro, using the design system variable, and one in the toolbar module, using #004eff as a fallback.
However, when Claro is only set as the admin theme, if you are logged in and visit a non-admin page, the Claro version of toolbar.theme.css still gets loaded but the variables don’t — so the module fallback doesn’t work. This is a core issue I think.
In the meantime I could try adding both to the toolbar.theme.css file in Claro:
background: #004eff;
background: var(--color-blue-500);
So that if it can't access the variable there's still a fallback.
Comment #125
dwwThanks for keeping this issue moving forward, @camilledavis!
I still wish @andrewmacphearson and @ckrina would directly discuss this issue with each other. In #93 I pasted Andrew's comments from the last time I managed to ping him in Slack about it. He was pretty clear at the time that the blue tab solution was "doubling down on colour" and not a sufficient fix for the original accessibility concern here:
https://www.w3.org/WAI/WCAG21/Understanding/use-of-color.html
#96 tried to pick up the pieces of this stalled effort and run with it. Thanks! But we've still basically only heard from the design side of this issue since then, and AFAICT, no one has confirmed if that's going to satisfy 1.4.1 which is the whole point of all the effort that we've spent trying to fix this bug. In #98 @ckrina writes "I hope this solves the accessibility concerns." but there's no explanation how the blue tab is anything other than using color alone. Yes, it's definitely higher contrast than what we have. Yes, it looks nice with the rest of the (Claro) design system. Yet it seems to be only using color to indicate what's the active tray.
I'm still pretty burned out from this whole experience, and re-reading the comment thread here isn't helping. 😅 I really do not want any of us to spend more time trying to get this fixed until the two most important voices here actually agree with a single plan. Until that happens, I fear we're wasting our lives on something that will never be solved. Once again, can the two of you please talk to each other instead of having the rest of us shuttle proposals, concerns and counter-proposals back and forth?
I'm going to take the bold step of calling this "postponed" and assigning to @andrewmacphearson to get an answer so we can proceed. @ckrina, please reach out to Andrew if you have a direct channel.
Thanks so much!
-Derek
Comment #126
ckrinaPosting this here also to show that I've answered (as all the other times this came up in Slack):
As I mentioned in the past I don’t have a strong opinion on this, specially since we’ll replace the Toolbar with the new Navigation (hopefully it’ll land 10.3.x as experimental). @saschaeggi created a lot of good designs in #87 so you could use any of those for the Toolbar since they look fine. I haven’t heard anything from Andrew in a long time and I don’t have any other tool than Slack, so I would suggest to ask other accessibility maintainers like @rainbreaw @mgifford or @bnjmnm and unblock this.
Beyond that, @dww I’m really sorry you’re burned with this but I assumed Sascha’s contributions cleared the path, that’s why I didn’t comment again (in the issue, but we've discussed this several times on Slack in the last months). We’re several Claro and Accessibility maintainers with the same authority, and any of us can decide things, like what is happening on comment #122.
The only reason I'd suggest @camilledavis to not work on this would be because Toolbar is going to be replaced (hopefully soon), not because the people working in the issue can't reach an agreement. So I'll leave to the people working here or yourself @dww to un-postpone this if you want to keep working in this.
Comment #127
dwwYeah, I’m sorry, too. I’m sorry I’ve lost my cool (at least twice) over the frustrations of trying to get this fixed through all the various roadblocks, twists and turns.
This was RTBC to fix the use of color bug years ago, and you did feel strongly that the “inverted T” solution using shape and color wasn’t ok from your design role, and you blocked this from going in at #69. Since then, we’ve tried (a lot) to get designs that you’re happy with that also address the bug. I’ve played operator many times, attended many meetings with the other accessibility maintainers, etc.
@saschaeggi provided a bunch of proposals in #85, which I dutifully got @andrewmacphearson to review, and I pasted his concerns in #93. Doesn’t seem those have been considered since the. We’re back to the original “just blue” design that he pretty strongly rejected.
Anyway, I feel strongly that this bug has been very frustrating to fix. If you now say you don’t feel strongly about it, can we go back to the design that Andrew was certain would solve the accessibly concern, reroll #73 into an MR, and merge that? then hopefully that will at least fix this bug in 10.3 for apparently toolbar’s final release before being deprecated and replaced.
Comment #129
dwwPer Slack thread (see attached transcript), @ckrina is now okay with the "Inverted T". I opened a new MR against 11.x with the code from patch #73.
Ready for re-review.
Thanks,
-Derek
Comment #130
dwwWhoops, here's the Slack discussion.
Comment #134
dwwCleaning up the summary a bit.
Comment #135
ckrinaTested and reviewed the code, so moving this to RTBC. Also removing the NFFMR tag so it can be committed. Thanks all (edit: and specially to @camilledavis and @dww for pushing this)!
Comment #138
nod_Thanks for the efforts, I know those type of issues can be frustrating so thanks for sticking with it :)
Committed 4e26ae9 and pushed to 11.x and 10.3.x. Thanks!
Comment #139
dwwYay, thanks for the speedy review and commit now that we've reached consensus! 🎉 Extremely happy to have this bug fixed at last. 🙏