Closed Bug 1628418 Opened 4 years ago Closed 4 years ago

implement ARIA reflection

Categories

(Core :: Disability Access APIs, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: surkov, Assigned: surkov, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(4 files)

Spec lives here https://w3c.github.io/aria/#idl-interface
Mozilla position here https://github.com/mozilla/standards-positions/issues/211

So no IDRefs attributes and nullable ARIA attributes (https://github.com/w3c/aria/issues/1058) at this point. Do I understand correctly these issue are not considered a stopper for prototyping?

Flags: needinfo?(jteh)

Implementing this behind a preference is totally fine. Even enabling on Nightly. It would be good to email an Intent to prototype as per https://wiki.mozilla.org/ExposureGuidelines though. For shipping we should sort out the remaining issues (including reflecting all as strings or using more appropriate types).

Flags: needinfo?(jteh)

(In reply to Anne (:annevk) from comment #1)

Implementing this behind a preference is totally fine. Even enabling on Nightly. It would be good to email an Intent to prototype as per https://wiki.mozilla.org/ExposureGuidelines though.

Filed https://groups.google.com/forum/#!topic/mozilla.dev.platform/FWdTtWSFzE0

For shipping we should sort out the remaining issues (including reflecting all as strings or using more appropriate types).

sure, totally makes sense

Assignee: nobody → surkov.alexander
Flags: needinfo?(bugs)

Sounds right. And worth to check what has been implemented in other browsers.

Flags: needinfo?(bugs)

The Intent to prototype mentioned Element, but I don't think we should expose this beyond HTML, SVG, and Math (and potentially XUL) elements. I.e., it should match the HTMLOrForeignElement mixin or be more tightly scoped.

(In reply to Anne (:annevk) from comment #5)

The Intent to prototype mentioned Element, but I don't think we should expose this beyond HTML, SVG, and Math (and potentially XUL) elements.

Why? If I get it right, then ARIA is not scoped to any particular markup, and if so, it seems reasonable to keep ARIA Reflection of the same scope.

Out of curiosity, HTML/SVG/Math (+XUL) define practically everything. If it gets scoped, then what left out of the scope?

I.e., it should match the HTMLOrForeignElement mixin or be more tightly scoped.

which mixin would be define the best scope then?

on implementation level, does it mean this AriaAttributes.webidl change (https://w3c.github.io/aria/#AriaAttributes)?

-Element includes AriaAttributes;
+HTMLOrForeignElement includes AriaAttributes;

(In reply to alexander :surkov (:asurkov) from comment #6)

on implementation level, does it mean this AriaAttributes.webidl change (https://w3c.github.io/aria/#AriaAttributes)?

-Element includes AriaAttributes;
+HTMLOrForeignElement includes AriaAttributes;

I suppose

HTMLElement includes AriaAttributes;
MathMLElement includes AriaAttributes;
SVGElement includes AriaAttributes;

I didn't realize ARIA included Element includes AriaAttributes. I guess this is more of a design question then, but thus far only id, class, and slot have been made "superglobal" attributes by the DOM Standard and everything else is more restricted to not step on the toes of those designing custom vocabularies too much.

(In reply to Anne (:annevk) from comment #8)

I didn't realize ARIA included Element includes AriaAttributes. I guess this is more of a design question then, but thus far only id, class, and slot have been made "superglobal" attributes by the DOM Standard and everything else is more restricted to not step on the toes of those designing custom vocabularies too much.

So shall I stick to the original plan then? and should I file a github issue against the spec to rise the concern?

Implementation question: nsGenericHTMLElement has handy methods like SetHTMLBoolAttr [1] to implement attribute reflection, and which are implemented as wrappers around Element::SetAttr. Curious, if SetHTMLBoolAttr and such should be moved to Element, and AriaAttribute implementation as well?

[1] https://searchfox.org/mozilla-central/source/dom/html/nsGenericHTMLElement.h#748

If you could file an issue that'd be great. Does Firefox currently support setting ARIA attributes on arbitrary elements? (E.g., an element created with document.createElementNS("some random string", "some-name");)

(In reply to Anne (:annevk) from comment #11)

If you could file an issue that'd be great.

yep, filed one https://github.com/w3c/aria/issues/1239

Does Firefox currently support setting ARIA attributes on arbitrary elements? (E.g., an element created with document.createElementNS("some random string", "some-name");)

yep, setting role='button' on such elements makes it a button for accessibility, Chrome makes same thing.

Olli, could you take a look at comment #10 please?

Flags: needinfo?(bugs)

Moving helper methods from nsGenericHTMLElement to Element, if needed, sounds ok to me.
And AriaAttribute stuff of course depends on the spec.

Flags: needinfo?(bugs)
Priority: -- → P3

Depends on D71771

Pushed by mzehe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7da3a631f4cf
ARIA reflection: implement AccessibilityRole interface r=smaug
https://hg.mozilla.org/integration/autoland/rev/a0d04f7917bd
ARIA reflection: implement AriaAttributes interface r=smaug
https://hg.mozilla.org/integration/autoland/rev/067ed9e7c7b3
ARIA reflection: update WPT tests r=smaug
Regressions: 1632207
Pushed by mzehe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/56590914ab61
ARIA reflection: update wpt test expectation r=MarcoZ
Regressions: 1632473

Hi! This feature seems to remain under a flag while it's already available by default in Chrome and Safari. Do you have any estimate for moving this to be on by default? Thanks!

Flags: needinfo?(annevk)

Jamie, do you know if we have a bug that tracks shipping this?

I'm a bit concerned that some of the specification issues still haven't been resolved, e.g.:

Not sure why the other browsers decided to ship when the design still has flaws like those.

Flags: needinfo?(annevk) → needinfo?(jteh)

We don't have a bug to track shipping (yet), but the reason it hasn't been shipped is precisely because of those open spec issues. We're in a bit of a bind now, though, because multiple browsers have shipped it without those issues being resolved. That means resolving those spec issues is likely to cause web compat issues. We know this is already being used in the wild; see bug 1785412.

See Also: → 1785412
Blocks: 1785412
See Also: 1785412
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: