Edgewall Software

Ticket #4614 (closed defect: fixed)

Opened 2 years ago

Last modified 2 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:

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

follow-up: ↓ 2   Changed 2 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.

in reply to: ↑ 1   Changed 2 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.

  Changed 2 years ago by cmlenz

  • status changed from new to closed
  • resolution set to fixed

Should be fixed in [4667].

  Changed 2 years ago by cmlenz

  • milestone set to 0.11

Add/Change #4614 (Empty class attribute in navigation bars)

Author


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


Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.