XHtml validation error appears when using deprecated HTML5 attributes in RTE


Description

XHtml validation errors might occur after editing a Rich Text Editor (RTE) field, for example:

The 'summary' attribute is not declared.
The 'name' attribute is not declared.

The issue occurs if the field contains an attribute that was deprecated in HTML5. Such attributes may be added when inserting an anchor using the Hyperlink Manager or defining Summary in the Accessibility tab of the Table Wizard.

KB1002914.png

KB1002914 (1).png

Solution

To prevent the errors, make changes to the [your website]\sitecore\shell\Schemas\Sitecore xhtml5.xsd file and add the following xml node to configure the name attribute declaration for the <a> tag.

<xs:attributeGroup name="aAttributeGroup">



<xs:attribute name="type" type="mimeType"/>

<xs:attribute name="name" type="xs:string"/>

</xs:attributeGroup>