Convert menuitem bindings to custom elements

RESOLVED DUPLICATE of bug 1500626

Status

()

P3
normal
RESOLVED DUPLICATE of bug 1500626
2 months ago
2 months ago

People

(Reporter: timdream, Unassigned)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [xbl-available])

The following bindings can be converted into multiple custom elements, tie to one menuitem tag name and different is values.

  • menuitem
  • menuitem-iconic
  • menuitem-iconic-noaccel

They have <children> but we won't be moving them. Rather, we can simply prepend/append nodes before and after the children. They might not be used and if so they can be cleaned up.

raw meeting note:

menuitem
It’s a base binding. Uses <content> but not children. Two extended bindings
menuitem-iconic
We need to figure out if <children> is actually used here (in menuitem[type="checkbox"], menuitem[type="radio"] (content/xul.css), menuitem.menuitem-iconic (content/xul.css), menuitem:not([type]) (viewsource/viewsource.css))
Could confirm with a try push, but this was originally added for a single case: https://hg.mozilla.org/mozilla-central/rev/c868ce24344c#l1.23
<children /> is a direct child of <content>; we don’t need to move it and hit layout assertion.
menuitem-iconic-noaccel
This is overloaded with iconic and plain menuitem, but if we don’t need slotting above then we could make this a runtime check and toggle the correct <content> based on that. May be perf issues to deal with since there’s a ton of these not visible initially

Also

menuitem-base
[implements], 2 children, totally doable but can’t be removed yet for same reason as basecontrol. Bug can be filed to track dependency.

Whiteboard: [xbl-available]
Priority: -- → P3

https://searchfox.org/mozilla-central/rev/c43240cef5829b8a2dec118faff8a5e1fec6ae1b/accessible/xul/XULMenuAccessible.cpp#41

When moving anonymous content to document DOM, add role="none" since XULMenuitemAccesible should ignore them.

Realized I had an older bug filed for this, with some additional comments. Going to dupe this one and link back to the comments in there.

Status: NEW → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1500626
You need to log in before you can comment on or make changes to this bug.