Implement the DOM interfaces for the title, desc and metadata elements

RESOLVED FIXED

Status

()

Core
SVG
--
enhancement
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: jonathan chetwynd, Assigned: jwatt)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041102
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041102

text contained within title elements will be used by many documents to present
tooltip or label information. This necessitates title being part of the DOM

Reproducible: Always
Steps to Reproduce:
1.load file
2.mouseover '?'
3.

Actual Results:  
nothing

Expected Results:  
The text changes from love to help

the attachment file is only intended to show the type of use to which title text
might be put. eg ".getNodeName() == "title") "

my apologies that the script isn't shorter, can't figure what's redundant :-(

INTERNATIONALISATION

please note that 'switch' according to the spec? is only supported for text.

THIS IS AN ERROR.

switch needs to be supported for title and desc.

a workaround to demonstrate possible use is here:
http://www.peepo.co.uk/launch/index.svg

please note this uses for french for instance: systemLanguage="fr"
to ensure frenchOS users get french tooltips, 

but doesn't use title as switch isn't supported :-(
I should pester WG, remind me.
(Reporter)

Comment 1

14 years ago
Created attachment 165156 [details]
title text being used as a tooltip, a working example

well it should be svg, but this isn't an option?
(Assignee)

Updated

14 years ago
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Assignee)

Updated

14 years ago
Assignee: general → jonathan.watt
Status: ASSIGNED → NEW
(Assignee)

Updated

14 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 2

14 years ago
Created attachment 167167 [details] [diff] [review]
patch

Here's the code I've written so far. My testcase didn't work and actually
crashed Mozilla once (in the event handler part), so this needs some more work.
I'll investigate later.
(Assignee)

Comment 3

14 years ago
Comment on attachment 167167 [details] [diff] [review]
patch

Actually I was experiencing the onload crasher. This patch won't any more
though.
Attachment #167167 - Attachment description: broken in progress code → patch
(Assignee)

Comment 4

14 years ago
Created attachment 168431 [details] [diff] [review]
patch updated to tip

patch that will apply
Attachment #167167 - Attachment is obsolete: true

Updated

14 years ago
OS: MacOS X → All
Hardware: Macintosh → All
(Assignee)

Updated

14 years ago
Attachment #168431 - Flags: review?(alex)

Comment 5

14 years ago
Patch looks good. The 'IsAttributeMapped' function can be removed, because all
they do is forward to the baseclass.

Before r=ing this, I'd like to get tor's opinion on whether we should implement
this as 3 classes and 3 empty dom interfaces as in the patch, or whether we
should save on code bloat by instantiating a generic nsSVGElement for all three
tags and not implement the dom interfaces (seeing that they are empty anyway).
(Assignee)

Comment 6

14 years ago
Created attachment 171865 [details] [diff] [review]
patch updated to tip with IsAttributeMapped removed

(In reply to comment #5)
> Before r=ing this, I'd like to get tor's opinion on whether we should
implement
> this as 3 classes and 3 empty dom interfaces as in the patch, or whether we
> should save on code bloat by instantiating a generic nsSVGElement for all
three
> tags and not implement the dom interfaces (seeing that they are empty
anyway).

It may be better to have that generic element implementation, but note that
SVGMetadataElement is different from SVGDescElement and SVGTitleElement. The
former only inherits the SVGElement interface, whereas the latter two also
inherit SVGLangSpace and SVGStylable. tor?
(Assignee)

Updated

14 years ago
Attachment #168431 - Attachment is obsolete: true
Attachment #171865 - Flags: review?(alex)
(Assignee)

Updated

14 years ago
Attachment #168431 - Flags: review?(alex)

Comment 7

14 years ago
Comment on attachment 171865 [details] [diff] [review]
patch updated to tip with IsAttributeMapped removed

I'm fine with doing it as three elements for now - make it work in
the straightforward way first, optimize for size and speed later if
it turns out to be a problem.  sr=tor on the shared mozilla files.
Attachment #171865 - Flags: superreview+

Updated

14 years ago
Attachment #171865 - Flags: review?(alex) → review+
(Assignee)

Updated

14 years ago
Summary: Accessibility: title, desc and metadata should be part of the DOM → Implement the DOM interfaces for the title, desc and metadata elements
(Assignee)

Comment 8

14 years ago
Checked in by tor:
http://bonsai.mozilla.org/cvsquery.cgi?who=tor%25cs.brown.edu&date=explicit&mindate=2005-01-24+09%3A42&maxdate=2005-01-24+09%3A42
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.