Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#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)

comment:1 by Matthew Good, 17 years ago

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.

in reply to:  1 comment:2 by Emmanuel Blot, 17 years ago

Summary: Avoid empty class selector for navigation barEmpty class attribute in navigation bars
Type: enhancementdefect

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:3 by Christopher Lenz, 17 years ago

Resolution: fixed
Status: newclosed

Should be fixed in [4667].

comment:4 by Christopher Lenz, 17 years ago

Milestone: 0.11

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.