#4614 closed defect (fixed)
Empty class attribute in navigation bars
| Reported by: | Emmanuel Blot | Owned by: | Jonas Borgström |
|---|---|---|---|
| Priority: | low | Milestone: | 0.11 |
| Component: | general | Version: | devel |
| Severity: | minor | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
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 (0)
Change History (4)
follow-up: 2 comment:1 by , 19 years ago
comment:2 by , 19 years ago
| Summary: | Avoid empty class selector for navigation bar → Empty class attribute in navigation bars |
|---|---|
| Type: | enhancement → defect |
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.
comment:4 by , 19 years ago
| Milestone: | → 0.11 |
|---|



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.