replace <a name=""> with <h3 id="">



Camino Graveyard
Product Site
8 years ago
8 years ago


(Reporter: philippe (part-time), Assigned: Smokey Ardisson (offline for a while; not following bugs - do not email))




(1 attachment)



8 years ago
sample page:
And probably all pages under

sample code:
<h3><a name="cookies"></a>
<h3 id="cookies">

name="" is quite a bit obsolete (although technically valid)
Validator verdict:

from IRC

[2:15pm] phiw: How are <a name> more discoverable ?
[2:16pm] sauron: that's the part i don't remember 
[2:17pm] sauron: maybe like
[2:18pm] sauron: although I guess since we have the TOCs now on every page, it's less important
[01:37am] sauron: any place we're using it should have a TOC
[01:37am] sauron: and if not, that's a bug in the page
Assignee: nobody → samuel.sidler
Component: Security → Product Site
QA Contact: camino →
Created attachment 474618 [details] [diff] [review]
Example diff for security/index.php

This can be automated by a regexp find/replace pattern:
<h3><a name="(.*)"></a>(.*)</h3>$
<h3 id="\1">\2</h3>

(For some reason, the equivalent Coda pattern [with (.*) replaced by marker 1 and marker 2, and \1 and \2 replaced by the corresponding markers, and no anchor] only replaced 3 instances on this page; I'll have to figure out why.)

At any rate, I'll go through the site and run the regexp; attached is a diff of security's index.php as an illustration of the changes.
Some older pages, like setup and bookmarks, used a slightly different (more verbose, more redundant) syntax:

<h3><a name="(.*)" id="(.*)"></a>(.*)</h3>
<h3 id="\1">\3</h3>

annoyances was a mishmash of both name and name+id (plus some <dt> with name+id)

faq used
<p><strong><a name="(.*)"></a>Q. (.*)</strong><br />

I double-checked pages that used weird syntax to make sure the revised regexps worked as intended.

Some pages, like bugzilla, safari, firefox, and hiddenprefs, already used the new syntax (hooray!).

donate was the only page outside of docs that used <a name>

All done; please validate at will.


We might want to consider replacing fag's <p><strong></strong><br /> with <h4> and a special style (less bottom margin/padding) for FAQ.

shortcuts needs a TOC.
Assignee: samuel.sidler → alqahira
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.