[svgwg] Issue: SVG no longer defines any attributes as required (#710) marked as Basic shapes chapter

AmeliaBR has just labeled an issue for https://github.com/w3c/svgwg as "Basic shapes chapter":

== SVG no longer defines any attributes as required ==
The current SVG spec sources don’t normatively define any attributes as required.

For example, at https://github.com/w3c/svgwg/blob/master/master/shapes.html#L63 the sources define the `width` and `height` content attributes for the `rect` element, but no part of the spec normatively defines those attributes as required.

However, if the `width` and `height` content attributes are omitted from a `rect` element, the `rect` element won’t be displayed correctly in Firefox (even if a document attempts to set the width and height using CSS instead).

It seems likely that there are other cases where, if certain attributes are omitted from an element, some UAs won’t display the element as expected.

The original SVG 1.1 spec did normatively define certain attributes as required. I’d guess implementation behavior in some UAs was written with the assumption that those required attributes are present — that the expected display behavior depends on them being present. And I would guess that the SVG 1.1 defined those attributes as required in order to make it clear to author-developers that they needed to include those required attributes in order to get expected behavior.

However, the required attributes were never normatively defined as  required in the actual spec prose. Instead, the SVG 1.1 spec embedded a formalism — a DTD — that normatively defined the requirements. For example, see the section for the `rect` element:

https://www.w3.org/TR/2003/REC-SVG11-20030114/shapes.html#RectElement

…which has a DTD fragment that contains the following:

```
    width %Length.datatype; #REQUIRED
    height %Length.datatype; #REQUIRED
```

But when the Second Edition of the SVG 1.1 spec was  published, those embedded DTD fragments were all dropped. And because the requirements weren’t otherwise normatively stated in the spec prose, the SVG spec lost all its definitions about required attributes.

And the current SVG spec sources just carried over those omissions.

So it seems like the spec sources need to be updated to normatively (re)define the required-attribute cases in the actual spec prose 

See https://github.com/w3c/svgwg/issues/710

Received on Friday, 5 July 2019 14:41:40 UTC