Opened 14 years ago
Closed 14 years ago
#2899 closed task (fixed)
Dijit: add focusNode
Reported by: | bill | Owned by: | davidb |
---|---|---|---|
Priority: | high | Milestone: | 0.9beta |
Component: | Accessibility | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Add focusNode attribute to all widgets (with something focusable), and common code to set tabIndex to 0 or -1 depending on whether widget is enabled or disabled.
Attachments (1)
Change History (10)
comment:1 Changed 14 years ago by
Owner: | changed from Becky Gibson to davidb |
---|
comment:2 Changed 14 years ago by
Status: | new → assigned |
---|
comment:3 Changed 14 years ago by
Component: | Widgets → Accessibility |
---|
comment:4 Changed 14 years ago by
comment:5 follow-up: 6 Changed 14 years ago by
The issue is to be able to identify the focusNode of a widget as this is the node that the ARIA role and state values need to be set on. The problem can be see in the setValue function of the form base: The setValue function calls dijit.util.wai.setAttr(this.domNode, "waiState", "valuenow", passedInValue); The problem is setting the valuenow property on this.domNode. The valuenow property needs to be set on the element that has the role and gets focus, and that may not be the domNode in all cases. For example, in the spinner the dojoAttachPoint with waiRole="spinbutton" is textbox.
At a dijit meeting we discussed updating form's setValue to call setAttr() with this.focusNode as the parameter. We need a way to specify the focusNode for each widget. So, we need a focusNode attribute and a way to set it. In order to do this we probably need to update dojoAttachPoint to be able to take more than one value since the focusNode may also be the domNode or it could be the container node. I would separate setting tabindex from the task of allowing the template to specify the focusNode.
comment:6 Changed 14 years ago by
Replying to becky: Thanks very much for the clarification; I recall the discussion but hadn't mentally connected it with this ticket.
comment:7 Changed 14 years ago by
The patch looks good to me, except I'm a little concerned about setting a <span> to the focus node... see bug #3039.
comment:8 Changed 14 years ago by
Hi Bill, I looked at 3039 but couldn't discern the specific issue. Note the span element already had a tabindex of 0 (putting it in the tab order)
comment:9 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Would this be the idea (?) :