Opening a meta issues to start tracking our HTML5 conversion of Bartik. I would propose Bartik follow core's implementation as much as is practical. Once all the core templates etc are converted it should be a simple task of moving forward with the Bartik conversion.

Comments

Jeff Burnz’s picture

Issue tags: +html5, +Bartik HTML5

Tagging.

theborg’s picture

Subscribe.

robloach’s picture

Status: Active » Postponed

Should probably wait off on some of the Drupal templates which are still being converted (like #1077602: Convert node.tpl.php to HTML5). Also, extra bonus points if we could get rid of some of the tpl.php files entirely in place for some fancy CSS3. The less code, the better.

webchick’s picture

Question. Was this issue fixed as a result of #1192044: Convert Bartik's layout to mobile-first and responsive ?

Jeff Burnz’s picture

Assigned: Jeff Burnz » Unassigned

Nope.

mjohnq3’s picture

Status: Postponed » Needs review
StatusFileSize
new6.34 KB

This patch does not include the maintenance-page.tpl.php as that issue is still not resolved: #1189822: Convert maintenance-page.html.twig to HTML5.

Status: Needs review » Needs work

The last submitted patch, bartik-html5-1179764-6.patch, failed testing.

mjohnq3’s picture

Status: Needs work » Needs review
StatusFileSize
new5.88 KB

Re-rolled patch.

Status: Needs review » Needs work

The last submitted patch, bartik-html5-1179764-8.patch, failed testing.

mjohnq3’s picture

Status: Needs work » Needs review
StatusFileSize
new5.05 KB

Re-rolled patch against latest pull.

Status: Needs review » Needs work

The last submitted patch, bartik-html5-aria-1179764-10.patch, failed testing.

mjohnq3’s picture

Status: Needs work » Needs review
StatusFileSize
new776 bytes

Ok, one template at a time. comment-wrapper.tpl.php is trivial.

Status: Needs review » Needs work

The last submitted patch, comment-wrapper-1179764-12.patch, failed testing.

mjohnq3’s picture

Huh? What does this have to do with changing <div> to <section>?

mbrett5062’s picture

Status: Needs work » Needs review

Retest, error has nothing to do with change AFAICT.

mbrett5062’s picture

#12: comment-wrapper-1179764-12.patch queued for re-testing.

mjohnq3’s picture

StatusFileSize
new859 bytes

Ok, let's try comment.tpl.php.

Status: Needs review » Needs work
Issue tags: -html5, -Bartik HTML5

The last submitted patch, comment-1179764-17.patch, failed testing.

mjohnq3’s picture

Status: Needs work » Needs review

#17: comment-1179764-17.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +html5, +Bartik HTML5

The last submitted patch, comment-1179764-17.patch, failed testing.

mbrett5062’s picture

You will need to change the tests. They are still looking for 'comments' in DIV tags.

I.E.

  function _testBasicCommentRdfaMarkup($comment, $account = array()) {
    $comment_container = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]');

You have changed to ARTICLE tag.

mgifford’s picture

Ok, this is a pretty important change, but it is going to take someone to invest quite a lot of time in going through all of the *.php files & adjusting all of the affected tests.

It's amazing that even the little comment.tpl.php had 26 failed tests in it. #10 had 49,226 pass(es), 38 fail(s), and 20 exception(s) the last time it was tested.

This does need to get into D8, just not sure who if anyone is assigned to do it. Also might be worth reviewing with #1802566: Add ARIA landmarks for Bartik theme as they should go hand-in-hand.

mbrett5062’s picture

I also believe the "attribution" should be in a <header> element, whilst the "signature" & "links" should be in a <footer> element. But that is just my personal preference, so ignore me if you think otherwise.

mgifford’s picture

I've got no problem with those suggestions. I'd like to see someone update the patch to deal with the broken simpletests though.

mbrett5062’s picture

Assigned: Unassigned » mbrett5062

OK I would like to take this on. Will incorporate my suggestion from #23 if no one has any objections. Not sure of the order things need to be done in, will this wait till #1802566: Add ARIA landmarks for Bartik theme gets in, or should I make those changes also here. Would that not then make either one of these a duplicate, seems silly having 2 issues on the same code.

mbrett5062’s picture

Status: Needs work » Needs review
StatusFileSize
new24.78 KB

OK here goes, have updated HTML and fixed comment preview test. The previously failing RDFa tests seem to be fixed now, by the new tests not checking HTML tag's directly. Lets see what the bot thinks.

By the way, it looks like i changed a lot more then I did, only because I changed the indentation. I prefer the open rather then compact indentation, as it makes the template more readable for novices.

Status: Needs review » Needs work

The last submitted patch, drupal-convert_bartik_to_html5-1179764-26.patch, failed testing.

mbrett5062’s picture

Status: Needs work » Needs review
StatusFileSize
new29.96 KB

So have now added test fixes, and also added the new ARIA roles required for such things as 'nav' and 'article'. We may need to close the other issue #1802566: Add ARIA landmarks for Bartik theme as duplicate now.

Status: Needs review » Needs work

The last submitted patch, drupal-convert_bartik_to_html5-1179764-28.patch, failed testing.

mbrett5062’s picture

Status: Needs work » Needs review
StatusFileSize
new28.91 KB

OK that was a little over zealous, here is revised patch, reverting translation test changes and also reverting action-links to non 'nav' element.

Still expect some translation tests to fail, but fewer of them. Can not see what I have done to make them fail even running tests locally, may need some guidance.

Status: Needs review » Needs work

The last submitted patch, drupal-convert_bartik_to_html5-1179764-30.patch, failed testing.

mbrett5062’s picture

Assigned: mbrett5062 » Unassigned

That's the best I can do for now, no idea why the remaining 3 tests are failing. Have tried everything I can think of, if anyone has a clue, note it here, and I will fix it if possible.

mgifford’s picture

Issue tags: +Needs tests

Tagging & will call out for more help on this one.

tim.plunkett’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new1.78 KB
new30.71 KB

I did not review the patch at all, just rerolled and fix the test.

This included #1802566: Add ARIA landmarks for Bartik theme, which was not a good idea :) But now that's in, so who cares.

Also, for future reference, that's not what the "Needs tests" tag is for.

tim.plunkett’s picture

The changes

+++ b/core/themes/bartik/templates/page.tpl.phpundefined
@@ -87,163 +87,178 @@
-    <div id="messages"><div class="section clearfix">
...
+      <div id="messages">
+        <div class="section clearfix">

Changes like this make this impossible to review :( Is there any chance the indentation and line splitting could be kept separate from the actual changes for this issue?

mgifford’s picture

Thanks for the revised patch & recommendations.

I didn't review the indentation/line splitting, but will look for it in the future.

What is the tag for "Desperately needs help with SimpleTest"? I had thought I'd heard "Needs tests" referenced on Drupal Ladder and thought I'd understood it's proper use..

We can work with the tests you've provided (if needed).

mbrett5062’s picture

Assigned: Unassigned » mbrett5062

@tim.plunkett thanks very much for your review/test help. Of course it is obvious now about the test. Thanks again. And your comment about the indentation changes has been noted, I do see the reasoning. I made those changes precisely because I could not get my head around the markup to make the HTML5 changes.
Will raise a new issue to correct the indentation, and for now revert this issue back to old indentation for easier review. Also noted about #1802566: Add ARIA landmarks for Bartik theme, a little over zealous there.
Thanks again for your help, I will get the hang of this one day, and stop trying to do everything in one patch.

See #1903048: Revise Bartik template indentation inline with best practices.

mbrett5062’s picture

Status: Needs review » Needs work

oopps lets change the status for now. Will post revised patch ASAP.

mbrett5062’s picture

Status: Needs work » Needs review
StatusFileSize
new17.64 KB

OK here is the revised patch, by the way, @tim.plunkett the changes to fix translation errors are no longer needed as they were fixed already in head. Hopefully this should now be green and easier to review.
I will work on the follow up issue when this is in.

tim.plunkett’s picture

StatusFileSize
new17.64 KB
new478 bytes

Ah yes, #1595028: Convert tests using Standard profile to use Testing profile instead cleaned that up nicely!
Thank you so much for reducing the size of the patch.

I only have one tweak, I think this is good to go now!

mbrett5062’s picture

Thank for that, silly mistake on my part. OK hopefully this can get in soon, and I will do the follow up. I am hoping to spur on the 'twig' efforts as well.

mbrett5062’s picture

Assigned: mbrett5062 » Unassigned

Unassigning myself to attract reviews.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new163.12 KB

I think this is good to go. Thanks @tim & @mbrett5062!

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

dcrocks’s picture

I noticed the use of the new html5 semantic element 'main'. I haven't found very much discussion of that element except that it seems to be targeted for html5.1. And I can't find anything about browser support. The element seems to be just ignored.

Jeff Burnz’s picture

<main> is pretty bleeding edge right now, its plausible it will be included (in the spec) but not really something I think we can use at this stage. If we are doing the display:block thing we could add it there. Pretty sure the latest shiv supports main.

dcrocks’s picture

It is being used in this patch. That's why I commented. But it doesn't seem to have any affect. It seems it is only decorative.

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