Validating Magento

by Emily Pepperman

(wannabe developer chick)

Reasons why should we validate?

  • As a debugging tool

  • Instill good practices

  • Cross-browser compatibility

  • Search engine optimization

  • A sign of professionalism

<ul class="header links">

	<li class="greet welcome" data-bind="scope: 'customer'">
	<span data-bind="text: new String('Welcome, %1!').replace('%1', customer().firstname)"></span>
	<span data-bind="html:''"></span>
	</li>
	
	<script type="text/x-magento-init"></script>
	
	<li class="authorization-link" data-label="or">
	<a href="https://www.divegearexpress.io/customer/account/login/">Sign In</a>
	</li>
	
	<li><a href="https://www.divegearexpress.io/customer/account/create/">
	Create an Account</a>
	</li>
	
</ul>

See anything wrong with this? (Magento 2.1 code)

Biggest excuse why (mostly CSS) code doesn't validate??

To support older browsers

With regards to our Magento sites at Dive Gear Express we only care that our site displays correctly on modern browsers, than if our site works on IE 8 and older.

We have turned off support for older security protocols and only TLS 1.2 enabled so our site is broken to older browsers anyway.

Maybe the the happy medium... ??

 

Care about whether the syntax is valid

 and whether the key:value properties are valid

 

Not caring so much about how vendor specific prefixes aren’t in the spec

Validating Magento

by Emily Pepperman

(wannabe developer chick)