All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

The accept attribute on file inputs works differently across platforms: Windows and Android filter properly, Apple does not

By

Adam Silver

14d ago· 5 min readenInsight

Summary

The article discusses the problem with using the accept attribute on HTML file input elements. On Apple devices (macOS/iOS), the accept attribute doesn't properly filter file types in the file picker dialog, instead showing all files but disabling invalid ones. However, on Windows and Android, the accept attribute works as expected by providing a proper filter that can be disabled. The author reflects on whether the web standard should be changed to accommodate Apple's poor implementation or if Apple should fix their implementation instead.

Source

bskyThe accept attribute on file inputs works differently across platforms: Windows and Android filter properly, Apple does notadamsilver.io

Key quotes

· 3 pulled
This is on Apple, elsewhere you get a proper filter that you can disable.
I'm against ruining stuff for everyone just because Apple did something stupid.
When you use the accept to specify which file types will be allowed...the dialog will disable invalid types like this:
Snippet from the RSS feed
Adam Silver – interaction designer – London, UK

You might also wanna read

Comments

Sign in to join the conversation.

No comments yet. Be the first.