Updated: Comment #77

Problem/Motivation

In Bartik theme links are styled by applying a color, but no other distinguation like underlining, bold, or similar to differentiate the link text from normal text. This makes identifying links in text difficult to impossible for visually challenged users and it is not compliant with WCAG 2.0. On the opposite applying underlining permanently to every link gives the theme a not so simple and clean look as it was intended for Bartik.

Proposed resolution

- Don't disable underlining on links by default (just show them, as does the browser by default)
- Disable links on places where it is obvious (like in menu's, pagers). Clickable headers on teasers are expected to be links as well, it is suggested to not underline those as well.

Remaining tasks

Further review needed of patch in comment #76.
Reference link needed to the other bug issue mentioned in Comment #77

User interface changes

Underlinings in hover and focus states on links which are not obvious links like menu links, tabs, etc.

API changes

None

To be defined

Original report by @BarisW

Currently, Bartik uses

underline: none for its links. For color-blind users, this is unusable. They don't see any difference between links and the content. For lists (tabs, menu's) this is okay, but for inline links in the content, it's not. 

Link should always be indicated other than with color alone. This could be done by making it bold or larger, or just by using the default <em>underline</em>.

For more on this, I found a good read: <a href="http://meta.wikimedia.org/wiki/Link_style_vote">http://meta.wikimedia.org/wiki/Link_style_vote</a>.

My suggestion would be to keep the links as is (without underline), but add back some links for specific elements that needs it (like links in the node content, or in the metadata. See the patch and screenshots. 

Some other elements may be added as well.
CommentFileSizeAuthor
#123 Screen Shot 2014-01-09 at 10.31.51 AM.png107.55 KBmgifford
#122 890362-116-underline-links-bartik-122.patch941 bytesJeff Burnz
#121 WholePage-NewLinks.png126.52 KBmgifford
#121 890362-116-underline-links-bartik-121.patch1.78 KBmgifford
#118 links-screenshot.png52.71 KBBarisW
#117 links-bartik.mov_.zip875.17 KBBarisW
#117 890362-116-underline-links-bartik.patch3.08 KBBarisW
#107 Selection_003.png15 KBmgifford
#106 interdiff-104-106.txt1.95 KBBarisW
#106 890362-106-underline-links-bartik.patch1.62 KBBarisW
#104 890362-104-underline-links-bartik.patch954 bytesmgifford
#76 before.png83.63 KBBarisW
#76 after.png84.07 KBBarisW
#76 search-after.png69.08 KBBarisW
#76 890362-76-underline-links-bartik.patch745 bytesBarisW
#67 Screen Shot 2013-09-24 at 17.01.43.png33.53 KBBarisW
#62 Screen Shot 2013-06-27 at 8.37.14 PM.png103.26 KBmgifford
#56 bartik.png81.75 KBBarisW
#56 890362-56-underline-links-bartik.patch469 bytesBarisW
#55 890362-55-underline-links.patch384 bytesBarisW
#54 messages.png27 KBBarisW
#54 descriptions.png26.74 KBBarisW
#54 admin.png46.3 KBBarisW
#54 890362-53-underline-links.patch375 bytesBarisW
#42 bartik_all_links_activated.png59.89 KBBarisW
#37 890362-bartik-underline-links.patch514 bytesBarisW
#20 node-full.png57.71 KBBarisW
#19 node-teaser.png40.19 KBBarisW
#19 node-teaser.png40.19 KBBarisW
#19 no-color.png56.49 KBBarisW
#17 bartik-underline-links-890362.patch610 bytesJeff Burnz
bartik_underline_links.patch620 bytesBarisW
bartik_underlines_after.png68.64 KBBarisW
bartik_underlines_before.png65.98 KBBarisW
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jeff Burnz’s picture

Status: Needs review » Needs work

Setting to needs work because there can be other than just nodes in region-content, thinking this should be set on .region-content rather than node.

Jeff Burnz’s picture

BarisW’s picture

Title: Links should be indicated by color only » Links should not be indicated by color only

Changing the title. Obviously.

Bojhan’s picture

Ehh don't we do this in Garland too? Color blind isnt just about the underline, its about ratio's ect t and I am sure work was done on that field.

BarisW’s picture

Can you clarify its about ratio's ect t? What do you mean?
Do you agree that we should not only use color? Or do you see it differently?

I'm not sure if W3C demands it for Accessibilty guidelines, but the Dutch Webrichtlijnen do.
Which is a must for all Dutch governmental sites.

See: http://www.webrichtlijnen.nl/handleiding/ontwikkeling/productie/links-na... (in Dutch)

Bojhan’s picture

Category: bug » feature

Checked with Garland, we didn't do it there either. Since the accessibility people never rigorously complained about this one I am going to mark it a feature request. The ratio in terms of contrast. Either way, Bartik was reviewed for accessibility and approved - this is a big visual change very late in the gate? I would say, no.

Fail to see how this is a standard we must meet, millions of sites who are also big on accessibility don't implement this. Including the dutch government :)

Everett Zufelt’s picture

Category: feature » bug

@Bojhan

I don't think this is a feature request. It is either a valid or invalid bug report. If Garland has this same issue it is potentially a bug there too.

Can someone explain to me the stylistic differences between the links and plain text?

Jeff Burnz’s picture

Stylistically they differ only in color.

From a strictly accessibility perspective, yes this is a bug. From a design perspective this could be a bug also - because in these recolor-able themes its entirely possible to change the color of text and links - so they could be the same, or have insufficient color difference to be discernible even for people withe normal vision. Clearly there is some responsibility born by the site builder to not do this. That said, someone with a color vision impairment might change the colors so the vast majority cannot tell the difference - possible? I am not sure.

I realize this is a very contentious issue, however pushed to make a call on this, yes I think this is a bug.

One final note is, that I have been aware of this issue for a long time, like many others no doubt, and I am guilty of letting it slip under the radar. Sometimes when you just posted 10 other issues, written 8 patches, reviewed 6 others and so on you forget to tackle the most obvious things.

BarisW’s picture

Another good read on this: http://webaim.org/blog/wcag-2-0-and-link-colors/

WCAG 2.0 requires (at Level A) that color not be used as the sole method of conveying content or distinguishing visual elements.

We COULD do without the links and using a pretty heavy contrast ratio, but as the author of the above article states, you don't have much color combinations left to met these contrast ratio requirements.

I'd don't see it as a huge loss - see the screenshots, what a big difference is it?
I think that using underlines to define links is a win for every user, not only visually impaired people.

@bojhan: see the Dutch Web Guidelines (english text): http://www.webrichtlijnen.nl/english/manual/development/production/link-...

Link presentation can be distinguished from the surrounding text by means of colour and form. It is possible that colour blind visitors will not be able to make out this colour (see also Use of colour). That’s why it is important that links are not distinguished by colour alone. For example, use a bold type and the colour red, or underlining and the colour blue.

Web users usually interpret underlined text as indicating links. It is a good idea for web developers to make use of this strong signal. Underlining non-link text is strongly discouraged.

aspilicious’s picture

drupal.org is using colors too for links...
So drupal.org and redesign.drupal.org are all using buggy themes?

Everett Zufelt’s picture

Agree with the WebAIM article mentioned by @BarisW in #9

@aspilicious

There are a number of significant accessibility issues with Drupal.org and Redesign.drupal.org

Jeff Burnz’s picture

Actually, look closer - d.o uses color + bold, the redesign I can't remember.

aspilicious’s picture

redesign uses underline while hovering. I like that more than permanent underlining.

Everett Zufelt’s picture

@aspilicious

Only using underlining of links on hover:active:focus * may * add to the visual appeal of a page, but it detracts from the overall usability, particularly for users who find it difficult to perceive the links without the underline, or other significant style difference from standard text.

Making links bold (without underline) may improve perceivability for some users. But I recall when I had low vision, not being able to always clearly distinguish bold font from standard font, and attempting to do so would cause strain.

Jeff Burnz’s picture

Please note that this is a bug and therefor every attempt should be made to fix it - its a clear failure of WCAG 2.0 level A - http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/F73#F73-examples

Everett Zufelt’s picture

Priority: Normal » Minor

Setting priority to Major (although I'd argue that any WCAG 2.0 priority A violation is critical).

Jeff Burnz’s picture

Priority: Major » Normal
FileSize
610 bytes

This only affects links in #block-system-main by adding underlines by default.

This is very simple but needs someone to go through and dig out if there are more instances where we want to remove underlines - I have taken them away from node teaser headings because they are not really needed (compromise) since we have the read more link that is underlined.

Jeff Burnz’s picture

Priority: Minor » Major
Status: Needs work » Needs review

Set to major, cross posted with Everett.

BarisW’s picture

Priority: Normal » Major
FileSize
56.49 KB
40.19 KB
40.19 KB

That may be even a better approach. It looks like you've nailed most of the important links. See the screenshots for the results of Jeff's patch.

To clarify: links that are already obvious (where users expects a link) doesn't need styling. So things like menu items, page titles and tabs are okay to be left untouched. Which you already did.

I think the username for comments (.comments .submitted a) could be left untouched as well.

By the way: a nice way of testing what to style: add a small piece of code on the footer of color.css:

a{
  color: #333 !important;
}

This removes all color of the links. Then try to navigate ;)

BarisW’s picture

FileSize
57.71 KB

Ah, uploaded one image twice. Here's the other.

Bojhan’s picture

I do not get how, it was never an issue before and now suddenly is? Anyway, goodluck making Bartik look like http://www.webrichtlijnen.nl if that is what we want. Don't see how almost every single big site, even ones big on accessibility violate this rule, consider me not convinced.

Anyway I am totally not digging the process of making large visual changes, with 1. no visual designer present, 2. always binary decisions on accessibility, 3. always after the fact (after the design been made) - we seriously need to reconsider our process here, because otherwise you will leave all visual designers very frustrated.

Everett Zufelt’s picture

@!bojhan

It is not that this issue wasn't a problem and now suddenly is. It is that we noticed the problem now.

What are you not convinced of, that users with low vision will have difficulty using themes where links do not have a strong enough visual affordance? This would seem to be a rather arbitrary dismissal of the WCAG 2.0 guidelines. I would ask if you have a stronger rationale than simply not liking the idea?

Bojhan’s picture

Look, I get that some users might have trouble - my point being, that your process is incredibly frustrating.I find it hard to believe that so many sites that are big on accessibility would break this rule, consider me sold when you explain to me why they don't and we should break this rule? Par example, http://www.bbc.co.uk ?

I don't feel its an arbitrary dismissal at all, after all I don't have a guideline helping me on argumentation why a certain change will make Drupal less beautiful making it an incredible harder thing to argument, but nonetheless equally important. Saying that my argument is about simply not liking it, implies just that misunderstanding of my arguments in the larger sense. This will create a big usability issue, because underlines create a big visual distraction if placed close to each other, as you can see in some of the screenshots - drawing unnecessary attention in the case of dozens of links on a page. Underlines might have been the only affordance in 2001 for indicating a link, most users now do not see it as the only affordance.

Anyway I think its a key design aspect of the Bartik, that we don't have underlines, it was a conscious design decision - I will leave it up to jensimmons to comment, if she thinks its fine - lets move it in.

webchick’s picture

Category: bug » feature
Priority: Major » Normal

This isn't going to fly, IMO. We're *well* past UX freeze (hopefully within a few weeks of actual release), and this very dramatically changes the look and feel of our default core theme months after it's gone in.

There are multiple alternative themes in contrib that do use underlines on links if someone with low vision needs them, as well as the "Skip to navigation" link that can get low-vision users to the themes page to enable them.

webchick’s picture

Version: 7.x-dev » 8.x-dev
Everett Zufelt’s picture

Category: feature » bug

@WebChick

I can agree that this won't be fixed in D7, but it needs to be called a bug, or we need to redefine Core theme requirements to permit that links be non conforming to WCAG 2.0. Either way I can live with, but let's have a policy and then conform to it.

Everett Zufelt’s picture

For D7 can we at least add underline to links on :hover :active and :focus? At least this way if a user thinks a segment of text might be a link they can hover or focus on the link and have a stronger visual affordance revealed.

Jeff Burnz’s picture

Version: 8.x-dev » 7.x-dev
Priority: Normal » Major

I'll try to catch up with Jen today at DC and raise this with her - Bojhan is right that we need her input, however this is bug and like I said earlier, a highly contentious one. In my experience Jen has been incredibly supportive of the accessibility requirements and changes we have already made to Bartik - and certainly a Leval A failure is going to need a solution - so lets work for that and not argue about process or timing.

< begin rant > We have been vested with the goal of WCAG 2.0 compliance for D7 - or as close to it as possible. This is not easy in a project that is in constant development, where at every turn either a developer or a designer is crying foul of the recommendations or requirements, where critical issues are blocked based on opinion, where the same old same old arguments are raised as proof this or that standard can be ignored - for example that "this site" is not doing this so why should we - do you not realize how often that tired old line is dragged out in defense of poor accessibility. Let me say this once and hear it - other sites poor accessibility is not a mandate for us to do the same! We either lead or follow - I prefer to lead.

Now, can we please get back on topic! This is not the place to be discussing process or protocols. That is another issue entirely and one we will certainly be addressing in due course. < end rant >

Jeff Burnz’s picture

Version: 7.x-dev » 8.x-dev
Priority: Major » Normal

cross post

webchick’s picture

#27 is a possibility, if it passes design review. That seems like it would allow for accessibility without dramatically affecting the design.

And Everett, would you like to take the lead in establishing a policy, both for core and contrib modules as part of the #D7AX movement? That sounds like it would be valuable.

Everett Zufelt’s picture

@WebChick

I would say that the option in #27 does not solve the accessibility issue, but it is a better solution than the current style.

As for a policy, I would say that absolute compliance with WCAG 2.0 priority A and absolute compliance with priority AA unless technically impossible or impractical (performance, etc.).

Bojhan’s picture

@Jeff On your rant, I think this is a highly debatable issue - hence my question why we should oblige to this standard. Anyways lets have that discussion elsewhere indeed.

I would say :hover and :focus et al, we can lets get a patch up that does that.

mertskeli’s picture

Drupal is not a final product. It is not a website. It is a tool to create websites, with any desirable styling.
I doubt it is a D7/D8/D9/... material. It has nothing to do with Bartik or bugs.
Anyway, one can always try to make a stand-alone "accessibility" theme, which could be included as one of the core/contrib themes. Though we already have such a theme - Stark, with all the default w3c behavior.

BarisW’s picture

Anyway, goodluck making Bartik look like http://www.webrichtlijnen.nl if that is what we want.

You should know that it's a common misunderstanding that accessible sites are ugly. The new webrichtlijnen.nl website (http://www.webrichtlijnen.nl/blog/, currently being build in Drupal by me) isn't ugly at all.

Oh, and by the way.. bbc.co.uk is using more than color for it's links, see (http://www.bbc.co.uk/news/world-south-asia-11060119). Links are blue AND bold.

Bojhan’s picture

@BarisW The new site isn't :) you are right, the current one is. I knew you wanted to pitch that though :P. Your argument on the BBC site is true, then again I doubt you assume that I missed that, its the inconsistency in them applying that I am referring to.

So yhea, lets get a patch up please! For #27

BarisW’s picture

Done! Changed

a:link,
a:visited {
  text-decoration: none;
}

into

a:link,
a:visited {
  text-decoration: none;
}
a:hover,
a:active,
a:focus{
  text-decoration: underline;
}
BarisW’s picture

Version: 8.x-dev » 7.x-dev

And for now, I'm changing it back to 7.x-dev. We'll have to make a new issue regarding the default underlining.

@bojhan: Aight :) Thanks for your opinion!

Bojhan’s picture

Can we get screenshots?

BarisW’s picture

Nothing to see, as it is only visible on mouse-overs.

But this patch underlines all links (even the H1 page title, menu items and tabs). But it looks pretty good, I don't mind those items to be underlines on hover or focus. I'd kinda expect them to.

Bojhan’s picture

You can totally screenshot mouseover links :)

BarisW’s picture

I've made a screenshot with all links underlined.

To clarify for others: normally you won't see this screenshot; just one link underlined if you hover a link.

Everett Zufelt’s picture

Do we need a separate issue for Garland to provide some consistency?

BarisW’s picture

Garland is already applying links on :hovers and such.
It should also change it default state on a later date, so yeah: let's file an issue!

Btw: same goes for Seven, but that's less needed as the amount of admins are much lower than the visitors of a site.

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

I am gonna mark this RTBC, jensimmons could probably come in later if I am totally wrong :)

Jeff Burnz’s picture

Its good, think Jen should have a look to see what she says about the issue before this is committed.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

BarisW’s picture

We still have to fix this good in D8. Their should be a distinct way to determine if a string is a link or plain text.
By default, we should make the links bold or underlined, not only one hovers.

Should we reopen this issue and change it to 8.x-dev or should we create a new issue?

Bojhan’s picture

Version: 7.x-dev » 8.x-dev
Status: Fixed » Active
Jeff Burnz’s picture

Status: Active » Fixed

Its a difficult issue because the Bartik design does not "work" with the visual distraction of underlines (or bold for that matter). Bartik is meant to be a very clean, simple design and such changes certainly distract from that goal - in fact it does look rather ugly and to accommodate such a change really entails a redesign - sorry but I'm not really sure I can back that, nor do I really want to suddenly change the design now we have shipped (in such drastic ways).

I'm not sure we'll ever reach a compromise that's acceptable to everyone. We reached something of a compromise and I think that's about all we're going to get on this issue.

BarisW’s picture

Status: Fixed » Closed (works as designed)

In that case, it should not be 'Fixed' but 'Works as designed'. Right?

BarisW’s picture

Status: Closed (works as designed) » Active

Let's reconsider this. When shipping D8, we can surely change some design stuff as well, right?
See for some more info this post on netmag: http://t.co/zljtm2H1IB

I'll post a patch.

mgifford’s picture

Issue tags: +Accessibility

Yes, the @webaxe arguments definitely make sense to me as I read them earlier this week (original article) http://www.webaxe.org/keep-the-underline-text-links/

I wonder if it's possible to do something now with the hover & focus elements?

Jeff, would a color background or dotted/dashed line be easier to incorporate?

I don't know if it has to be a traditional link.

BarisW’s picture

Title: Links should not be indicated by color only » Links in admin theme should not be indicated by color only
Component: Bartik theme » Seven theme
Status: Active » Needs review
FileSize
375 bytes
46.3 KB
26.74 KB
27 KB

Now that feature freeze is near, it's time to get this issue fixed. Here's a patch to fix Seven, I will now start working on Bartik.

Some screenshots:

messages.png

descriptions.png

admin.png

By the way; please read Mike's link: Keep the Underline.

BarisW’s picture

Small change; instead of taking out all links in an unordered list, I'm now only removing the underlines in the admin list (/admin page).

BarisW’s picture

Title: Links in admin theme should not be indicated by color only » Links should not be indicated by color only
Component: Seven theme » CSS
FileSize
469 bytes
81.75 KB

And here's the patch for Bartik. I'm moving it to CSS as this issue touches multiple themes at once.

Bojhan’s picture

This is not subject to feature freeze.

Actually can we control the height between the text and the underline?

BarisW’s picture

We surely can, by not using text-decoration, but border-bottom. We could even make it dotted :)

mgifford’s picture

mgifford’s picture

There are a few ways to do it:

http://alistapart.com/article/customunderlines
http://stackoverflow.com/questions/1734618/css-underline-possible-to-inc...

@Bojhan let us know what you'd like. We can even play with something on http://jsfiddle.net/ to get the right mix if that helps.

Bojhan’s picture

Animated underlines, hah.

I think this works, we just need to find styling that blends well, sadly I am not in a position to do this atm. Perhaps others can try some different approaches (e.g. more vertical padding, different colors, etc.).

mgifford’s picture

Ok, here's an initial crack at this. There are definitely faster ways to do this, but why not bring in thousands of lines of CSS to be there in case we wanted to test different Drupal-like situations.

Please fork:
http://jsfiddle.net/mgifford/pwj2q/

Screen Shot of underline options.

mgifford’s picture

mgifford’s picture

Status: Needs review » Needs work

The last submitted patch, 890362-56-underline-links-bartik.patch, failed testing.

mgifford’s picture

Status: Needs work » Needs review
Issue tags: +Accessibility, +Needs accessibility review
BarisW’s picture

Can we commit this and when needed, tweak it later?

Here's a new screenshot for the responsive view.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs accessibility review

I'm going to mark this RTBC. This is a big accessibility/usability win.

There are more options for look/feel than proposed in #62, even more in #1993574: Add focus styling to all interactive elements but this is pretty modest so probably the right place to start.

Bojhan’s picture

Status: Reviewed & tested by the community » Needs work

Meh, there is no tweak it later.

Why are we doing this so inconsistently - I see a whole group of elements this isn't applied to. I see no big usability win.

BarisW’s picture

Point is that this is not so much a usability issue but an accessibility issue, hence the tag.
If you could provide me with a better option that uses underlined links, I'm more than ready to turn that into a patch.

BarisW’s picture

Status: Needs work » Needs review
Bojhan’s picture

No, but atleast we should be doing something for the other elements that we are only using color on too.

BarisW’s picture

I agree, however this might look a bit too-much if we apply it every where. I would suggest to add underlines everywhere EXCEPT for headings and menu's, because users can expect those to be links.

The main issue is links in the content, for which is really sns't clear what part of the text can be clicked on if you cannot distinct on color.

Shall we meet tomorrow and discuss this a bit more? I'd love to have this issue RTBC on the codesprint this Friday.

Bojhan’s picture

Yup, lets discuss! I understand your point now, its a bit hard to track this issue.

patrickd’s picture

tagging

BarisW’s picture

After discussing this with Bojhan we suggest to go for an accessible solution that doesn't make the interface unpretty. As an example I took http://www.data.gov/. You can see that (and there are many examples of sites with the same solution) they chose to underline all links, except in specific cases where user's expect links to work, like in menu's.

So for Bartik, I'm proposing the following solution:

- Don't disable underlining on links by default (just show them, as does the browser by default)
- Disable links on places where it is obvious (like in menu's, pagers). Clickable headers on teasers are expected to be links as well, so I'd suggest we don't underline those as well.

By choosing to underline links by default and only mark the exceptions, we are sure that it works on custom content blocks in sidebars, search results and other pieces of content.

Without the patch:

before.png

With the patch:

after.png

The search results after applying the patch:

search-after.png

BarisW’s picture

Please note: the links in the menu on the left (Tools) should be removed too, but this would be solved with another bug. Currently the menu misses the <nav> wrapper. When that is in, these underlines will be gone too.

meichr’s picture

Added an issue summary.

Bojhan’s picture

This looks good :) I'd consider this RTBC, it does raise the criticality of the other issue somewhat, because when we push this in the sidebar kinda looks ugly.

BarisW’s picture

I agree, when #1912516: Markup for menus is in, all menus will get a <nav> wrapper and my patch above styles all links within a <nav> element non-underlined.

cr0ss’s picture

The question that appears first - aren't the "My Account" and "Logout" not links? (at the very top).

bserem’s picture

yes they are, and I believe they should also be patched

BarisW’s picture

I tried to find a balance between accessibility and design. The main issue is that people who are colorblind cannot distinguish links in the text when they differ with color alone.

What I believe - and correct me if I'm wrong - is that people expect those links on top to be links (and they are) so it wouldn't be really needed to underline them as well. Adding underlines everywhere makes the design less appealing / more ugly.

Therefore I have deliberately not underlined them.

dcmouyard’s picture

This is a big step for accessibility. Woo Hoo!

The patch in #76 looks good, but it's only for the Bartik theme. What about Seven?

BarisW’s picture

Good point. Shall we get this one committed first and then focus on Seven?

Bojhan’s picture

Yes.

dcmouyard’s picture

Assigned: BarisW » Unassigned
Status: Needs review » Reviewed & tested by the community

The patch in #76 is RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Needs review

https://drupal.org/files/after_117.png

Hm. Really? Why are some links underlined (the ones in the sidebar and body) but not others (the ones in the header). This creates a really inconsistent experience.

Bojhan’s picture

https://drupal.org/node/890362#comment-7909999

@webchick From my understanding is this universally applied. See the W3C.org website, when links are obviously links (like menu items) they don't have an underline. When this isn't clear it is underlined. We have things underlined in the block, because of a element that isn't in core yet.

webchick’s picture

Status: Needs review » Needs work

Hm. If W3C.org is the bar, their site is a complete mess of inconsistency regarding what's underlined and not.

Though after staring at it for 10 minutes, I guess the overall pattern is "if it's in content, underline it, if it's a heading or navigation element, don't."

That would make the patch more-or-less correct, except that the links in the "Tools" menu (and probably all other menus) should not be underlined.

webchick’s picture

I'm curious also if the accessibility issue here for colour-blind people could be resolved by picking a different colour of blue that didn't have contrast issues with the black, rather than causing visual dissonance all over the place for 100% of people.

Bojhan’s picture

@webchick As stated in #89 and #80, the links in menu are underlined because of a bug.

I don't think we can choose a color that would be distinguishable enough, as far as I know are black and white on far ends of the spectrum. Getting far enough from either to pass WCAG 2.0 sounds rather impossible (remember we don't just have to be far from the black text, also the white background), especially if we want it to still look nice (this color is connected to much more than just the links).

webchick’s picture

Status: Needs work » Needs review

I think you meant #77, but yes, I see that now. So does that mean this would look weird until #1912516: Markup for menus is done? Or is there a smaller, more targeted issue to just add nav wrappers on menu blocks?

Ha, #80, not #90. I can read. :)

webchick’s picture

So my initial inclination is to postpone this issue until #1912516: Markup for menus is done, so that the solution that is proposed here is what ends up actually getting done. I'm sensitive to the fact though that this will not be perceived as very nice, given this issue got postponed to D8 during the D7 cycle due to how late it was proposed. OTOH, we are not currently in any danger of freezing markup until we hit RC, afaik, and we are 150-some issues away from that atm.

What say you?

Bojhan’s picture

@webchick Yhea, my thought was that we are still far from UI freeze so we can get the menu issue in - it is true that this is dependant on that getting in. Whatever you feel is the right strategy, I thought the right way to just raise the priority of that issue.

I still think its kinda ugly, hah. I am not so sure about applying this to the Seven theme, where it will look more out of context. It's sad we can't move to Source Sans typeface, that's much better with underlines.

Also, a small note - when writing this I notice that even d.o doesn't comply to this standard and probably won't.

dcmouyard’s picture

@webchick Even if we changed the color contrast of links significantly, this would still be an accessibility problem because we need more than one design element to differentiate links, not just color. That's why color AND underline works so well. We can take away the underline, but then we need another design element that conveys the information "this is obviously a link."

The placement of links can convey this information, which is why links in menus and teaser headings don't need underlines.

dcmouyard’s picture

Issue summary: View changes

Issue summary and comment #78 written by meichr.

Manjit.Singh’s picture

Status: Needs review » Needs work

The last submitted patch, 76: 890362-76-underline-links-bartik.patch, failed testing.

BarisW’s picture

Status: Needs work » Needs review
mgifford’s picture

I ran across the Knowability site recently and liked how they displayed link underlines. Much more subtle just using bottom border.

.bodyLink:link, .bodyLink:visited {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    border-bottom: 1px solid #C6D6E4;
    color: #205988;
    padding: 0.2em 0.2em 0;
    text-decoration: none;
}

Adding related issue too.

BarisW’s picture

Assigned: Unassigned » BarisW

Thanks for the link! I really like how it looks.
I'll work on a new patch using this example.

Bojhan’s picture

Oh, nice!

Shyamala’s picture

Status: Needs review » Needs work

Changing status to needs work.

mgifford’s picture

Re-roll with new underline styling.

Jeff Burnz’s picture

  1. +++ b/core/themes/bartik/css/style.css
    @@ -9,17 +9,38 @@ body {
    +h2 > a:visited,
    

    Do we need the child selector here? Seems odd.

  2. +++ b/core/themes/bartik/css/style.css
    @@ -9,17 +9,38 @@ body {
    +  background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
    

    none is sufficient.

  3. +++ b/core/themes/bartik/css/style.css
    @@ -9,17 +9,38 @@ body {
    +  border-bottom: 1px solid #C6D6E4;
    

    Lowercase?

BarisW’s picture

Status: Needs work » Needs review
FileSize
1.62 KB
1.95 KB

Attached is a more generic solution with the comments in #105 applied.

mgifford’s picture

FileSize
15 KB

Uploading screenshot with 3 links and one with focus. image with enhanced focus

The last submitted patch, 106: 890362-106-underline-links-bartik.patch, failed testing.

Bojhan’s picture

The patch fails, once its green I will tinker with it a bit I am not 100% pleased with the vertical spacing.

mgifford’s picture

mgifford’s picture

I don't see how this would be releated to the css changes:
Undefined index: base Notice color.module 485 _color_rewrite_stylesheet()

Jeff Burnz’s picture

+++ b/core/themes/bartik/css/style.css
@@ -12,15 +12,21 @@ body {
+  border-bottom: 1px solid #c6d6e4;

Colors should be in colors.css (for color module re-writing), I haven't looked at the test but it might be seeing that this one does not change?

Jeff Burnz’s picture

I applied the patch and its too generic, breaks quite a bit of stuff like toolbar, contextual links, user pictures, the "About text formats" link and probably others so most likely needs to shift back to being pretty targeted.

I opened #2149783: Toolbar CSS styles are too weak; common theme styles unintentionally distort it on the basis of the patch #107 also, toolbar should not break this easily.

I get that the border bottom is pushed down by the padding required by the hover/focus style, I question if we need the hover/focus styles that loud, especially with the text shadow they kind of pop, I would personally prefer something more flat, or even just an outline type hover/focus (and change of color for the text and border). Then we could shift the border a bit closer. Just my two cents on the actual style, please don't take this the wrong way but the styles are a bit old school for me.

Bojhan’s picture

Yhea, I am not a big fan of the hover styles either - we should just go with highlighting the border. That is 1) a11y compliant, because it can be a significant enough change, 2) not jarring because it doesn't change the whole visual look.

The last submitted patch, 106: 890362-106-underline-links-bartik.patch, failed testing.

mgifford’s picture

It would probably make sense to keep the focus/hover discussion on #1993574: Add focus styling to all interactive elements

I like it myself, but it's a pretty big change and would need buy-in on the UX side.

BarisW’s picture

FileSize
3.08 KB
875.17 KB

I must say that I have to agree with Bojhan. The background is a bit too much, and it introduces a lot of new issues.
Here's a new patch that simply uses the border-bottom with a light blue color.

Also, I don't get which colors should be in colors.css and which not, as there are a LOT of colors already defined in style.css.

I've attached a screen recording to demo the hovers.

BarisW’s picture

FileSize
52.71 KB

Also, here's a screenshot.
Screenshot of the new links styling in Bartik

Jeff Burnz’s picture

Also, I don't get which colors should be in colors.css and which not, as there are a LOT of colors already defined in style.css.

Because the border color needs to "shift" when the user changes the color scheme. E.g. change to the Plum color scheme and #427bab shifts to #A06D6D.

Anything defined in style.css is grey or white or some rgba version of black or white etc, all pretty much neutral. There should be no colors that need to be under control of color module in that file.

Personally I would much prefer if the border simply inherited the link color, rather than adding another color to the default state of links - you are making this very nearly into a tritone theme which is hell to get right in color module unless you explicitly declare color settings for it and lock it down (don't use shift) and I would be against adding a setting just for link borders.

Something like this would be very easy, simple and looks pretty good (and shouldn't even need to touch colors.css):

a {
  color: #0071b3;
  border-bottom: 1px solid inherit;
}
a:hover,
a:focus {
  color: #018fe2;
  border-color: inherit;
}
a:active {
  color: #23aeff;
  border-color: inherit;
}

Apologies for the incremental comments and general bitching.

The last submitted patch, 117: 890362-116-underline-links-bartik.patch, failed testing.

mgifford’s picture

Ok, I've given this another shot...

I went and also border-bottom: none; into border-bottom: 0; as it wasn't consistent, but I figure that should go in another issue anyways.

I wish that one could just do something like border-color: rgba(inherit, inherit, inherit, 0.5); as I think that would be the best (if the color was defined in RGB.. I don't think that's possible.

I believe the reason for introducing a border color previously though was to produce something that was diminished or less intensive than a single border. I applied what you had suggested Jeff and it seemed just too heavy. I couldn't inherit the border-color mind you as that was black. Believe it isn't defined in the color.css file.

Although ideally there would be underlines under all of the links, the biggest area of priority is in the main content areas, so I figured I'd focus there. The header/footer folks assume is going to be largely links and styled differently. It is the main body of the page where there is the most confusion about what is and is not a link generally.

So I went back to the dotted lines. However, on hover/focus they go back to normal underlines. This gives what I see as a nice additional visual change.

In anycase, there are no changes to the color.css with this patch.

Jeff Burnz’s picture

Not a bad idea Mike, that has become a quite common design pattern.

Note wee can't use rgba because color module does not (as yet) support rgb. By setting no color on the border declaration the border color is inherited from the link color.

Not sure I see the design benefit in using border for one state and text-decoration for the others, how about using border for both?

I rejigged this a bit to apply the style globally and then selectively remove borders, I know this can be a slight pita but we can avoid using an ID which ramps up specificity a helluvalot, can't say I like using an ID (if we are to constrain these border styles to main-wraper only), since Bartik is trying to be more of a base theme and using an ID is bad karma for those wishing to modify it.

I've "removed" the styles from the site banner, node header titles, some headings, feed icon and field type image links, but let them flow into the footer stuff and of course other regions. This is generally contrary to CSS standards for core, but it's also not much code and easy to extend for sub-themers etc.

I've also been nice to toolbar and contextual links and removed them there also, even those both those modules need isolate their styles themselves.

By using !important and not explicitly declaring :link and :visited pseudo styles we save quite a few lines of code.

mgifford’s picture

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

I'm marking this RTBC. This seems like a good compromise. It only applies to Bartik at the moment, but think we should open up discussions about Seven in a new issue.

alexpott’s picture

So in #94 @webchick suggested postponing this on #1912516: Markup for menus - is that no longer necessary?

mgifford’s picture

Status: Reviewed & tested by the community » Postponed

True enough. That was a long time ago and I'd forgotten. Marking it postponed.

It's worth nothing that the last comment was on November 17, 2013 at 4:55am and nobody is assigned to address this issue.

My assumption at the time that @webchick wrote that in October that it was at a time when it looked like we were closer to a resolution.

BarisW’s picture

Assigned: BarisW » Unassigned

A lot of the menu rewrite is already been done in this issue: #1898478: menu.inc - Convert theme_ functions to Twig. Let's get that in, so we can move this one ahead as well.

dcmouyard’s picture

Probably too late to incorporate into this issue, but here’s a new technique for adding underlines: https://medium.com/p/7c03a9274f9

mgifford’s picture

Status: Postponed » Needs review

I couldn't see much to pull from the Medium article. At least until it goes live.

I tried to play with some of the ideas expressed in it and put it here http://jsfiddle.net/mgifford/DrPBn/

Essentially on of the takeaways is to use either background images or CSS gradients

a {
    text-decoration: none;
    /* The old syntax, deprecated, but still needed, prefixed, for WebKit-based and old browsers */
    background: -prefix-linear-gradient(top, white 98%, rgba(0, 0, 255, 0.9));
    /* The new syntax needed by standard-compliant browsers (Opera 12.1, IE 10, Fx 16 onwards), without prefix */
    background: linear-gradient(to bottom, white 98%, rgba(0, 0, 255, 0.9));
}
a:hover, a:focus {
    /* The old syntax, deprecated, but still needed, prefixed, for WebKit-based and old browsers */
    background: -prefix-linear-gradient(top, white, white 80%, rgba(0, 0, 255, 0.4));
    /* The new syntax needed by standard-compliant browsers (Opera 12.1, IE 10, Fx 16 onwards), without prefix */
    background: linear-gradient(to bottom, white, white 80%, rgba(0, 0, 255, 0.4));
}

As far as @webchick's concerns with #94. Although still valid. Can't we simply exclude the menus and focus just on the text in the main section of the site?

Sumit kumar’s picture

mgifford’s picture

Component: CSS » Bartik theme

I was going to mark #122 as RTBC again, as I don't think menus are getting getting completed. Then figured that because this patch applies to Bartik we should have it reviewed there first.

Jeff Burnz’s picture

#128, yes I agree, in content links are not menu links, they're different things altogether and require different solutions. Forge ahead, the menu markup issue might not complete for several months in any case.

Re the gradient idea - not really liking that idea very much, seems very bespoke, i.e. need to adjust the background-position if you change the font size, i.e. too complicated and not intuitive for marginal differences, just a bad TX imo. Can it.

mgifford’s picture

So do we just need @Bojhan's approval before #122 can be marked RTBC? He marked it RTBC back in August of 2010, so maybe not....

Bojhan’s picture

This visual approach has my RTBC.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

Thanks Bojhan.

I'll mark this RTBC then as the CSS is pretty simple.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • Commit 1b76c01 on 8.x by catch:
    Issue #890362 by BarisW, Jeff Burnz, mgifford: Links should not be...
Jeff Burnz’s picture

Hooray!!! A personal thanks to everyone who persisted through this four year long issue, well done people. D7 anyone?

Status: Fixed » Closed (fixed)

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

LewisNyman’s picture

Status: Closed (fixed) » Needs work

Hey, I noticed that dropbutton elements now look a bit weird in Bartik, a lot of them tend to use anchor elements, so they appear with borders at the bottom.

LewisNyman’s picture

Breadcrumbs also look a bit weird, I don't seem any prior mentioned of breadcrumbs in this issue?

Jeff Burnz’s picture

Well, a drop button issue could be an issue for dropbutton.css, critical form navigation elements shouldn't really be disturbed by a theme wanting to set an underline/border etc on anchors, but still not be onerous in terms of resetting every possible declaration or using highly specific selectors. Setting plausible declarations however I think is a different story and this may be a case for doing so, i.e. border: 0; in drop button.css

I think you're talking about the kind of buttons used in views, e.g. /admin/structure/views which is an admin page, not a front end page, but Bartik is a front end theme, so there's also some issue there - I always went with the concept of an "MVP" when Bartik is set as Admin theme. i.e. it may not look ideal but its not broken to the extent you cannot use it.

Breadcrumbs don't look weird to me - browser issue?

One place I have seen something I didn't notice before and I'm not entirely happy with is the tips link.

I suppose we could fix the tips link (if deemed necessary, personally I am not happy with it), and the breadcrumb issue (pending screenshot etc), but the drop button one feels like a followup (to figure out if this a theme issue or a core issue, i.e. should we let it break and force themes to fix and repair, or not) requiring some discussion. We may have a precedence on this already because of Toolbar CSS needing similar reinforcement (isolation, there is an issue open on this already) because doing things like this is not sustainable:

.field-type-image a, h1 a, h2 a, [role*="banner"] a, .feed-icon, .contextual-links a, .toolbar a {
    border-bottom: medium none !important;
}
mgifford’s picture

Jeff Burnz’s picture

I created one for filter tips link: #2271327: Tips link border bottom not looking great

Jeff Burnz’s picture

Status: Needs work » Active

Add for drop buttons: #2271341: Drop button anchors easily broken by common theme styles

Can we agree to close this issue again and deal with stuff in followups? Setting to active for now.

mgifford’s picture

That works for me.

LewisNyman’s picture

Status: Active » Closed (fixed)

Sounds good, let's keep moving forward.