This issue was split off from #2018871: Make summary and details collapsed by default to separate the styling changes from the default behavior (collapse details by default).

Examples

Admin/content on load (current):

Image 8

admin/content on load (proposed):

image 9

Misplaced focus:

Image 5

admin/configuration/site_information (current):

image 3

admin/configuration/site_information (in conjunction with proposed #2018871: Make summary and details collapsed by default ):

imag 2

Changes to system.theme.css

Remove the border because it is unnecessary. The presence of the down arrow affordance tells the user "there is more here". Margin is added since the padding that inset the text from the border is removed.

details {
- border: 1px solid #ccc;
margin: 1em 0;
}

Padding that inset the text from the border is no longer needed. Setting outline to none removes the browser focus effect on summary since it's not a form element that requires focus.

summary {
cursor: pointer;
+ padding: 0.2em 1em .2em 0; */ltr/*
+ outline: none;
}

Remaining tasks

Needs an accessibility review to decide what happens for keyboard users regarding outline, focus etc. See comment #15 and #16.

Comments

tkoleary’s picture

Issue summary: View changes

added images

tkoleary’s picture

Issue summary: View changes

edited

lewisnyman’s picture

Component: system.module » Seven theme
Issue tags: +CSS, +Novice, +CSS novice, +d8mux-css-cleanup

It makes sense to move this styling from system to the Seven theme. We shouldn't be adding this kind of default styling to all Drupal themes.

aedwards88’s picture

Status: Needs work » Active
StatusFileSize
new522 bytes

I agree LewisNyman this change should be in the seven theme.
I have created a patch, and attached. Attachment seems to not have added I added the style change in my comment below.

aedwards88’s picture

Status: Active » Needs review

I have adjusted the Seven theme to match the look and feel according to the proposed screenshot
Here is lines 626 - 638 of the /core/themes/seven/style.css file.

details {
  line-height: 1.295em;
  margin: 1em 0;
  border:none;
}
details summary {
  padding: 0.2em 1em .2em 0;
  outline: none;
}
details > .details-wrapper {
    padding: 0.5em 1.5em;
    border: 1px solid #ccc;
}

Assigned: Unassigned » aedwards88
Status: Active » Needs work

The last submitted patch, 2048369#comment-7679907.patch, failed testing.

aedwards88’s picture

details {
  line-height: 1.295em;
  margin: 1em 0;
  border:none;
}
details summary {
  padding: 0.2em 1em .2em 0;
  outline: none;
}
details > .details-wrapper {
    padding: 0.5em 1.5em;
    border: 1px solid #ccc;
}
lewisnyman’s picture

Status: Needs review » Needs work

I don't think you can include hashes in the patch file name? Seems to be breaking testbot

aedwards88’s picture

Status: Needs work » Needs review
StatusFileSize
new522 bytes

Thank you Lewis, I have re-attached the patch.

lewisnyman’s picture

Here are a selection of after screenshots. I have to say, the uneven vertical/horizontal padding looks a bit weird.

Screen Shot 2013-07-31 at 09.15.11.png

Screen Shot 2013-07-31 at 09.15.25.png

Screen Shot 2013-07-31 at 09.17.48.png

Screen Shot 2013-07-31 at 09.17.48.png

Screen Shot 2013-07-31 at 09.19.39.png

Screen Shot 2013-07-31 at 09.19.54.png

tkoleary’s picture

@LewisNyman

I have to say, the uneven vertical/horizontal padding looks a bit weird.

I think you're right but I suspect that this is more of a global issue with vertical rhythm.

tkoleary’s picture

Issue summary: View changes

ed

lewisnyman’s picture

7: 2048369-comment-7679907.patch queued for re-testing.

panda85’s picture

Assigned: Unassigned » panda85
Issue summary: View changes
Issue tags: +SprintWeekend2014
panda85’s picture

Patch tested and working in IE9, IE10, Firefox, Chrome.
Patch should be applied to lines starting from 567 and not from 625

@@ -567,10 +567,16 @@ table.system-status-report tr.error {
..

panda85’s picture

Status: Needs review » Closed (works as designed)
rootwork’s picture

Assigned: panda85 » Unassigned
Status: Closed (works as designed) » Reviewed & tested by the community

Unless I'm misunderstanding something, this isn't ready to be closed, it's RTBC.

nod_’s picture

what about keyboard users? should we really remove the outline?

rootwork’s picture

We could do an outline on focus (which includes tab by keyboard). Reference.

catch’s picture

Status: Reviewed & tested by the community » Needs review

Looks like this needs more review.

emma.maria’s picture

Issue tags: +frontend
emma.maria’s picture

Issue summary: View changes
Issue tags: +Needs accessibility review
tomreavley’s picture

Assigned: Unassigned » tomreavley
tomreavley’s picture

Assigned: tomreavley » Unassigned
Bojhan’s picture

Title: Clean up display of summary and details » Remove border from details/fieldset
Issue tags: -CSS novice, -d8mux-css-cleanup, -SprintWeekend2014 +Usability

I really like patches that tweak the visual design of Seven. However I am not sure about this patch, it wasn't tagged Usability so I never spotted it :(. I am happy to see that this patch didn't include collapsing all detail fields, that really needs more discussion as some details should really be open. Retitling this to what this issue is now just about.

There are various arguments, why we actually have a border and not just a collapse icon + label:

1) What we found in previous usability tests (Garland), is that people didn't notice just the dropdown + label and a line. With Seven we found that people still had difficulty (some of Mark Boulton his earlier designs were like this). We decided with Mark and the usability testing at the time to make the fieldset more noticeable, by adding a border.
2) So far we have not found any issues through usability testing that shows this design does not work. People are able to use it just fine.
3) From any usability testing we have done so far, we have never seen the behaviour expressed in the OP that the user focuses in on the label instead of the functionality below.
4) It is visually slightly harder to "group" functionality when you have the label hanging outside of the encapsulation. Having the label inside the encapsulation makes it visually easier to "group" things together.
5) It shows that there is a larger click area, especially on mobile this is important.
6) I am not sure how well this works when you have collapsed and open details below each other.

Accessibility wise we should be fine, because there is still a focus/hover state provided by the browser default. I am not sure if the history I just wrote is known. But this design seems to brush over the whole history of optimizing this design, a design that has proven to work very well. Given all of this, I am not very keen on changing this and tempted to mark this won't fix.

lewisnyman’s picture

@Bojhan This seems to be the opposite direction we are heading in #2278565: Clean up module page grouping?

Bojhan’s picture

@Lewis It is a very different page, we are using fieldsets to capture tables not forms. And also we do still have a line there.

lewisnyman’s picture

I'm really not down with the idea of having fieldsets look different on specific pages. We need to move away from that kind of thinking.

Is there a one design component that can accommodate all collapsible fieldsets or do we need to define a minimal variant of the component?

rootwork’s picture

I'm persuaded by Bojhan that this could have a negative impact on usability and doesn't demonstrate that it has a positive impact on it.

I also agree that we should have a fieldset design component that's consistent. But it does seem like the module page would be a legitimate variant -- because the children of the fieldset (modules) have a background color they naturally group together. These fieldsets (in the issue summary) don't have background colors, so when expanded I think it makes sense that they have a border.

When collapsed, it seems like both styles could have a single consistent appearance, which given what Bojhan related would include a border.

nod_’s picture

I sidestepped the issue with the module page, let's ignore it. See related issue.

I'm with Bojhan. won't fix?

Bojhan’s picture

@Lewis I don't see how the module page design is relevant here at all. Its a completely one-off design, where we doing a super weird thing by nesting tables in a details. Which is something you shouldn't be doing in the first place. Ideally we figure out how to fix the module page without using details.

mgifford’s picture

Status: Needs review » Closed (won't fix)
Issue tags: -Needs accessibility review

This is generally a bad idea for accessibility:
border:none; outline: none;

I really don't understand what problem this change solves. It would be nice to see an explaination.

For now though I'm going to set it as Won't fix.

tkoleary’s picture

THe problem that it solves is reducing excess noise in the UI and making it more "open" and easier to read. Design studies show that when a page has fewer extraneous elements (lines, boxes, shapes) and generous space between elements, it is easier to scan.

See Luke Wroblewski's deck on form design here: http://static.lukew.com/webforms_lukew.pdf. There are sections on both reducing noise in forms and on best practices for conditional/hidden sections of forms.

tkoleary’s picture

Status: Closed (won't fix) » Active

@mgifford

If you feel that this is an accessibility issue can you provide some evidence? Reopening.

mgifford’s picture

Always good to call for some external evidence. Essentially here are two of the best sources:

http://www.outlinenone.com/
http://webaim.org/blog/plague-of-outline-0/

Best evidence though is ti simply try navigating the page without your mouse.

I don't have any evidence about border:none; and not sure if there is any research on it. It might have some advantage for readability for some users. I'm really not that concerned about this piece of it.

Interesting PDF. Lots in in it. I think the relevant section is probably down on page 44, but correct me if I'm wrong.

tkoleary’s picture

@Mgifford from the article you linked:

If you must remove it, provide alternative styling

There's no real reason to remove the outline, but if your life depends on it there are a number of alternative methods to style links that are in focus, use your TAB key to see the test link anchors in action:

Give it a background colour - Test background colour change
Change the text colour (don't forget to make it high contrast for colour blind people!) - Test text colour change
Provide a custom outline - Test text outline change
Go high visibility - Test high visibility

Any one of these could be better if executed well

mgifford’s picture

Absolutely.. If properly considered, there are lots of ways to replace outline: none; without sacrificing accessibility. Unfortunately in many cases (including in D8) it's been removed without considering keyboard only users. Thanks for pointing that out @tkoleary.

So, want to re-roll 2048369-comment-7679907.patch with some better alternatives?

lewisnyman’s picture

Ok, we need an issue summary update on the correct direction.

Bojhan’s picture

Status: Active » Closed (won't fix)

I feel like adequate reasoning was provided, why this is a bad idea in #22.

The work cited, provides little clues why its bad - our fieldsets are not ornamentation. We use fieldsets to bring order to the page, that cannot be brought by whitespace without sacrificing a major part of our efficiency and overall design. We try to only use fieldsets when they are truly needed (I removed some 100 or so in Drupal 7).