Closed Bug 746107 Opened 12 years ago Closed 12 years ago

add outputTextAttrs helper function to JSDialog of AccessibleTree view

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
anonymous function, not sure how to say about it in UI without any good rework.
Attachment #615673 - Flags: review?(neil)
Why don't the text attributes appear in the accessible properties viewer?

Alternatively, is there a value in sharing these functions with the evaluator and the accessible event handlers?
(In reply to neil@parkwaycc.co.uk from comment #1)
> Why don't the text attributes appear in the accessible properties viewer?

text attributes takes an offset the text attributes are calculated at, for example,
<p><b>bold</b>normal</p>
so text attributes on p accessible at 0 offset are "font-weitht: 700", at 4 offset is empty set.

> Alternatively, is there a value in sharing these functions with the
> evaluator and the accessible event handlers?

absolutely, all helper methods should be shared between them (iirc I didn't file bug on that yet).
(In reply to alexander surkov from comment #2)
> (In reply to comment #1)
> > Why don't the text attributes appear in the accessible properties viewer?
> text attributes takes an offset the text attributes are calculated at, for
> example,
> <p><b>bold</b>normal</p>
> so text attributes on p accessible at 0 offset are "font-weitht: 700", at 4
> offset is empty set.
Sorry, the question I meant to ask was "Why don't you display text attributes in the relevant accessible viewer?"
(In reply to neil@parkwaycc.co.uk from comment #3)
> Sorry, the question I meant to ask was "Why don't you display text
> attributes in the relevant accessible viewer?"

are you asking about nice UI for text attributes instead of having an utility function to print them out in console? If yes, then I think it makes sense to keep them both. We have bug 738232 for UI.
(cc'ing Neil)
(sorry, I'm so far behind on my review queue that Bugzilla pinged me again...)
please take your time. I just started to use DOMi for tricky a11y examples again and wanted to flush my DOMi queue.
Comment on attachment 615673 [details] [diff] [review]
patch

Well, I eventually found something with a text attribute on the SeaMonkey start page :-)

>+      var enumerate = attrs.enumerate();
Nit: variable is traditionally named enumerator.

>+      if (str)
>+        output(str);
str is never null here, no point wrapping it in an if. Or you could just output everything individually.
Attachment #615673 - Flags: review?(neil) → review+
landed with Neil's comments addressed - http://hg.mozilla.org/dom-inspector/rev/fe054428d6aa
Assignee: nobody → surkov.alexander
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: