Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
markup
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
16 Jun 2011 at 09:52 UTC
Updated:
29 Jul 2014 at 19:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
cosmicdreams commentedas shows here: http://api.drupal.org/api/drupal/modules--user--user-profile-category.tp...
Really the only change in question is the ..
...tag could be more sematically assigned. Would the use of a ...
... tag be good here?
Comment #2
Jeff Burnz commentedI was thinking along the lines of:
$classeswould be added in preprocess via a$classes_array, possibly something likedrupal_html_class($variables['title]);so that each section is more themable.Comment #3
stijnbe commentedCreated a patch. But what will happen with the profile module as it is already deprecated from drupal 7.
Comment #4
Jeff Burnz commented"what will happen with the profile module as it is already deprecated from drupal 7" - we can cross that bridge when we come to it, we just work with what we have got for now.
This looks great to me. Do you think we should name-space the title classes? I'm thinking we probably should to avoid potential CSS inheritance issues, maybe :
Or maybe something shorter, although I have no problem with long class names.
Comment #5
jessebeach commentedJeff, I added the name-spacing prefix you mentioned in #4.
Also, the section tag starts a new outline context, so the first h tag in it should be an h1. I changed this in the patch.
Comment #6
Everett Zufelt commented@jessebeach
I think we should keep the heading level where it was. In a beautiful world of kittens and unicorns we will be able to trust UAs to handle headings for us in this way, however, we are not there yet.
For backwards compatibility we should keep the current heading level.
Comment #7
Jeff Burnz commentedGood question actually and I am glad you asked it, because its forcing me to rethink things a bit. I'm not up with the play on what is going to happen with profiles (anyone know?), because if user-profile-category template becomes a sort of "fields wrapper" like it used to be (and sort of still is, but does not play with fields module afaict) then the H1 heading makes most sense.
Comment #8
jessebeach commentedEverett, what do you see as the value of using a section element if we ignore its content-sectioning behavior? Please don't take this as snide. I'm really curious. Do we get benefits from using the element to section the page without also incorporating the behavior of heading level sectioning? We're going to run into this situation a lot as we change over to elements that have semantic value from the easy-breezy, debateless div tags of HTML4.
Comment #9
Everett Zufelt commentedI'm not familiar enough with the sectioning / heading algorithm to say for sure. From an accessibility standpoint some sectioning elements (nav) for instance may be mapped to landmark roles, or exposed by assistive technology in other useful ways. From a themeing perspective they provide more hooks for styles.
I am of the opinion that html5 is great (I'm on the HTML WG), and that we should implement it in Core, but it is definitely immature and not supported very well in UAs, including assistive tech.
Comment #10
jessebeach commentedThanks Everett, that's the kind of insight I was hoping to get. I'm not very familiar with assistive UA's.
Comment #11
Jeff Burnz commentedWe can use H2, the page title is the user name and is h1, so each category could be an h2.
Comment #12
Everett Zufelt commented@Jeff
Sounds good. I was only suggesting h3 as it is what I believe is there now and I didn't test.
Comment #13
jacineI agree we should use
<h2>.One thing that's missing from this patch is that it doesn't take into account the CSS that exists for it in user.css. The
.profile h3and.profilecode should go at a minimum. We can create a separate issue to remove the rest (I think all of it should go, personally) if you guys don't want to do it here, but this is the chunk I'm referring to:Comment #14
Jeff Burnz commented+1 to removing all of it, core should not be doing this because its not critical to the UI working, its pure design, need to check that .profile {clear: both;}.
Comment #15
jessebeach commentedI kept the bare minimum CSS in their so it doesn't look terrible. Maybe I've been drinking the Kool-aid. I'm totally ok with ripping it all out. I think if we're going to do that, we need to make a firm decision that we're going to do it across the board from this point on in this HTML5-ification effort.
Comment #16
jacineWhat should happen is that default styling for definition lists should be added to the core themes. Core should not be styling anything like this.
We've got an initiative page for this, and we do need to discuss what to do with it. Should it be part of the format HTML5 initiative. I know I made it clear to Dries that this is something I will be working on in D8, but I'm not sure where to draw the line on what's officially part of this initiative or not. I don't know. You know?
Comment #17
Jeff Burnz commentedKind a makes sense to clean up the CSS while we're doing the HTML5 changes doesnt it? We need to review the CSS anyway, remove element selectors etc. We can go a long way towards cleaning it up if we apply this all the way through. If we rip stuff out then all we need to do is always check for regressions in the core themes and file issues against those themes with Frontend tag attached + cross linked to original issue. I have no problem with this.
Comment #18
jacineYeah, I think so too. I just don't want to overstep any boundaries, because it's a little blurry when it comes to this stuff. I've heard the same thing from other people to, so I'm going to create a post about this on g.d.o this week.
I'm not so sure about ripping out the code and then waiting on followups later. I don't want to leave anything in a broken state for people. We should probably just fix what's directly affected in this out and rip out the CSS in a separate follow-up issue under the initiative.
Comment #19
jessebeach commentedI agree. This patch doesn't leave anything broken.
If we're going to clean up CSS (i.e. rip it out), we'll need to do that outside of tangential issues.
And you're right Jacine, this is something we'll need to discuss with a wider audience before doing it....although I'd love to ask for forgiveness rather than permission in this case.
Comment #20
jacineYeah, we need buy in and for it to be public knowledge for this to scale, and not get overwritten at every turn. I'll start working on a post for this.
As far as this patch goes, technically the only thing that should happen here is:
.profile h3to.profile h2..profile h3. If so change it accordingly.That's the general process that all of these template files conversions will need to follow. After that, we can do follow up issues that address things like removing excess code, making sure CSS is in the right file, that selectors are way less specific and not bloated to support IE6, which we don't have to worry about anymore. I'mreally excited about that stuff.
I'll create an issue for the CSS cleanup part, and link it back here. :)
Comment #21
jessebeach commentedOk, I'll reroll it.
Comment #22
jessebeach commentedRe-rolled to:
1. Change .profile h3 to .profile h2.
I checked all core modules and found no .profile h3 selectors.
Comment #23
jacineThanks Jesse! You rock :D
This looks good to me, but I'll wait for some more reviews.
Comment #24
jacineTagging. Hopefully we can get some more reviews here and get this done by next week.
Comment #25
Jeff Burnz commentedThis is perfect:
1. Each category is now a proper section - this semantically good. Profile itself is likely to be an article, so section will fit in well with the overall markup of the profile.
2. Each section has a class to make it easier to theme.
3. The new heading level is correct.
RTBC.
Comment #26
jacineThis is still RTBC, just tagging to keep track of it, while we wait.
Comment #27
xjmTagging issues not yet using summary template.
Comment #28
dries commentedCommitted to 8.x. Woot, woot! :)
Comment #29
jacineYay! The first HTML5 Initiative patch has landed! Thanks :D
Comment #30
Jeff Burnz commentedHooray!
Comment #32
cosmicdreams commentedDoes this patch provide good guidance on the kind of changes we want to make to the remainder of templates?
Comment #33
jacineCleaning up tags/component.