Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-masking-1] Remove requirement to support 'clip' property #248

Open
SebastianZ opened this issue Jan 23, 2018 · 11 comments
Open

[css-masking-1] Remove requirement to support 'clip' property #248

SebastianZ opened this issue Jan 23, 2018 · 11 comments

Comments

@SebastianZ
Copy link
Contributor

The clip property was deprecated in favor of clip-path and according to Chrome's usage statistics[1][2] it's usage on websites has dropped below 0.0005%.

So I wonder if the sentence "UAs must support the clip property." is still valid or can be removed or replaced by something less strict like "may support" or even "are discouraged to support" (until it can finally be removed completely).

Sebastian

[1] https://www.chromestatus.com/metrics/feature/timeline/popularity/1552
[2] https://www.chromestatus.com/metrics/feature/timeline/popularity/945

@mstange
Copy link

mstange commented Jan 23, 2018

http://www.bbc.co.uk/news/resources/idt-248d9ac7-9784-4769-936a-8d3b435857a8 is one page I know about that would break if this property becomes unsupported.

.section-background.section-background-fixed {
    clip: rect(0, auto, auto, 0);
}

@dirkschulze
Copy link
Contributor

@SebastianZ clip is marked deprecated but mandatory. IMO this is good enough for level 1. We may discuss removing this requirement in the next level.

@dirkschulze
Copy link
Contributor

@SebastianZ The CSS WG decided to create a 2nd level of CSS Masking. Is it ok for you to defer the decision to Level 2? Or do you feel strongly that this should be part of CSS Masking Level 1?

@AmeliaBR
Copy link

clip is widely used in code for "visually hidden but screen-reader accessible" styles. I would therefore expect it to be mandatory for interactive media for a long time to come -- until we come up with a better solution for that use case, and give it time to become the dominant solution in practice.

@SebastianZ
Copy link
Contributor Author

@SebastianZ The CSS WG decided to create a 2nd level of CSS Masking. Is it ok for you to defer the decision to Level 2? Or do you feel strongly that this should be part of CSS Masking Level 1?

Sorry for the long delay! I'm fine with deferring the decision to Level 2.

clip is widely used in code for "visually hidden but screen-reader accessible" styles.

@AmeliaBR Do you have numbers or examples for this statement? Because this sounds like a hacky way of using clip (or clip-path, for what it's worth). Isn't this rather a case to use the visibility property?

Sebastian

@dirkschulze
Copy link
Contributor

@SebastianZ Many screenreader ignore elements with visibility: hidden. This is likely because authors use it where they should use display: hidden. However, the latter influences layout the former does not. This might be why visibility is misused.

@AmeliaBR
Copy link

AmeliaBR commented Apr 10, 2018

@SebastianZ Just search for "visually hidden styles". Most results will either recommend clip or mention it as one possible option.

@dirkschulze It is not a misuse for screenreaders to ignore visibility: hidden. That's the expected behavior. The content is hidden, it shouldn't be read, it is saving space in the layout for later reveal. Hiding content from visual users but making it available to screenreaders is the hackier approach, since it goes against the normal rule that the screenreader reads what is on the screen. There is discussion in w3c/csswg-drafts#560 about creating a formal way of doing this, but until then the "visually hidden" set of styles will remain in use.

@SebastianZ
Copy link
Contributor Author

And again a long delay on my side.

@SebastianZ Just search for "visually hidden styles". Most results will either recommend clip or mention it as one possible option.

I did and you're right, there are a few pages that mention it as a possible method. Though again, the usage numbers seem to be very low. So I assume authors already mostly switched to clip-path.

But as @mstange pointed out, there are obviously still some big pages using it, so there's no possibility yet to remove the requirement to support it, unfortunately.

Sebastian

@ewilligers
Copy link
Contributor

But as @mstange pointed out, there are obviously still some big pages using it, so there's no possibility yet to remove the requirement to support it, unfortunately.

I don't think "some big pages use it" implies "SVG 2 must normatively require support". clip has been deprecated since at least 2014. If we omit clip from the required properties list, implementations will be free to drop support as usage drops. Otherwise we are overriding the deprecation.

@AmeliaBR
Copy link

AmeliaBR commented Jul 4, 2018

@ewilligers

This issue is about the definition of clip in the CSS Masking spec, which currently says:

With this specification the clip property is deprecated. Authors are encouraged to use the clip-path property instead. UAs must support the clip property.

However, I agree we should remove it from the SVG 2 required properties list, so that if a future level of the Masking spec decides to move it from deprecated to obsolete, there are no conflicting instructions in the SVG spec! Also: any browser that supports SVG is going to support clip-path, and the accessibility use-cases are mostly about handling HTML content with good backwards browser compatibility.

Do you want to make a separate issue/PR on SVG?

@ewilligers
Copy link
Contributor

This issue is about the definition of clip in the CSS Masking spec

Oops. Apologies for the noise.

Do you want to make a separate issue/PR on SVG?

Done: issue / PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants