Bug #36740
Glossary extension outputs non-valid HTML5
| Status: | New | Start date: | 2012-05-01 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Integration | |||
| Target version: | - | |||
| Votes: | 0 |
Description
The glossary extensions output is not validated with the W3C HTML5 validator.
It's using the obsolete tag <acronym>
History
Updated by Sacha Vorbeck 3 months ago
In addition I`d like to add that all available tags are pre-defined/fixed and you`re not able to change them without modifying the extension code.
Fixed because the values are defined in the TCA:
'shorttype' => array(
...
'type' => 'select',
'items' => array(
array('LLL:EXT:a21glossary/locallang_db.xml:tx_a21glossary_main.shorttype.I.-1', ''),
array('LLL:EXT:a21glossary/locallang_db.xml:tx_a21glossary_main.shorttype.I.0', 'span'),
array('LLL:EXT:a21glossary/locallang_db.xml:tx_a21glossary_main.shorttype.I.1', 'dfn'),
array('LLL:EXT:a21glossary/locallang_db.xml:tx_a21glossary_main.shorttype.I.2', 'acronym'),
array('LLL:EXT:a21glossary/locallang_db.xml:tx_a21glossary_main.shorttype.I.3', 'abbr'),
and then the HTML-output is defined in PHP:
$element = trim(htmlentities(strip_tags($row['shorttype']),ENT_QUOTES,$pObj->renderCharset)); $titleText = trim(htmlentities(strip_tags($row['longversion']),ENT_QUOTES,$pObj->renderCharset)); $before = '<'.$element.$lang.$title.'>'; $after = '</'.$element.'>'; $result = $before.$cObj->stdWrap($row['short'],$conf[$element.'.']).$after;
This is very static and inflexible. Instead this should be configurable via TypoScript so that you can define the selectable shorttypes and also be able to define the HTML which is added (and also exactly where it is added) depending on the editors choice.
One reason we need more flexibility is that some customers are not satisfied with the standard layout of the tooltips that appear when you mouse-over a short tag. To use one of the available CSS/JS solutions for tooltips that look more fancy, you might need some extra HTML like an additional span or div.