Closed
Bug 530039
Opened 16 years ago
Closed 16 years ago
expose accessible action interface in DOMi
Categories
(Other Applications :: DOM Inspector, defect)
Other Applications
DOM Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: surkov)
References
Details
(Keywords: access)
Attachments
(1 file, 2 obsolete files)
13.00 KB,
patch
|
sdwilsh
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•16 years ago
|
||
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #413585 -
Flags: superreview?(neil)
Attachment #413585 -
Flags: review?(sdwilsh)
Comment 2•16 years ago
|
||
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.
Assignee | ||
Comment 3•16 years ago
|
||
(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)
Assignee | ||
Updated•16 years ago
|
Component: Disability Access APIs → DOM Inspector
Product: Core → Other Applications
QA Contact: accessibility-apis → dom-inspector
Comment 4•16 years ago
|
||
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 ;-)
Assignee | ||
Comment 5•16 years ago
|
||
(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 6•16 years ago
|
||
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.
Assignee | ||
Comment 7•16 years ago
|
||
(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.
Comment 8•16 years ago
|
||
(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.
Assignee | ||
Comment 9•16 years ago
|
||
(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.
Assignee | ||
Comment 10•16 years ago
|
||
(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.
Assignee | ||
Comment 11•16 years ago
|
||
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)
Assignee | ||
Comment 12•16 years ago
|
||
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)
Comment 13•16 years ago
|
||
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.
Updated•16 years ago
|
Attachment #415318 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 14•16 years ago
|
||
Shawn, ping.
Comment 15•16 years ago
|
||
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+
Assignee | ||
Comment 16•16 years ago
|
||
landed with addressed Shawn's comments - http://hg.mozilla.org/dom-inspector/rev/f0f1ac875ff4
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 17•16 years ago
|
||
(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?
Comment 18•16 years ago
|
||
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.
Description
•