fix: Audio block iOS file picker compatibility #137
Merged
+34
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Apply a workaround so that the Audio block allows audio files within iOS' file picker.
Why?
A iOS Safari limitation currently prevents selecting audio files for upload.
Fix CMM-343. Fix #123. Related: WordPress/gutenberg#70119.
How?
iOS Safari's
accept
attribute lacks wildcardaudio/*
support. We insteadprovide an explicit list of audio MIME types.
This patch can be removed once the issue
is addressed in a future release.
See: https://stackoverflow.com/a/66859581
Testing Instructions
Tip
Test using the prototype build in wordpress-mobile/WordPress-iOS#24552.
Important
Utilize a hosting plan that allows for uploading audio.
Accessibility Testing Instructions
N/A, no navigation changes.
Screenshots or screencast
N/A, no visual changes.