Canvas O/P Testing

Why are we doing this?

Since the content of the canvas is inaccessible, it is important to ensure that the content can be explained in some way. To do this, we added a textual counterpart to every object drawn on the canvas.

The output contains a summary which is a gist of what is present in the canvas along with a table that contains details of objects. Both summary and table update in realtime with the sketch. NOTE: The output is currently visible - however this will not be the case in the IDE. This is just temporary for also testing without a screenreader.


The implementation to get the data for the p5 objects is done using an interceptor/monkey patch. The patch gets the arguments from the function call and store it in a variable. This content (summary and details) is refreshed every 100 frames - it contains the approximate location of the object along with its colour and other attributes.

Source code