VCU POSH Tool (was LIFT Text Transcoder)
The VCU POSH Tool is a simple script that performs a number of transformations to a web page on the fly. It’s primary purpose is to create a text-only version of a web page by stripping out presentational styles and JavaScript functionality. This leaves only Plain Old Semantic HTML (though the Semantic bit is really in the hands of the developer), which visitors will see as a text-only version of the page.
- all script and style elements are deleted
- all link elements with an href value that matches the regular expression '\.css\??' are deleted
- all inline styles are deleted
- images are replaced with their alt values, and a link to view the image is inserted after
- inputs of type=image become inputs of type=submit
- all links on the page become fully qualified
- href values of anchor elements that have *.vcu.edu domain name are prepended with the URL of the POSH Tool
- links with a mailto, javascript or data scheme links are left alone
- forms using the GET method will work, and the response will be the POSH version
- forms using the POST method are left alone, and the response will be the graphic version
- ‘View text version’ links are changed to ‘View graphic version’ links
- documents with a ‘refresh’ header are redirected to the refresh location in POSH mode
- documents accessed via the HTTPS protocol are not displayed at this time
- documents that are not of type text/html will not be displayed
The tool offers visitors more direct access to the information on a web page by eliminating visual elements that may be distracting or inhibit accessibility. All CSS and inline styles are stripped out, and images are replaced with their alt attributes. The font and background colors revert to the user’s browser defaults, which helps avoid any problems with color contrasts.
Since a web page is above all an informational document, the VCU POSH Tool can help a web developer determine if the document is properly structured before any styles are applied. If the reading order of the information presented on the page does not make sense, it should be reordered logically. This is important, since this is the order that will be followed by screen readers or speech browsers.
As a webmaster the main advantage of deploying the VCU POSH Tool is that a "Text mode" link can be added to each page of the website, which will present visitors with a text-only version of the page with no manual work on the part of the developer.
To add a link to a text version of a web page, simply include the following tag in your HTML:
<a href="http://ts.vcu.edu/cgi-bin/posh.pl">View text-only version</a>
The tool will automatically render the referring page. Once in POSH mode, most links will continue to go to text-only versions until the visitor returns to graphic mode.
This article was updated: 02/4/2014