Re: [svgwg] Add support for the `hidden`-attribute (#508)

The SVG Working Group just discussed ``Add support for the `hidden`-attribute``, and agreed to the following:

* `RESOLUTION: Add a global hidden attribute to SVG with the same semantics as HTML that is expected to be implemented using UA stylesheets. Iff there is implementation commitment`

<details><summary>The full IRC log of that discussion</summary>
&lt;krit> topic: Add support for the `hidden`-attribute<br>
&lt;krit> GitHub: https://github.com/w3c/svgwg/issues/508<br>
&lt;krit> AmeliaBR: This is about HTML consitency. HTML element allows hidden attributes on any element that Is usually mapped to disaplay: none. It is encouraged in HTML as a way to keep semantics in the markup instead of the stylesheet.<br>
&lt;krit> AmeliaBR: In SVG we have presentation attributes to do this already. We didn't have a need for this attribute. But there might be confusion if we do not support it and people use it on SVG elements. Especially within CSS layout embedded in webpages/<br>
&lt;krit> krit: proposal is to add hidden attributes to all SVG elements? Or a list of elements?<br>
&lt;krit> AmeliaBR: If we add them then to all elements.<br>
&lt;krit> AmeliaBR: also for implementation complexity. My main concern is about wording and how it maps to display none or visibility properties. Or cascading attributes if you have this attribute and the regular presentation attributes.<br>
&lt;krit> AmeliaBR: Attributes have no particular order so we need to define the priority.<br>
&lt;AmeliaBR> HTML spec for hidden attribute: https://html.spec.whatwg.org/multipage/interaction.html#the-hidden-attribute<br>
&lt;krit> nzimmermann: There is a note in the HTML spec that display: block will cancel the effect of the hidden attribute. So it has precedence over the hidden attributes.<br>
&lt;krit> nzimmermann: So I don't think there is no issue with precedence with display or visibility.<br>
&lt;krit> AmeliaBR: We still need to specify how attributes affect each other in SVG because that is not defined in HTML. But I agree with your logic to overwrite hidden attributes.<br>
&lt;krit> nzimmermann: For authors it would make sense to have an explicit definition how attributes affect each other.<br>
&lt;krit> AmeliaBR: If we want to define the attributes in form of cascading it would override definition of presentation attributes. We can maybe ask for feedback from implementers what is easier to implement. And have a clear note in the spec how they relate<br>
&lt;krit> nzimmermann: your concern was that attribute might override UA stylesheets?<br>
&lt;krit> AmeliaBR: The opposite.<br>
&lt;AmeliaBR> `svg|[hidden] {display: none}`<br>
&lt;krit> AmeliaBR: The presentation attributes would be overridden<br>
&lt;krit> nzimmermann: you are right.<br>
&lt;krit> krit: what specific feedback we need from implementers?<br>
&lt;krit> AmeliaBR: this was specifically about cascade issues. We just need to make sure it is clearly defined.<br>
&lt;krit> krit: disagreement with being consistent with HTML and add hidden attributes??<br>
&lt;krit> krit: I need to look at it deeper. But it sounds like it is not just semantics but effects the styling<br>
&lt;krit> AmeliaBR: Implementation is not that complicated.<br>
&lt;krit> AmeliaBR: The semantic impact in fact of a11y is just coming out of the stylesheet. If I make something hidden it gets detected by accessibility software as well.<br>
&lt;krit> AmeliaBR: I'd like to hear implementers commitment before adding it to SVG 2 but have no concerns with adding them in general.<br>
&lt;krit> nzimmermann: no disagreement<br>
&lt;krit> Tav_: no disagreement<br>
&lt;krit> proposed RESOLUTION: Add a global hidden attribute to SVG with the same semantics as HTML that is expected to be implemented using UA stylesheets.<br>
&lt;krit> RESOLUTION: Add a global hidden attribute to SVG with the same semantics as HTML that is expected to be implemented using UA stylesheets. Iff there is implementation commitment<br>
&lt;krit> AmeliaBR: Who would be doing the work?<br>
&lt;krit> AmeliaBR: Will ask Zoe<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/508#issuecomment-556363241 using your GitHub account

Received on Wednesday, 20 November 2019 20:37:52 UTC