Closed Bug 259062 Opened 16 years ago Closed 14 years ago

Support key events for navigation: onkeydown, onkeyup, and onkeypress event attributes

Categories

(Core :: SVG, defect, critical)

defect
Not set
critical

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jay, Unassigned)

References

()

Details

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040702
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040702

use the keyboard to type a letter, teh keycode is displayed on screen, well it
should be and is in safari.

essential for many games, and accessibility for keyboard users, such as the blind

Reproducible: Always
Steps to Reproduce:
1.http://www.peepo.com/svg/keycode.svg
2.type a letter using a keyboard
3.

Actual Results:  
nothing

Expected Results:  
screen should display keycode for letter typed

this code works in safari, and msie

This is and accessibility issue and is critical, without this feature people
unable to use a mouse cannot access SVG.

A related bug http://bugzilla.mozilla.org/show_bug.cgi?id=241787 deals with a
similar issue using SVG plugin on the main Mozilla browser.
For the record, SVG 1.1 does not provide key events. 

http://www.w3.org/TR/SVG11/interact.html#SVGEvents

"As in  DOM2 Key events, the SVG specification does not provide a key event set.
An event set designed for use with keyboard input devices will be included in a
later version of the DOM and SVG specifications."

There are now Text events and Keyboard events we could support as described in
the W3C Note DOM Level 3 Events at

  * http://w3.org/TR/DOM-Level-3-Events/events.html#Events-KeyboardEvents-Interfaces
  * http://w3.org/TR/DOM-Level-3-Events/events.html#Events-TextEvents-Interfaces

but the SVG 1.2 draft does not describe corresponding event attributes for these
events. Instead the declarative handling mechanism is a new <handler> element
(http://www.w3.org/TR/SVG12/#xmlevents-integration). 

This bug is a request for us to support event attributes that correspond to key
events despite the fact that the specs don't require this. The attributes to be
supported would be:

  * onkeydown
  * onkeyup
  * onkeypress

The rational for this would be that other SVG implementations such as Adobe's
SVG Viewer support these attributes, and SVG content that uses them has now
become widespread. 

Changed bug's subject from "keycode doesn't register, does in safari (Adobe SVG
Viewer)" to "support key events and the onkeydown, onkeyup, and onkeypress event
attributes". 
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: MacOS X → All
Hardware: Macintosh → All
Summary: keycode doesn't register, does in safari (Adobe SVG Viewer) → Support key events and the onkeydown, onkeyup, and onkeypress event attributes
Jonas, would you take ownership of this bug if we decide we do want to do this?
Mass reassign of SVG bugs that aren't currently being worked on by Alex to
general@svg.bugs. If you think someone should be assigned to your bug you can
join the #svg channel on mozilla.org's IRC server ( irc://irc.mozilla.org/svg )
where you can try to convince one of the SVG hackers to work on it. We aren't
always there, so if you don't get a response straight away please try again later. 
Assignee: alex → general
whilst considering this bug it might be as well to be aware of:
Mozilla/Gecko Keyboard Navigation Proposal
http://www.mozilla.org/access/unix/keyboardproposal.html#IX._Keyboard_Navigation_in_a_Sample_Web
I'm really concerned at the lack of progress, over 6 months, now and still not
assigned. Accessibility is a significant part of compliance, please read the 1.1
specification and User Agent guidelines:

http://www.w3.org/TR/SVG11/access.html
"To conform to the SVG specification, an SVG user agent should conform to UAAG. "

http://www.w3.org/TR/UAAG10/guidelines.html#gl-device-independence
" Ensure that the user can operate, through keyboard input alone, any user agent
functionality available through the user interface"
"While this document only requires keyboard operation for conformance, it
promotes input device independence by also allowing people to claim conformance
for full pointing device support or full voice support."
"The user may have to operate the user interface with a variety of input devices
(e.g., keyboard, pointing device, and voice input) and output modalities"

so it can be said the specs do require keyboard functionality.

as a minimum it is clear that some means of navigation, (frequently 'tab' and
'enter') is a requirement
jwatt,

I asked the DOMWG regarding this and received this response from Joseph Kesselman:

Certainly the accessability working group could, and probably should,
address this. But I think "keyboard navigation" is out of scope for the
DOM.

Remember, the DOM is a Document Model API. Screen navigation is an user
interface issue. The DOM will happily pass those characters through its
event system. But how they're interpreted by the UI is not under the DOM's
control, so there isn't anything the DOM spec can usefully say about this.


http://lists.w3.org/Archives/Public/www-dom/2004OctDec/0005.html
Summary: Support key events and the onkeydown, onkeyup, and onkeypress event attributes → Support key events for navigation: onkeydown, onkeyup, and onkeypress event attributes
Why is this bug still open?

Deer park looks to be a significant leap for SVG, but:

http://www.croczilla.com/svg/samples/svgtetris/svgtetris.svg

is just no fun on a mac, no keystrokes ~:"

It has been open nearly a year, and took more than that to get accepted and left
open.

Alex, Jonathan and Tor, have you tried SVGtetris on a mac?

congratulations on DeerPark, and please muscle in on Aaron Leventhal.
Well this is my first major bug that has been sorted.

Congratulations to all concerned including hixie, tor, jwatt and aaronL.

Accessibility is important, and I can now endeavour to live up to the excellent example you are setting.

Thanks!
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Attached image alert dialogue provides keycode (obsolete) —
Attached image <g id="this"> should be <a id="that"> (obsolete) —
Attachment #222913 - Attachment description: <g id="this"> should be <a id="that> → <g id="this"> should be <a id="that">
see attachment #222913 [details]

Erik@Opera helped me understand that perhaps <a id="such&such"> should be the result to evt.currentTarget rather than the current <g id="containerForAnchor">

I apologise for not having spotted this earlier, as the code worked I was elated.

Might keycode be supported as well as charcode?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I was amazed, that after the two year struggle to get this bug accepted, to find that :focus is part of the standard:

http://www.w3.org/TR/SVG11/interact.html#UIEventProcessing

and

http://www.w3.org/TR/2004/WD-SVG12-20041027/events.html

"Processing of any relevant dynamic pseudo-classes (i.e., :hover, :active and :focus), after which the event is passed on for:"
Attached image tab or focus anchor broken (obsolete) —
Attachment #222028 - Attachment is obsolete: true
Attachment #222913 - Attachment is obsolete: true
Attachment #226135 - Attachment is obsolete: true
could this be OS X specific?
As stated in comment 1, SVG 1.1 does not specify key event attributes, and as such we will not implement them.  Closing bug.

Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → WONTFIX
agreed as there has been significant drift from the summary.

moved to https://bugzilla.mozilla.org/show_bug.cgi?id=342058
You need to log in before you can comment on or make changes to this bug.