Hi
I am currently trying to evaluate the component, as my application generates HTML, which I would like to be able to check for WCAG compliance. However I have not been able to get some negative validationresults.
This is my testcode.
– code –
using Aspose.Html.Accessibility;
using ValidationResult = Aspose.Html.Accessibility.Results.ValidationResult;
// Initialize webAccessibility container
var webAccessibility = new WebAccessibility();
// Create an accessibility validator with a static instance for all rules from repository that match the builder settings
var validator = webAccessibility.CreateValidator(ValidationBuilder.All);
// Initialize an object of HTMLDocument class
using (var document = new Aspose.Html.HTMLDocument(“c:\data2\123.html”))
{
// Check the document
ValidationResult validationResult = validator.Validate(document);
// Checking for success
//if (!validationResult.Success)
{
// Get a list of Details
foreach (var detail in validationResult.Details)
{
Console.WriteLine("{0}:{1} = {2}", detail.Rule.Code, detail.Rule.Description, detail.Success);
}
}
}
– code end –
The HTML is very simple, but is known to be non compliant, so am I missing something?
123.zip (316 Bytes)
If you could provide some sample code, which demonstrate how it works, that would be very nice.