mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.13k stars 22.45k forks source link

clip is deprecated #35743

Open lor3k opened 2 weeks ago

lor3k commented 2 weeks ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

clip is deprecated; don't suggest to use it

What did you expect to see?

I would remove solution with clip from the examples

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details * Folder: `en-us/web/api/file_api/using_files_from_web_applications` * MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/File_API/Using_files_from_web_applications * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/file_api/using_files_from_web_applications/index.md * Last commit: https://github.com/mdn/content/commit/88467d31d2ad7bdfade8b38ec69f6702fee080d1 * Document last modified: 2024-09-02T17:10:57.000Z
herrstrietzel commented 2 weeks ago

Probably, this CSS part on "Using a label element to trigger a hidden file input element"

for a screen-reader-only class should just be synchronized with the current recommendation on a11yproject. - adding the more modern clip-path: inset(50%); property.

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}