Many errors were found, so I returned to the official Esri JS samples to ensure I was using valid code. Surprisingly, I found that many of the samples also failed the validators.
Examples of errors include:
Error: Attribute label not allowed on element button at this point. <button id="dropdownButton" iconClass="bingIcon" label="Base" data-dojo-type="dijit.form.DropDownButton">
from the Basemap sample.
Is it a problem that the official Esri samples fail the validators? Is this related to the use of DOJO, and therefore not an actual problem?