Re: Why does the validator give an error when using the popovertarget attribute on the <button> tag? After all, this attribute is allowed by the specification?!"

Philip Taylor (P.Taylor@rhul.ac.uk) wrote:

> The question (in the "Subject: " line) appears to be true, certainly for
> the following example :
>
>
[...]

>
>
> *cf. *https://html.spec.whatwg.org/multipage/popover.html#attr-popo
> <https://html.spec.whatwg.org/multipage/popover.html#attr-popover>
>

The strange thing is that the error message is followed by the information
“Attributes for element button:” and a list of attributes, including
“popovertarget <https://html.spec.whatwg.org/multipage/#attr-popovertarget> —
Targets a popover element to toggle, show, or hide”.

Similarly, <ul popover ...> is flagged as an error, “Error: Attribute
popover not allowed on element ul at this point.”, but this is followed by
“
Attributes for element ul
<https://html.spec.whatwg.org/multipage/#the-ul-element>:Global attributes
<https://html.spec.whatwg.org/multipage/#global-attributes>
”
and the link refers to information that says that “popover” is allowed for
all elements.

Jukka Korpela, https://jkorpela.fi

Received on Friday, 7 March 2025 22:50:42 UTC