Closed Bug 1176123 Opened 9 years ago Closed 9 years ago

Add NODE_CHILD_OF/NODE_PARENT_OF relations to mroot

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: fredw, Assigned: fredw)

References

Details

Attachments

(1 file, 2 obsolete files)

The order of children of MathML <mroot> are

base, index

whereas the natural way to make AT read it is

index-th root of base

So providing NODE_CHILD_OF/NODE_PARENT_OF relations will help AT to follow this natural order.
Attached patch Patch (obsolete) — Splinter Review
Attached patch Patch V2 (obsolete) — Splinter Review
Attachment #8624562 - Attachment is obsolete: true
Attachment #8624584 - Flags: review?(surkov.alexander)
Comment on attachment 8624584 [details] [diff] [review]
Patch V2

Review of attachment 8624584 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with comments addressed, thanks!

::: accessible/generic/HyperTextAccessible.cpp
@@ +1755,5 @@
> +Relation
> +HyperTextAccessible::RelationByType(RelationType aType)
> +{
> +  if (!HasOwnContent())
> +    return Relation();

you don't really need this, either this is those mathml tags or you redirect the call to base class

@@ +1760,5 @@
> +
> +  switch (aType) {
> +    case RelationType::NODE_CHILD_OF:
> +      if (mContent->IsMathMLElement()) {
> +        Accessible* parent = Parent();        

nit: pls remove whitespaces

@@ +1786,5 @@
> +    default:
> +      break;
> +  }
> +
> +  return Accessible::RelationByType(aType);

put this on top and use relation object for those mathml relations, otherwise it's impossible to use aria-owns on these math elements

::: accessible/generic/HyperTextAccessible.h
@@ +61,5 @@
>    virtual uint64_t NativeState() override;
>  
>    virtual void InvalidateChildren() override;
>    virtual bool RemoveChild(Accessible* aAccessible) override;
> +  virtual Relation RelationByType(RelationType aType);

pls add 'override'
Attachment #8624584 - Flags: review?(surkov.alexander) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d9615de58f5c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
@Yura: do you think these relations can be used to easily switch the the order of index / base for AccessFu? (both for output generator & tranversal navigation).
Flags: needinfo?(yzenevich)
(In reply to Frédéric Wang (:fredw) from comment #7)
> @Yura: do you think these relations can be used to easily switch the the
> order of index / base for AccessFu? (both for output generator & tranversal
> navigation).

I think at the moment we output subtree based on the order descendants appear in there. We can't at the moment arbitrarily change that. However we can provide enough information semantically to describe the mroot subtrees
Flags: needinfo?(yzenevich)
Depends on: 1180581
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: