Add NODE_CHILD_OF/NODE_PARENT_OF relations to mroot

RESOLVED FIXED in Firefox 41

Status

()

Core
Disability Access APIs
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: fredw, Assigned: fredw)

Tracking

Trunk
mozilla41
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

3 years ago
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.
(Assignee)

Comment 1

3 years ago
Created attachment 8624562 [details] [diff] [review]
Patch
(Assignee)

Comment 2

3 years ago
Created attachment 8624584 [details] [diff] [review]
Patch V2
Attachment #8624562 - Attachment is obsolete: true
Attachment #8624584 - Flags: review?(surkov.alexander)

Comment 3

3 years ago
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+
(Assignee)

Comment 4

2 years ago
Created attachment 8625940 [details] [diff] [review]
Patch V3

https://treeherder.mozilla.org/#/jobs?repo=try&revision=9ecebbea8949
Attachment #8624584 - Attachment is obsolete: true
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 5

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d9615de58f5c
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d9615de58f5c
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox41: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
(Assignee)

Comment 7

2 years ago
@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)

Updated

2 years ago
Depends on: 1180581
You need to log in before you can comment on or make changes to this bug.