Closed
Bug 267119
Opened 21 years ago
Closed 14 years ago
[FIX] anchor element without href but with tabindex can't receive focus
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: martijn.martijn, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: testcase)
Attachments
(3 files)
453 bytes,
text/html
|
Details | |
690 bytes,
text/html
|
Details | |
5.03 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041031 Firefox/0.9.1+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041031 Firefox/0.9.1+
This only happens in trunk (1.8a) builds (or only relevant in 1.8a builds).
See upcoming testcase.
An anchor element without the href attribute but with tabindex="1" set, is not
focusable, while it should be.
Reproducible: Always
Steps to Reproduce:
1. See testcase
2.
3.
Actual Results:
Anchor element not focusable
Expected Results:
Anchor element focusable.
Reporter | ||
Comment 1•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Assignee: nobody → mats.palmgren
Severity: normal → minor
Component: Layout → Keyboard: Navigation
OS: Windows 2000 → All
Hardware: PC → All
Summary: anchor element without href but with tabindex can't receive focus → [FIX] anchor element without href but with tabindex can't receive focus
Comment 2•21 years ago
|
||
related to Bug 267427 ?
Assignee | ||
Comment 3•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•21 years ago
|
||
This patch does minimal impact on ESM, but maybe the whole block:
// Add better focusable test here later if necessary ...
if (tag == nsHTMLAtoms::a &&
testContent->IsContentOfType(nsIContent::eHTML)) {
*aIsSelectionWithFocus = PR_TRUE;
}
else {
*aIsSelectionWithFocus = testContent->HasAttr(kNameSpaceID_XLink,
nsHTMLAtoms::href);
if (*aIsSelectionWithFocus) {
nsAutoString xlinkType;
testContent->GetAttr(kNameSpaceID_XLink, nsHTMLAtoms::type, xlinkType);
if (!xlinkType.EqualsLiteral("simple")) {
*aIsSelectionWithFocus = PR_FALSE; // Xlink must be type="simple"
}
}
}
Can be replaced with:
*aIsSelectionWithFocus = testContent->IsFocusable(nsnull);
I'm not to sure about the various XLink types though... comments?
![]() |
||
Comment 5•21 years ago
|
||
> I'm not to sure about the various XLink types though... comments?
XLinks do the right thing for isFocusable ever since bug 261707 was fixed. See
http://lxr.mozilla.org/seamonkey/source/content/xml/content/src/nsXMLElement.cpp#420
Updated•16 years ago
|
QA Contact: layout → keyboard.navigation
Assignee | ||
Comment 6•14 years ago
|
||
The "receive focus" part is worksforme. Adding the focus outline style
is being fixed in bug 652301.
Updated•6 years ago
|
Component: Keyboard: Navigation → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•