w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
178 stars 48 forks source link

relationship between native semantics of HTML popover feature and ARIA might need to be normalized. #513

Open Zhang-Junzhi opened 2 months ago

Zhang-Junzhi commented 2 months ago

The current spec hasn't mentioned anything about popover, which is a new HTML feature. The relationship between native semantics of HTML popover feature and ARIA might need to be normalized.

scottaohara commented 2 months ago

Nothing specifically for the popover attribute itself

popovertarget on a button should not have an aria-expanded declared with it.

Zhang-Junzhi commented 2 months ago

Nothing specifically for the popover attribute itself

popovertarget on a button should not have an aria-expanded declared with it.

Might popovertarget have a native semantics equivalent to aria-controls?

  1. Does popovertarget forbid the attribute aria-controls?
  2. Or just forbid the target id in aria-controls(in case the button controlls other elements besides the popover target)?

And there's also popovertargetaction, which needs to be considered.

scottaohara commented 2 months ago

It doesn’t have an implicit aria-controls.

popovertargetaction doesn’t add any a11y semantics

Zhang-Junzhi commented 2 months ago

It doesn’t have an implicit aria-controls.

I think maybe we cannot safely exclude (at least in any case) the possibility of an implicit aria-controls from popovertarget. Since I found that the ARIA spec says the following about aria-expanded:

If a grouping container that can be expanded or collapsed is not the accessibility child of the element that has the aria-expanded attribute, the author SHOULD identify the controlling relationship by referencing the container from the element that has aria-expanded with the aria-controls property.

That is to say, it might be proper to have an implicit aria-controls(or an ID implicitly added to aria-controls) if the popover element is not the child of the element with popovertarget.

scottaohara commented 2 months ago

Being that I helped spec what was to be implemented for popover and its related attributes, I'm very confident that aria-controls is not used, nor is it going to be implicitly used.

It'd be very rare to have a popover as a child of the popovertarget - since that attribute is only valid on buttons. In the few cases where that could happen, an aria-controls relationship would be useless (beyond the fact that aria-controls is already pretty useless outside of with comboboxes).