Closed Bug 530039 Opened 16 years ago Closed 16 years ago

expose accessible action interface in DOMi

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

Details

(Keywords: access)

Attachments

(1 file, 2 obsolete files)

No description provided.
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #413585 - Flags: superreview?(neil)
Attachment #413585 - Flags: review?(sdwilsh)
Blocks: DOMi2.0.5
Comment on attachment 413585 [details] [diff] [review] patch >+ var viewerid = tab.id.replace("tab_", ""); >+ var viewer = this.viewers[viewerid]; >+ if ("inspectInNewView" in viewer) >+ viewer.inspectInNewView(); why is this now needed? It's not clear to me.
(In reply to comment #2) > (From update of attachment 413585 [details] [diff] [review]) > >+ var viewerid = tab.id.replace("tab_", ""); > >+ var viewer = this.viewers[viewerid]; > >+ if ("inspectInNewView" in viewer) > >+ viewer.inspectInNewView(); > why is this now needed? It's not clear to me. This ability is not supported for every a11y property viewer so I just don't wanted to add this method stub to every prop viewer (for example, I add actionsViewer which hasn't inspectInNewView method)
Component: Disability Access APIs → DOM Inspector
Product: Core → Other Applications
QA Contact: accessibility-apis → dom-inspector
Comment on attachment 413585 [details] [diff] [review] patch What sort of object has more than one action? >+<!ENTITY descInvoke.label "Invoke"> Shouldn't there be an access key for this ;-)
(In reply to comment #4) > (From update of attachment 413585 [details] [diff] [review]) > What sort of object has more than one action? For example container treeitem which has two actions. The "select" action and "collapse/expand" action can be exposed. Or image accessible might have two actions: "click" if it's inside of HTML anchor and "showlongdesc" action to show his long description in separate window. > >+<!ENTITY descInvoke.label "Invoke"> > Shouldn't there be an access key for this ;-) Probably it would be hard to assign access keys for n buttons (however now there are three choices only: no actions, one action and two actions). CC'ing Marco to get his opinion.
Comment on attachment 413585 [details] [diff] [review] patch >+ if ("inspectInNewView" in viewer) >+ viewer.inspectInNewView(); Nit: remove the dummy inspectInNewView method from the attributes viewer? >+ var actionItem = this.mDefaultActionItem.cloneNode(true); [XBL would be another way of achieving this.] >+ try { >+ var keys = this.mAccessible.getKeyBindings(aActionIndex); >+ var keysStr = ""; >+ for (var idx = 0; idx < keys.length; idx++) >+ keysStr += keys.item(idx); >+ >+ elm.textContent = keysStr; >+ } catch (e) { } Assuming you're expecting the exception, then IMHO keysStr belongs outside of the try/catch, so that you can clear any cloned value. >+ btn.setAttribute("oncommand", "viewer.doCommand(" + aActionIndex + ");"); This isn't ideal but the only other option I can think of is to have a command handler on the action item container which read the action index as an attribute of the clicked button.
(In reply to comment #6) > >+ var actionItem = this.mDefaultActionItem.cloneNode(true); > [XBL would be another way of achieving this.] XBL is a nice idea but I think it should require to make any other property viewer tabs to follow this. > >+ btn.setAttribute("oncommand", "viewer.doCommand(" + aActionIndex + ");"); > This isn't ideal but the only other option I can think of is to have a command > handler on the action item container which read the action index as an > attribute of the clicked button. I have not strong opinion which version is better. If you prefer your version then I'll change.
(In reply to comment #7) > I have not strong opinion which version is better. Don't worry about it. (In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 413585 [details] [diff] [review]) > > What sort of object has more than one action? > For example container treeitem which has two actions. The "select" action and > "collapse/expand" action can be exposed. I couldn't get the collapse/expand action to invoke; it always did a select.
(In reply to comment #8) > (In reply to comment #7) > > I have not strong opinion which version is better. > Don't worry about it. > > (In reply to comment #5) > > (In reply to comment #4) > > > (From update of attachment 413585 [details] [diff] [review]) > > > What sort of object has more than one action? > > For example container treeitem which has two actions. The "select" action and > > "collapse/expand" action can be exposed. > I couldn't get the collapse/expand action to invoke; it always did a select. I can see something bogus with accessible tree what might be related, I think it should be internal a11y problems and they shouldn't be related with the inspector patch it sounds. If you don't see how the patch might be guilty then let's take it. Later I will debug a11y code and file proper bugs.
(In reply to comment #9) > (In reply to comment #8) > > (In reply to comment #7) > > > I have not strong opinion which version is better. > > Don't worry about it. > > > > (In reply to comment #5) > > > (In reply to comment #4) > > > > (From update of attachment 413585 [details] [diff] [review] [details]) > > > > What sort of object has more than one action? > > > For example container treeitem which has two actions. The "select" action and > > > "collapse/expand" action can be exposed. > > I couldn't get the collapse/expand action to invoke; it always did a select. > > I can see something bogus with accessible tree what might be related, I think > it should be internal a11y problems and they shouldn't be related with the > inspector patch it sounds. If you don't see how the patch might be guilty then > let's take it. Later I will debug a11y code and file proper bugs. However I can't reproduce "collapse/expand" action works as a select with tree of Library left panel.
Attached patch patch2 (obsolete) — Splinter Review
Attachment #413585 - Attachment is obsolete: true
Attachment #415317 - Flags: superreview?(neil)
Attachment #415317 - Flags: review?(sdwilsh)
Attachment #413585 - Flags: superreview?(neil)
Attachment #413585 - Flags: review?(sdwilsh)
Attached patch patch3Splinter Review
sorry the wrong patch has been attached
Attachment #415317 - Attachment is obsolete: true
Attachment #415318 - Flags: superreview?(neil)
Attachment #415318 - Flags: review?(sdwilsh)
Attachment #415317 - Flags: superreview?(neil)
Attachment #415317 - Flags: review?(sdwilsh)
I was actually trying with the History sidebar, but the problem I now discover was that it was expanding the wrong element. I shall assume this is a core bug.
Attachment #415318 - Flags: superreview?(neil) → superreview+
Shawn, ping.
Comment on attachment 415318 [details] [diff] [review] patch3 nit: s/var/let/ in the new code please r=sdwilsh with that fixed
Attachment #415318 - Flags: review?(sdwilsh) → review+
landed with addressed Shawn's comments - http://hg.mozilla.org/dom-inspector/rev/f0f1ac875ff4
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
(In reply to comment #15) > (From update of attachment 415318 [details] [diff] [review]) > nit: s/var/let/ in the new code please Btw, Shawn what is an objection to replace var on let keyword? Is var keyword deprecated?
No, but let has sane scoping rules that programmers tend to better understand.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: