I am using <detail> elements with the name set to create a group of accordions, e.g.
<details name="accordion-group" open>
<summary>Header 1</summary>
E lorem ipsum...
</details>
<details name="accordion-group">
<summary>Header 2</summary>
Foo bar
</details>
This works well, but when I check the HTML against the W3 Nu Html Checker, I get these errors for each <detail> element:
Attribute name not allowed on element details at this point.
However, according to the specs, the <detail> element allows for all global attributes, name, and open. Here is the documentation: https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element
There is even a blurb in the documentation specific to the name attribute:
The name content attribute gives the name of the group of related details elements that the element is a member of. Opening one member of this group causes other members of the group to close. If the attribute is specified, its value must not be the empty string.
There is even an example of using the name attribute in the specs (example), but doing a rote copy/paste in the validator causes the same error to appear.
Is this just a bug in the Nu Html Checker widget -or- are there certain scenarios in which you cannot use the name attribute on the <details> element?
nameattribute is new and is not yet in the official HTML5.3 / WHATWG spec that the w3c uses that's why you get these errors Yet it works on modern browsers Chrome (120+), Safari (17.4+), and Edge (120+)