Ticket #4614 (closed defect: fixed)
Empty class attribute in navigation bars
| Reported by: | eblot | Owned by: | jonas |
|---|---|---|---|
| Priority: | low | Milestone: | 0.11 |
| Component: | general | Version: | devel |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Here is the rendered XHTML code for the metanav bar:
<ul> <li class="first">logged in as joeuser</li> <li class=""><a href="/trunk/logout">Logout</a></li> <li class=""><a href="/trunk/prefs">Preferences</a></li> <li class=""><a href="/trunk/wiki/TracGuide">Help/Guide</a></li> <li class="last"><a href="/trunk/about">About Trac</a></li> </ul>
Although empty class selectors are valid in XHTML/strict, it prevents Trac from generating valid XHTML+SVG pages, i.e. documents that follow http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd
When such document type is used, the w3 validator fails on all occurences of
<li class="">
because of the empty class.
This is an issue with Trac plugins that want to generate valid XHTML document with inlined SVG data.
Attachments
Change History
comment:2 in reply to: ↑ 1 Changed 4 years ago by eblot
- Type changed from enhancement to defect
- Summary changed from Avoid empty class selector for navigation bar to Empty class attribute in navigation bars
Replying to mgood:
Hrm, it would appear that the W3 validator for XHTML/Strict is not really that strict, since it validates the empty class attributes, though they do not conform to the DTD.
Oh ok, so this is more a small issue than an enhancement.



Hrm, it would appear that the W3 validator for XHTML/Strict is not really that strict, since it validates the empty class attributes, though they do not conform to the DTD.