Follow-up to #2983568: Audit and improve focus styles across the Umami theme for logged out users. This was deferred so that it wouldn't hold up all the other awesome wins in the main issue.

Problem

When a multi-line card title link has focus, the outline looks messy in Firefox. There are overlapping boxes interfere with reading the text:
Firefox screenshot.

Compare with the appearance in Chrome. One box outline around all rows makes it easier to read.
Chrome screenshot.

Proposed resolution

Make this neater and consisent between browsers.
Idea: .view-mode-card .field--name-title { display: inline-block; }

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

Title: Overlapping box focus outlines in Firefox make text difficult to read » [PP-1] Overlapping box focus outlines in Firefox make text difficult to read
Issue summary: View changes
Status: Active » Postponed

It's probably best to leave this issue until after we have committed #2983568: Audit and improve focus styles across the Umami theme for logged out users. I've marked this postponed, and I'll set it back to active when at the right time.

andrewmacpherson’s picture

Status: Postponed » Active
andrewmacpherson’s picture

Title: [PP-1] Overlapping box focus outlines in Firefox make text difficult to read » Overlapping box focus outlines in Firefox make text difficult to read
Assigned: Unassigned » berdir
andrewmacpherson’s picture

Assigned: berdir » Unassigned

Sorry, clumsy fingers on a greasy phone.

pawandubey’s picture

@andrewmacpherson

I just verified this issue and its replicated at my end too. I have suggestion on this issue is that instead of using .view-mode-card .field--name-title { display: inline-block; } which can fix the issue of focus but have impact on the line-height of the text and for that we need to add line-height:2.1rem; to match the same but still I am able to find little bit 1px of difference from the top of the content area due to change in the <span> tag style to display: inline-block;.

Its more better to apply this style to parent element <a> and it can fix the focus issue and no impact on line-height of any element.

CSS Code:

.view-mode-card .node__link {
	display: inline-block;
}

Let me know your thought on this, so I can raise the patch accordingly.

andrewmacpherson’s picture

@pawandubey - thanks for trying out different ways to make this work better. Would you like to provide a patch so we can try it out?

A 1px difference might be something we can live with :-)

pawandubey’s picture

StatusFileSize
new520 bytes

@andrewmacpherson

Please review and test the attached patch file and let me know your feedback on this.

pawandubey’s picture

Status: Active » Needs review
shaal’s picture

Patch #9 works great,
but through #3034751: Remove link from node title in Card display mode to improve accessibility - the title will become just text without a link, which makes this patch obselete.

(what's the way to close an issue while giving people who participated in it a credit?)

pawandubey’s picture

@shaal

Thanks for bringing this into our attention.

I have verified your patch on #3034751: Remove link from node title in Card display mode and can confirm that this issue#3016658 not require any further.

andrewmacpherson’s picture

what's the way to close an issue while giving people who participated in it a credit?

If it's closed as a duplicate, we often credit them on the other issue (i.e. the one we decided to make canonical).
You can add a comment to the main issue. Something like "closed issue X as a duplicate issue of this one. Please credit fred who had good ideas there."

Then it's up to the committers. Give them a useful summary to make it easy.

If it's closed as outdated, I don't think we have a good way to handle credits.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

pawandubey’s picture

I think we can close this issue as its not replicating anymore.

pawandubey’s picture

Status: Needs review » Closed (cannot reproduce)