bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

a:active shouldn't apply for <a name="...">

RESOLVED DUPLICATE of bug 65917

Status

()

Core
CSS Parsing and Computation
P1
normal
RESOLVED DUPLICATE of bug 65917
17 years ago
13 years ago

People

(Reporter: Erich 'Ricky' Iseli, Assigned: Pierre Saslawsky)

Tracking

({css1, css2})

Trunk
Future
x86
Other
css1, css2
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CSS1-2.1], URL)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
According to the W3C CSS1-testsuite, the A element doesn't have the active state
when it has the name attribute instead of an href.

The specs for CSS2 say:
http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes
"The :active pseudo-class applies while an element is being activated by the
user. For example, between the times the user presses the mouse button and
releases it."
And:
"CSS doesn't define which elements may be in the above states, or how the states
are entered and left."

Ok, then we have the big question: when is an element active? I did some tests
and noticed that any element, say <small> can have this state:
small:active {}
But what does this mean? Makes sense to me that a clickable link, a button, a
test-field and stuff can be activated. But just a plain element like <small> or
even <span>? I doubt. Has there been a discussion on this topic?
(Reporter)

Updated

17 years ago
Keywords: css1, css2
How about using a <span> and making it act like a button when 
something inside it is clicked (since a <span> _can_ have an 
onclick handler iirc).  So the <span> has inset/outset border depending on 
state, shifting padding, etc.  In that case having an :active state for it would 
be a good idea.

The goal here is to make it possible for web developers to do what they want to 
do, not restrict them as much as possible....  Is there any reason we should 
_not_ support :active for all elements?
There has been significant discussion of this issue in bug 5693 and bug 65917. 
Opinions differ widely, and hopefully CSS3 will settle the matter.
(Reporter)

Comment 3

17 years ago
Where's the discussion at about this topic?
Another (reasonable) possibility is that an element should only match :active if
it can be activated -- i.e., if it's a link, form control, or something similar,
or if it has an onclick/onmouse* handler.
*** Bug 101034 has been marked as a duplicate of this bug. ***
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0

Comment 6

17 years ago
Why would you want to give an onclick handler to a <span> instead of actually 
using a <button>?  Are you trying to make your page hard to use for keyboard-
only users?

Btw, this bug screws up the w3.org front page.  If you click to the right of a 
list item, the entire row containing the list item gets a yellow background.

Comment 7

17 years ago
Created attachment 58400 [details]
testcase based on http://www.w3.org/

Comment 8

17 years ago
*** Bug 47748 has been marked as a duplicate of this bug. ***
(Assignee)

Updated

17 years ago
Target Milestone: mozilla1.0 → mozilla1.1
Bulk moving from Moz1.1 to future-P1. I will pull from this list when scheduling
work post Mozilla1.0.
Priority: P3 → P1
Target Milestone: mozilla1.1 → Future
Whiteboard: [CSS1-2.1]

Comment 10

17 years ago
*** Bug 133987 has been marked as a duplicate of this bug. ***
Whatever we decide for bug 65917 is what will fix (or invalidate) this bug.

*** This bug has been marked as a duplicate of 65917 ***
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
VERIFIED DUPLICATE
Status: RESOLVED → VERIFIED

Comment 13

15 years ago
*** Bug 143676 has been marked as a duplicate of this bug. ***

Comment 14

13 years ago
(In reply to comment #11)
> Whatever we decide for bug 65917 is what will fix (or invalidate) this bug.
> 
> *** This bug has been marked as a duplicate of 65917 ***

But 65917 has been marked 'fixed.' However, the problem mentioned in this bug
has not been fixed, as can be seen from  this CSS1 Test: 

http://www.w3.org/Style/CSS/Test/CSS1/current/sec21.htm

Thus, I think this bug should be reopened.
Status: VERIFIED → REOPENED
Resolution: DUPLICATE → ---
The duplicate was correct.  The test in question is known to be broken as is the
whole CSS1 test suite (it tests in quirks mode), and the specification in
question is superceded by CSS2.1 in any case.  Please do not reopen this bug again.

*** This bug has been marked as a duplicate of 65917 ***
Status: REOPENED → RESOLVED
Last Resolved: 17 years ago13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.