Edgewall Software
Modify

Ticket #4614 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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:
Release Notes:
API 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

Change History

comment:1 follow-up: Changed 5 years ago by 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.

comment:2 in reply to: ↑ 1 Changed 5 years ago by eblot

  • Summary changed from Avoid empty class selector for navigation bar to Empty class attribute in navigation bars
  • Type changed from enhancement to 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:3 Changed 5 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from new to closed

Should be fixed in [4667].

comment:4 Changed 5 years ago by cmlenz

  • Milestone set to 0.11
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.