[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#613946: debian-policy: anchor issues in HTML version



Package: debian-policy
Version: 3.8.0.1
Severity: minor

When you view the HTML version of the Debian Policy with a browser
like Lynx or SeaMonkey/IceApe (which interpret <link> elements in
the header), you'll notice some unfiltered tags like:

| 4.4 Debian changelog: <code>debian/changelog</code>
or
| 7.2 Binary Dependencies - <samp>Depends</samp>

Apparently, <code> and <samp> etc. should be filtered out in the title
text of the link elements.


Another tight related issue are the anchors that serve as destination
for those link elements.  Currently, they are declared like this:

| <h2><a name="s-binarydeps"></a>7.2 Binary Dependencies -
| <samp>Depends</samp>, <samp>Recommends</samp>, <samp>Suggests</samp>,
| <samp>Enhances</samp>, <samp>Pre-Depends</samp></h2>

There is no link text.  A better solution would be:

| <h2><a name="s-binarydeps">7.2 Binary Dependencies -
| <samp>Depends</samp>, <samp>Recommends</samp>, <samp>Suggests</samp>,
| <samp>Enhances</samp>, <samp>Pre-Depends</samp></a></h2>

This will meet the recommendations of the WCAG for links.
(<http://www.w3.org/TR/2008/REC-WCAG20-20081211/#navigation-mechanisms>)

Main purpose: I like to use CSS to highlight anchor targets.
This is useful when you want to link to some sub-heading in
your documentation et al.  It looks like this:

| h1[id]:hover:after,
| h2[id]:hover:after,
| h3[id]:hover:after,
| h4[id]:hover:after {
|     content:" #"attr(id);
|     font-size: smaller;
| }
| a[name]:hover:after {
|     content:" #"attr(name);
|     font-size: smaller;
| }

When you hover over an heading h1 .. h4 or anchor, the browser will
show the id or name at the end of the line.  Empty anchors sabotage
this, as they take no space and cannot be hovered.  Changing the
anchors or switching to headings with ids should fix that problem,
too.

Regards,
Christoph

P.S.: Version 3.9.1.0 seems to have the same issues.

-- System Information:
Debian Release: 5.0.8
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

debian-policy depends on no packages.

debian-policy recommends no packages.

Versions of packages debian-policy suggests:
pn  doc-base                      <none>     (no description available)

-- no debconf information



Reply to: