Usability bug. Default focus all the way around the div separates it visually from the details element.

Current:
current

Expanded
expanded

Proposed:
proposed

Expanded
prop expand

Can be accomplished with the following CSS:

summary:focus {
border-top: 3px solid rgb(0, 116, 189);
outline: none;
color: rgb(0, 116, 189);
margin-top: -3px;

Comments

tkoleary’s picture

Title: Better focus effect on summary details » Fix focus effect on summary details
Issue summary: View changes
StatusFileSize
new13.58 KB
new35.81 KB
new62.37 KB
new41.17 KB
tkoleary’s picture

Issue summary: View changes
lewisnyman’s picture

Version: 8.0.0-beta2 » 8.0.x-dev
Status: Needs work » Active
Issue tags: -#Drupal8 #Theme +frontend, +CSS, +Usability

This is a good improvement

domosapiens’s picture

Status: Active » Needs review
StatusFileSize
new494 bytes

I created a patch of the suggested css by @tkoleary.

Note that this only works in Chrome and Safari, because the other browsers are using a polyfill. Is there extra css needed for the polyfill browsers?

lewisnyman’s picture

Status: Needs review » Needs work

I think this CSS should live in the Seven CSS files, in elements.css

domosapiens’s picture

StatusFileSize
new427 bytes

I created the patch for Seven as @Lewis suggested.

lauriii’s picture

Status: Needs work » Needs review
lauriii’s picture

Status: Needs review » Needs work
StatusFileSize
new65.75 KB

I don't get any focus effect on Firefox. Works on Chrome and Safari.

Firefox focus:

tkoleary’s picture

@lauriii c

Visually looks right to me after a quick look

skippednote’s picture

Status: Needs work » Reviewed & tested by the community

The details element hasn't been implemented in latest stable build of Firefox yet. Therefore the focus state isn't present on the summary element.
I think we should commit this for now as it will be implemented as per the W3C standards for Firefox soon enough. I've tested it in stable builds of other major browsers and it is working as expected on all except Firefox and IE.

Ref:
http://caniuse.com/#feat=details
https://bugzilla.mozilla.org/show_bug.cgi?id=591737
http://www.w3.org/html/wg/drafts/html/master/interactive-elements.html#t...

lauriii’s picture

I agree with @skippednote. Thanks for your comment and research! This isn't problem caused by this issue.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

CSS changes are unfrozen in beta. Committed 5662f41 and pushed to 8.0.x. Thanks!

  • alexpott committed 5662f41 on 8.0.x
    Issue #2368393 by tkoleary, DomoSapiens, lauriii: Fix focus effect on...

Status: Fixed » Closed (fixed)

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

Bojhan’s picture

skippednote’s picture