Next: , Previous: Running Single Tests, Up: Using WAchecker



3.2 The Issue Class

The run method of tests returns sequence of instances of the class wachecker.test.Issue. That class doesn't define any methods, it just contains public attributes providing all the information about identified accessibility issues:

description
Description of the identified issue as a string.
data
Additional data regarding the issue. This can be an arbitrary value including None (if no additional data is provided). For instance, if an image containing on alternative text is found, data may contain the text.
input_position
Position (line and column) of the issue in the source page. This is either a pair of two integers (line, column) or None. The first lines and columns are numbered 1. If the exact input position is not known, input_position is None or one or both of the integers are 0.

The returned issue instances are not direct Issue instances. They are always instances of one of the following Issue subclasses:

Error
Issue clearly identified as an error.
Possible_Error
Issue which is likely to be an error, but this must be confirmed by a reviewer first.
Possible_Issue
Issue which may or may not be an error. A reviewer must look at it and decide.