Forum OpenACS Development: Re: Towards OpenACS 5.9
Is it possible to also add a goal of html/UI clean-up for openacs core?
At least one admin feature uses nested tables for example.
This also would help:
1. address accessibility issues allowing openacs to be utilized by a more diverse pool of admins
2. provide openacs coded solutions by example in openacs-core
3. provide a style base more adaptable to site-wide css instead of the current collection of unique and "artistic" html-based styles.
4. provide a style base that other packages could rely on for consistent defaults
I'd imagine an html validator could be used to crawl to detect major issues, such as nested TABLE at:
In general, much html should be as generic as possible to validate regardless of DTD and allow styling changes to be changed by css.
One could take this to an extreme by reducing block tags such as P and BLOCKQUOTE to DIV, and reducing in-line tags such as B and STRONG to SPAN with a reference to an existing (or new) site-master.css class equivalent. This approach at html reduction would eliminate needing re-write most html, because spans and divs can be nested.
Maybe it is practical to write a script to identify and make substitutions. Gustaf has made scripts to crawl openacs for tcl code standardization.
From an openacs packages dir, an awkwardly written grep shows circa 110+ TABLE tags that could have attributes removed, since they conflict with any css styles:
grep -R "<table" acs-* | grep -v resources | grep -v "www/doc/" | grep -v "www/xml/" | grep -v "<table>" | grep -v "acs-core-docs" | wc -l
Yet, there are apparently 2042 cases of P open tag and 1260 of P closed tag, using this awkward grep:
grep -R "</p" acs-* | grep -v resources | grep -v "www/doc/" | grep -v "www/xml/" | grep -v "acs-core-docs" | wc -l