Closed Bug 584949 Opened 14 years ago Closed 14 years ago

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

Categories

(Camino Graveyard :: Product Site, defect)

x86
macOS
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: phiw2, Assigned: alqahira)

Details

Attachments

(1 file)

sample page:
http://caminobrowser.org/documentation/security/
And probably all pages under http://caminobrowser.org/documentation/

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

name="" is quite a bit obsolete (although technically valid)
Validator verdict: http://tinyurl.com/29k8gpq

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 https://www.squarefree.com/bookmarklets/webdevel.html#named_anchors
...
[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 → product.site
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
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: